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

Evstafyeva,Tamara te307 at cam.ac.uk
Thu Feb 3 13:52:39 CST 2022


Hi Satish,

Thanks for the reply, I am afraid it produces the same error still.

From: Satish Balay <balay at mcs.anl.gov>
Date: Thursday, 3 February 2022, 19:39
To: Evstafyeva,Tamara <te307 at cam.ac.uk>
Cc: petsc-users <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] cannot open source file "petsc.h"
You an try the following:

- remove
PETSC_INCLUDE=/cosma/home/dp092/dc-evst1/petsc/include
PETSC_LIB=/cosma/home/dp092/dc-evst1/petsc/lib

- remove
include ${PETSC_DIR}/lib/petsc/conf/rules
include ${PETSC_DIR}/lib/petsc/conf/test

- remove
petsc.pc := $(PETSC_DIR)/$(PETSC_ARCH)/lib/pkgconfig/petsc.pc

i.e only keep:
include ${PETSC_DIR}/lib/petsc/conf/variables

You have:

LINK += $(PETSC_LIB)

Similarly you need:
cxxcppflags += $(PETSC_CXXCPPFLAGS)

Satish

On Thu, 3 Feb 2022, Evstafyeva,Tamara wrote:

> Dear Satish,
>
> Thank you for getting back!
>
> I am attaching mu current GNUmakefile and the logs for it and the ex19.
>
> Let me know if anything else is needed and thanks in advance,
>
> Tamara
>
> From: Satish Balay <balay at mcs.anl.gov>
> Date: Thursday, 3 February 2022, 18:53
> To: Evstafyeva,Tamara <te307 at cam.ac.uk>
> Cc: petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
> Subject: Re: [petsc-users] cannot open source file "petsc.h"
> Can you send your current makefile?
>
> Also send compile log [including errors] when building with this makefile.
>
> Also send us compile log from:
>
> cd src/snes/tutorials
> make ex19
>
> Satish
>
> On Thu, 3 Feb 2022, Evstafyeva,Tamara wrote:
>
> > To whom it may concern,
> >
> > I am using a code that utilizes some of the PETSC capabilities. After configuring and installing PETSC on a cluster, I have set my environment variables $PETSC_DIR and $PETSC_ARCH. The code using PETSC compiles using GNUMakefile and so using instructions on the website and in Makefile.user I added the following lines to the make file:
> >
> >
> > include ${PETSC_DIR}/lib/petsc/conf/variables
> >
> > include ${PETSC_DIR}/lib/petsc/conf/rules
> >
> > include ${PETSC_DIR}/lib/petsc/conf/test
> >
> >
> > petsc.pc := $(PETSC_DIR)/$(PETSC_ARCH)/lib/pkgconfig/petsc.pc
> >
> > When compiling the code I get that the head files of PETSC are not recognized:
> >
> > catastrophic error: cannot open source file "petsc.h"
> >
> > This seems like a trivial problem, however I cannot seem to figure out what exactly went wrong. I’d expect this cannot be installation problem, and most likely the linking? I would really appreciate some direction on this problem.
> >
> > Thank you,
> >
> > Tamara
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220203/3eba4fb6/attachment.html>


More information about the petsc-users mailing list