[petsc-dev] Stale lib/petsc/conf/petscvariables interferes with prefix tests
Satish Balay
balay at mcs.anl.gov
Thu Mar 8 21:14:17 CST 2018
On Fri, 9 Mar 2018, Jed Brown wrote:
> Satish Balay <balay at mcs.anl.gov> writes:
>
> > On Thu, 8 Mar 2018, Jed Brown wrote:
> >
> >> > Alternative would be to use /tmp - but I hesitated to do that.. [as I
> >> > would have to cleanly delete things I write there, worry about
> >> > multiple concurrent builds etc..]
> >>
> >> That's what mktemp is for.
> >
> > diff --git a/makefile b/makefile
> > index 4b25508aff..53f8e34865 100644
> > --- a/makefile
> > +++ b/makefile
> > @@ -119,7 +119,10 @@ info:
> > fi
> > - at echo "-----------------------------------------"
> > - at echo "Using system modules: ${LOADEDMODULES}"
> > - - at echo Using mpi.h: `echo '#include <mpi.h>' > ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/mpitest.c; ${CPP} ${PETSC_CCPPFLAGS} ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/mpitest.c |grep 'mpi\.h' | ( head -1 ; cat > /dev/null )`
> > + - at TESTFILE=`mktemp -q /tmp/petscmpi-XXXXXXXX.c` && \
> > + echo '#include <mpi.h>' > $${TESTFILE} && \
> > + BUF=`${CPP} ${PETSC_CCPPFLAGS} $${TESTFILE} |grep 'mpi\.h' | ( head -1 ; cat > /dev/null )` && \
> > + echo Using mpi.h: $${BUF} && ${RM} $${TESTFILE}
>
> $(RM) $${TESTFILE}
>
> should probably be executed regardless of whether the other stuff succeeds.
Ok - also changed 'mktemp -q /tmp/petscmpi-XXXXXXXX.c' to 'mktemp -q -t petscmpi-XXXXXXXX.c'
Presumably 6a7405f8e8874e272f9c21704f3a2fdb6ad1a9b1 should be reverted - and this patch added to jed/petscvariables-var?
Satish
---------
diff --git a/makefile b/makefile
index 4b25508aff..eca5c18cb1 100644
--- a/makefile
+++ b/makefile
@@ -119,7 +119,10 @@ info:
fi
- at echo "-----------------------------------------"
- at echo "Using system modules: ${LOADEDMODULES}"
- - at echo Using mpi.h: `echo '#include <mpi.h>' > ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/mpitest.c; ${CPP} ${PETSC_CCPPFLAGS} ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/mpitest.c |grep 'mpi\.h' | ( head -1 ; cat > /dev/null )`
+ - at TESTFILE=`mktemp -q -t petscmpi-XXXXXXXX.c` && \
+ echo '#include <mpi.h>' > $${TESTFILE} && \
+ BUF=`${CPP} ${PETSC_CCPPFLAGS} $${TESTFILE} |grep 'mpi\.h' | ( head -1 ; cat > /dev/null )` && \
+ echo Using mpi.h: $${BUF}; ${RM} $${TESTFILE}
- at echo "-----------------------------------------"
- at echo "Using libraries: ${PETSC_LIB}"
- at echo "------------------------------------------"
More information about the petsc-dev
mailing list