<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 22, 2016 at 11:54 AM, Sharp Stone <span dir="ltr"><<a href="mailto:thronesf@gmail.com" target="_blank">thronesf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:small">Mat and Satish,<br><br>Thank you for your replies. I'm using Chombo-3.2 + Petsc-3.7.4. I have not yet received replies from Chombo. So I have to ask you guys to see if my paths have been correctly set up. When I changed the #include <petsc-private/pcimpl.h> to #include<petsc/private/pcimpl.<wbr>h>, I still got the errors "PetscCompGrid.H:19:34: error: petsc-private/pcimpl.h: No such file or directory". Highly appreciate your help!</div></div></blockquote><div><br></div><div>Clearly there was another include. Satish is right that you need to get the right version for Chombo.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 22, 2016 at 12:05 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Thu, Dec 22, 2016 at 11:01 AM, Sharp Stone <span dir="ltr"><<a href="mailto:thronesf@gmail.com" target="_blank">thronesf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:small">Dear folks,<br><br></div><div 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></div></div></blockquote><div><br></div></span><div>You might have a version mismatch here. PETSc changed the directory structure to conform better to the Linux standard</div><div><br></div><div> $PETSC_DIR/include/petsc-priva<wbr>te</div><div><br></div><div>became</div><div><br></div><div> $PETSC_DIR/include/petsc/priva<wbr>te</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><div class="m_-3782851227544465572h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:small">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()(FArray<wbr>Box&, 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)->Petsc<wbr>CompGrid::m_GIDs’, which is of non-class type ‘int’<br>PetscCompGrid.cpp:219: error: request for member ‘resize’ in ‘((PetscCompGrid*)this)->Petsc<wbr>CompGrid::m_crsSupportGIDs’, which is of non-class type ‘int’<br>PetscCompGrid.cpp:220: error: request for member ‘resize’ in ‘((PetscCompGrid*)this)->Petsc<wbr>CompGrid::m_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(IntVec<wbr>t, 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(In<wbr>tVect, 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.D<wbr>EBUG.PETSC/PetscCompGrid.o] Error 1<br>make[2]: *** [AMRElliptic] Error 2<br>make[1]: *** [AMRElliptic] Error 2<br>make: *** [execPETSc] Error 2<span class="m_-3782851227544465572m_-6889178274800731143HOEnZb"><font color="#888888"><br clear="all"></font></span></div><span class="m_-3782851227544465572m_-6889178274800731143HOEnZb"><font color="#888888"><br>-- <br><div class="m_-3782851227544465572m_-6889178274800731143m_-360595610561459726gmail_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>
</font></span></div>
</blockquote></div></div></div><span class="m_-3782851227544465572HOEnZb"><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-3782851227544465572m_-6889178274800731143gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</font></span></font></span></div></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-3782851227544465572gmail_signature" data-smartmail="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>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>