When configuring and making PETSc, PETSC_DIR can be empty or point to the directory with the PETSc source
If you used --prefix to configure and install PETSc then When using PETSc to compile other source code and using a makefile that utilizes PETSC_DIR, then PETSC_DIR needs to point to the --prefix location PETSC_ARCH should be empty since it is not used for --prefix installs > On Jul 17, 2023, at 2:06 PM, philliprusso via petsc-users > <petsc-users@mcs.anl.gov> wrote: > > So I have this to go by: > export PETSC_DIR=/absolute/path/to/petsc > > export PETSC_ARCH=linux-gnu-c-debug > > PETSC_DIR Is that the installation/destination path or the path where the > source code is? I feel confused.... > > So there is a destination folder that dolfinx project wnats for petsc. I have > an idea it might want /usr/local/include not sure of everything quite yet... > > > > > Sent with Proton Mail secure email. > > ------- Original Message ------- > On Monday, July 17th, 2023 at 8:08 AM, Satish Balay <ba...@mcs.anl.gov> wrote: > > >> We do not recommend installing PETSc in /usr/include [aka --prefix=/usr]. >> Now you have some petsc includes here that will potentially conflict with >> any other install of PETSc you might attempt. >> >> You might have to manually check - and delete PETSc installed files from >> here. >> >> For most uses - one can install PETSc in $HOME >> >> If you need a common install - suggest --prefix=/usr/local/petsc-version >> >> Satish >> >> On Sun, 16 Jul 2023, philliprusso via petsc-users wrote: >> >>> I cloned petsc source for use with dolfinx project. So after .configure mak >>> sudo make install I found there was some type of difficulty with the >>> destination directory so I copied the files manually into usr/includes of >>> Ubuntu 22.04 jammy. So some petsc header files are now found for compiling >>> cpp dolfinx source code but petscconf.h still not found by dolfinxs source >>> tree of header files. Anyone know how to remedy this so dolfinx cpps can >>> find petsscconf.h that g++ is claiming as missing? Thank you! >>> >>> Sent with Proton Mail secure email.