[petsc-users] cannot open source file "petsc.h"

Jed Brown jed at jedbrown.org
Thu Feb 3 17:12:03 CST 2022


"Evstafyeva,Tamara" <te307 at cam.ac.uk> writes:

> Thanks for your prompt reply. I am attaching the makefile; the line for execution “make all -j 4”
>
> I guess using both was my attempt at trying multiple things until they work – using either one or the other produced the same error for me.

petsc.pc isn't being used here. What's probably happening is that Chombo's mk/Make.test has rules (not just variables) and those rules are replacing PETSc rules. Mark Adams (Cc'd) works with Chombo and will know for sure. I'm mildly afraid of Chombo and would use Makefile.user to extract exactly the information you want from PETSc.

Alternatively, include only ${PETSC_DIR}/lib/petsc/conf/variables from PETSc and append the variables as needed to Chombo. The downside of this is that some variables are not namespaced so there could be conflicts depending on Chombo's naming conventions.


More information about the petsc-users mailing list