[petsc-users] Petsc+Chombo problem

Sharp Stone thronesf at gmail.com
Thu Dec 22 11:01:55 CST 2016


Dear folks,

I'm now using Chombo with Petsc solver. When compiling the Chombo examples
of Petsc, I always got errors below. I wonder if anyone has such experience
to get rid of these. Thanks very much in advance!


In file included from PetscCompGrid.cpp:13:
PetscCompGrid.H:19:34: error: petsc-private/pcimpl.h: No such file or
directory
In file included from PetscCompGrid.cpp:13:
PetscCompGrid.H:55: error: ‘Mat’ does not name a type
PetscCompGrid.H:60: error: ‘PetscErrorCode’ does not name a type
PetscCompGrid.H:62: error: ‘PetscErrorCode’ does not name a type
PetscCompGrid.H:63: error: ‘PetscErrorCode’ does not name a type
PetscCompGrid.H:66: error: ‘PetscInt’ was not declared in this scope
PetscCompGrid.H:66: error: template argument 1 is invalid
PetscCompGrid.H:76: error: ‘PetscErrorCode’ does not name a type
PetscCompGrid.H:90: error: ‘PetscInt’ was not declared in this scope
PetscCompGrid.H:90: error: template argument 1 is invalid
PetscCompGrid.H:90: error: template argument 1 is invalid
PetscCompGrid.H:90: error: template argument 1 is invalid
PetscCompGrid.H:90: error: template argument 1 is invalid
PetscCompGrid.H:92: error: ‘PetscInt’ was not declared in this scope
PetscCompGrid.H:92: error: template argument 1 is invalid
PetscCompGrid.H:92: error: template argument 1 is invalid
PetscCompGrid.H:92: error: template argument 1 is invalid
PetscCompGrid.H:92: error: template argument 1 is invalid
PetscCompGrid.H:93: error: ‘PetscInt’ was not declared in this scope
PetscCompGrid.H:93: error: template argument 1 is invalid
PetscCompGrid.H:93: error: template argument 1 is invalid
PetscCompGrid.H:93: error: template argument 1 is invalid
PetscCompGrid.H:93: error: template argument 1 is invalid
PetscCompGrid.H:97: error: ‘Mat’ does not name a type
PetscCompGrid.H: In constructor ‘PetscCompGrid::PetscCompGrid(int)’:
PetscCompGrid.H:35: error: class ‘PetscCompGrid’ does not have any field
named ‘m_mat’
PetscCompGrid.H: At global scope:
PetscCompGrid.H:138: error: ‘PetscReal’ does not name a type
PetscCompGrid.H:140: error: ISO C++ forbids declaration of ‘PetscReal’ with
no type
PetscCompGrid.H:140: error: expected ‘;’ before ‘*’ token
PetscCompGrid.cpp: In destructor ‘virtual CompBC::~CompBC()’:
PetscCompGrid.cpp:38: error: ‘m_Rcoefs’ was not declared in this scope
PetscCompGrid.cpp:38: error: ‘PetscFree’ was not declared in this scope
PetscCompGrid.cpp: In constructor ‘CompBC::CompBC(int, IntVect)’:
PetscCompGrid.cpp:41: error: class ‘CompBC’ does not have any field named
‘m_Rcoefs’
PetscCompGrid.cpp: In member function ‘void CompBC::define(int, IntVect)’:
PetscCompGrid.cpp:49: error: ‘m_Rcoefs’ was not declared in this scope
PetscCompGrid.cpp:49: error: ‘PetscFree’ was not declared in this scope
PetscCompGrid.cpp:54: error: ‘PetscReal’ was not declared in this scope
PetscCompGrid.cpp:54: error: ‘m_Rcoefs’ was not declared in this scope
PetscCompGrid.cpp:54: error: ‘PetscMalloc’ was not declared in this scope
PetscCompGrid.cpp: At global scope:
PetscCompGrid.cpp:59: error: ‘PetscReal’ does not name a type
PetscCompGrid.cpp: In member function ‘virtual void
ConstDiriBC::createCoefs()’:
PetscCompGrid.cpp:72: error: ‘m_Rcoefs’ was not declared in this scope
PetscCompGrid.cpp:77: error: ‘m_Rcoefs’ was not declared in this scope
PetscCompGrid.cpp:85: error: ‘m_Rcoefs’ was not declared in this scope
PetscCompGrid.cpp:93: error: ‘m_Rcoefs’ was not declared in this scope
PetscCompGrid.cpp: In member function ‘virtual void
ConstDiriBC::operator()(FArrayBox&,
const Box&, const ProblemDomain&, Real, bool)’:
PetscCompGrid.cpp:137: error: ‘m_Rcoefs’ was not declared in this scope
PetscCompGrid.cpp: In member function ‘virtual void PetscCompGrid::clean()’:
PetscCompGrid.cpp:154: error: ‘m_mat’ was not declared in this scope
PetscCompGrid.cpp:156: error: ‘MatDestroy’ was not declared in this scope
PetscCompGrid.cpp: In member function ‘virtual void
PetscCompGrid::define(const ProblemDomain&, Vector<DisjointBoxLayout>&,
Vector<int>&, BCHolder, const RealVect&, int, int)’:
PetscCompGrid.cpp:218: error: request for member ‘resize’ in
‘((PetscCompGrid*)this)->PetscCompGrid::m_GIDs’, which is of non-class type
‘int’
PetscCompGrid.cpp:219: error: request for member ‘resize’ in
‘((PetscCompGrid*)this)->PetscCompGrid::m_crsSupportGIDs’, which is of
non-class type ‘int’
PetscCompGrid.cpp:220: error: request for member ‘resize’ in
‘((PetscCompGrid*)this)->PetscCompGrid::m_fineCoverGIDs’, which is of
non-class type ‘int’
PetscCompGrid.cpp:249: error: ‘PetscInt’ was not declared in this scope
PetscCompGrid.cpp:249: error: expected `;' before ‘my0’
PetscCompGrid.cpp:256: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:256: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:256: error: template argument 1 is invalid
PetscCompGrid.cpp:256: error: template argument 1 is invalid
PetscCompGrid.cpp:256: error: template argument 1 is invalid
PetscCompGrid.cpp:257: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:257: error: template argument 1 is invalid
PetscCompGrid.cpp:257: error: template argument 1 is invalid
PetscCompGrid.cpp:257: error: new initializer expression list treated as
compound expression
PetscCompGrid.cpp:257: error: cannot convert ‘IntVect’ to ‘int’ in
initialization
PetscCompGrid.cpp:261: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:261: error: template argument 1 is invalid
PetscCompGrid.cpp:261: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:261: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:262: error: request for member ‘setVal’ in ‘gidfab’,
which is of non-class type ‘int’
PetscCompGrid.cpp:276: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:281: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:288: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:288: error: template argument 1 is invalid
PetscCompGrid.cpp:288: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:288: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:295: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:295: error: template argument 1 is invalid
PetscCompGrid.cpp:295: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:295: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:299: error: ‘gidfab’ cannot be used as a function
PetscCompGrid.cpp:299: error: ‘my0’ was not declared in this scope
PetscCompGrid.cpp:308: error: ‘MPI_Comm’ was not declared in this scope
PetscCompGrid.cpp:308: error: expected `;' before ‘wcomm’
PetscCompGrid.cpp:310: error: ‘wcomm’ was not declared in this scope
PetscCompGrid.cpp:310: error: ‘m_mat’ was not declared in this scope
PetscCompGrid.cpp:310: error: ‘MatCreate’ was not declared in this scope
PetscCompGrid.cpp:311: error: ‘my0’ was not declared in this scope
PetscCompGrid.cpp:311: error: ‘PETSC_DECIDE’ was not declared in this scope
PetscCompGrid.cpp:311: error: ‘MatSetSizes’ was not declared in this scope
PetscCompGrid.cpp:312: error: ‘MatSetBlockSize’ was not declared in this
scope
PetscCompGrid.cpp:313: error: ‘MATAIJ’ was not declared in this scope
PetscCompGrid.cpp:313: error: ‘MatSetType’ was not declared in this scope
PetscCompGrid.cpp:314: error: ‘MatSetFromOptions’ was not declared in this
scope
PetscCompGrid.cpp:334: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:334: error: template argument 1 is invalid
PetscCompGrid.cpp:334: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:334: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:338: error: ‘gidfab’ cannot be used as a function
PetscCompGrid.cpp:338: error: ‘gidfab’ cannot be used as a function
PetscCompGrid.cpp:339: error: ‘gidfab’ cannot be used as a function
PetscCompGrid.cpp:342: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:348: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:350: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:350: error: template argument 1 is invalid
PetscCompGrid.cpp:350: error: template argument 1 is invalid
PetscCompGrid.cpp:350: error: invalid type in declaration before ‘;’ token
PetscCompGrid.cpp:358: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:358: error: template argument 1 is invalid
PetscCompGrid.cpp:358: error: template argument 1 is invalid
PetscCompGrid.cpp:358: error: new initializer expression list treated as
compound expression
PetscCompGrid.cpp:358: error: cannot convert ‘const IntVect’ to ‘int’ in
initialization
PetscCompGrid.cpp:359: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:359: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:359: error: template argument 1 is invalid
PetscCompGrid.cpp:359: error: template argument 1 is invalid
PetscCompGrid.cpp:359: error: template argument 1 is invalid
PetscCompGrid.cpp:363: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:363: error: template argument 1 is invalid
PetscCompGrid.cpp:363: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:363: error: no match for ‘operator[]’ in ‘* pl[dit]’
PetscCompGrid.cpp:364: error: request for member ‘setVal’ in ‘gidfab’,
which is of non-class type ‘int’
PetscCompGrid.cpp:367: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:367: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:379: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:379: error: template argument 1 is invalid
PetscCompGrid.cpp:379: error: template argument 1 is invalid
PetscCompGrid.cpp:379: error: new initializer expression list treated as
compound expression
PetscCompGrid.cpp:379: error: cannot convert ‘const IntVect’ to ‘int’ in
initialization
PetscCompGrid.cpp:380: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:380: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:380: error: template argument 1 is invalid
PetscCompGrid.cpp:380: error: template argument 1 is invalid
PetscCompGrid.cpp:380: error: template argument 1 is invalid
PetscCompGrid.cpp:384: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:384: error: template argument 1 is invalid
PetscCompGrid.cpp:384: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:384: error: no match for ‘operator[]’ in ‘* pl[dit]’
PetscCompGrid.cpp:385: error: request for member ‘setVal’ in ‘gidfab’,
which is of non-class type ‘int’
PetscCompGrid.cpp:388: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:388: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:394: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:394: error: template argument 1 is invalid
PetscCompGrid.cpp:394: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:394: error: no match for ‘operator[]’ in ‘* pl[dit]’
PetscCompGrid.cpp:398: error: request for member ‘box’ in ‘gidfab’, which
is of non-class type ‘int’
PetscCompGrid.cpp: At global scope:
PetscCompGrid.cpp:409: error: ‘PetscErrorCode’ does not name a type
PetscCompGrid.cpp: In member function ‘virtual void
PetscCompGrid::applyBCs(IntVect,
int, const DataIndex&, Box, StencilTensor&)’:
PetscCompGrid.cpp:611: error: ‘class ConstDiriBC’ has no member named
‘getCoef’
PetscCompGrid.cpp: In member function ‘virtual void
PetscCompGrid::InterpToCoarse(IntVect, int, const DataIndex&,
StencilTensor&)’:
PetscCompGrid.cpp:699: error: ‘PetscInt’ was not declared in this scope
PetscCompGrid.cpp:699: error: template argument 1 is invalid
PetscCompGrid.cpp:699: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:699: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:700: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:700: error: template argument 1 is invalid
PetscCompGrid.cpp:700: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:700: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:709: error: ‘gidfab’ cannot be used as a function
PetscCompGrid.cpp:720: error: expected `;' before ‘cidx’
PetscCompGrid.cpp:720: error: ‘cidx’ was not declared in this scope
PetscCompGrid.cpp:723: error: ‘kk’ was not declared in this scope
PetscCompGrid.cpp:741: error: ‘supgidfab’ cannot be used as a function
PetscCompGrid.cpp:743: error: ‘supgidfab’ cannot be used as a function
PetscCompGrid.cpp: In member function ‘virtual void
PetscCompGrid::InterpToFine(IntVect, int, const DataIndex&,
StencilTensor&)’:
PetscCompGrid.cpp:772: error: ‘PetscInt’ was not declared in this scope
PetscCompGrid.cpp:772: error: template argument 1 is invalid
PetscCompGrid.cpp:772: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:772: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:773: error: ‘PetscInt’ cannot appear in a
constant-expression
PetscCompGrid.cpp:773: error: template argument 1 is invalid
PetscCompGrid.cpp:773: error: invalid type in declaration before ‘=’ token
PetscCompGrid.cpp:773: error: invalid types ‘int[int]’ for array subscript
PetscCompGrid.cpp:774: error: request for member ‘box’ in ‘covergidfab’,
which is of non-class type ‘int’
PetscCompGrid.cpp:783: error: ‘gidfab’ cannot be used as a function
PetscCompGrid.cpp: At global scope:
PetscCompGrid.cpp:812: error: ‘PetscErrorCode’ does not name a type
PetscCompGrid.cpp:917: error: ‘PetscErrorCode’ does not name a type
PetscCompGrid.cpp:964: error: ‘PetscErrorCode’ does not name a type
make[3]: *** [o/2d.Linux.64.mpicxx.mpif90.DEBUG.PETSC/PetscCompGrid.o]
Error 1
make[2]: *** [AMRElliptic] Error 2
make[1]: *** [AMRElliptic] Error 2
make: *** [execPETSc] Error 2

-- 
Best regards,

Feng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161222/be187635/attachment-0001.html>


More information about the petsc-users mailing list