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