[petsc-dev] Stale lib/petsc/conf/petscvariables interferes with prefix tests

Jed Brown jed at jedbrown.org
Thu Mar 8 16:43:14 CST 2018


Satish Balay <balay at mcs.anl.gov> writes:

> On Thu, 8 Mar 2018, Jed Brown wrote:
>
>> Satish Balay <balay at mcs.anl.gov> writes:
>> 
>> > On Thu, 8 Mar 2018, Jed Brown wrote:
>> >
>> >> Satish Balay <balay at mcs.anl.gov> writes:
>> >> 
>> >> 
>> >> Related question: if the prefix install is read-only, then this line in
>> >> "make info" fails.
>> >> 
>> >> 	- 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 )`
>> >> 
>> >
>> > Hm - this is primarily used by 'make all' - [that should always have write access to ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/]
>> >
>> > And I see we've previously used it from testexamples, testfortran etc targets - but these should now be removed?
>> >
>> >> 
>> >> Are there CPP that can't use stdin?
>> >
>> > Windows.
>> 
>> Yuck, so I should discard this commit and we just ask people not to call
>> "make info" with a prefix install?  I ran into this while testing the
>> previous commit -- it was easier to run "make info" than "make install".
>> 
>> https://bitbucket.org/petsc/petsc/commits/6a7405f8e8874e272f9c21704f3a2fdb6ad1a9b1
>
> But 'make info' is not used after the build - so should we worry about getting this working after the build?

It can be run manually, as I was doing to test a different condition.  I
agree that it is not crucial, though it is sometimes more convenient
than digging into the source files (like grepping petscconf.h and
petscvariables).

> 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.


More information about the petsc-dev mailing list