← Back to team overview

dolfin team mailing list archive

Re: PETSC_ARCH

 

On Tue, Aug 17, 2010 at 07:17:29PM +0200, Anders Logg wrote:
> On Tue, Aug 17, 2010 at 07:06:43PM +0200, Anders Logg wrote:
> > On Tue, Aug 17, 2010 at 06:01:46PM +0100, Garth N. Wells wrote:
> > > On Tue, 2010-08-17 at 18:46 +0200, Anders Logg wrote:
> > > > Why do we need to set PETSC_ARCH? We didn't before. Is there a way to
> > > > figure it out?
> > > >
> > >
> > > In general, no. It's possible (and common) to have a debug and an
> > > optimised version installed side-by-side (there are more possibilities)
> > > than just optimised and debug). The libs go in
> > >
> > >   ${PETSC_DIR}/${PETSC_ARCH}/lib
> > >
> > > If you do a regular
> > >
> > >    ./configure --prefix=/foo/bar
> > >
> > > then I don't think that it's required since there will be not
> > > distinction between a debug and an optimised version.
> >
> > There seems to be some code for searching for PETSC_ARCH in the
> > FindPETSc script:
> >
> > set (_petsc_arches
> >     $ENV{PETSC_ARCH}                   # If set, use environment
> >     variable first
> >     ${DEBIAN_FLAVORS}  # Debian defaults
> >     x86_64-unknown-linux-gnu i386-unknown-linux-gnu)
> >
> > But it doesn't include the following two options that we have in the
> > old Scons script:
> >
> > elif os.path.exists(getPetscDir(sconsEnv=sconsEnv)+"/linux-gnu-c-opt"):
> >         return "linux-gnu-c-opt"
> > elif os.path.exists(getPetscDir(sconsEnv=sconsEnv)+"/lib/linux-gnu-c-opt"):
> >         return "linux-gnu-c-opt"
>
> I see now these two are included in debian_arches.

I don't have a regular PETSC_DIR but rather an installed version of
PETSc (installed by Dorsal). It looks like it should work anyway since
then PETSC_ARCH can be empty and the following test will still find
petsconf.h in $prefix/include:

if (EXISTS ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h)   # > 2.3.3

However, the PETSc test is still failing for me because of problems
with a missing mpi.h:

/usr/bin/c++    -DBOOST_UBLAS_NDEBUG
-DMULTIPASS_TEST_1_petsc_works_minimal
-I/home/logg/scratch/lib/fenics-dev/include   -o
CMakeFiles/cmTryCompileExec.dir/src.cxx.o -c
/home/logg/scratch/src/dolfin-dev/build/CMakeFiles/CMakeTmp/src.cxx

In file included from /home/logg/scratch/src/dolfin-dev/build/CMakeFiles/CMakeTmp/src.cxx:3:
/home/logg/scratch/lib/fenics-dev/include/petsc.h:139:17: error:
mpi.h: Filen eller katalogen finns inte

My mpi.h is in /usr/include/openmpi (symlinked to
/usr/lib/openmpi/include).

I don't see any settings for MPI include path in the PETSc conf
script.

--
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References