[petsc-users] petsc 3.4:
Satish Balay
balay at mcs.anl.gov
Wed May 15 09:12:25 CDT 2013
On Wed, 15 May 2013, Lisandro Dalcin wrote:
> On 15 May 2013 16:54, Satish Balay <balay at mcs.anl.gov> wrote:
> > On Wed, 15 May 2013, Matteo Parsani wrote:
> >
> >> Hello Satish,
> >> Lisandro has found that in the make file we have
> >>
> >> include ././${PETSC_ARCH}/conf/petscvariables
> >
> > we try to support too many ways of installing petsc [with prefix/
> > without prefix, with a defaut PETSC_ARCH, without PETSC_DIR set etc..]
> > And we need this line for users who forget to set PETSC_ARCH in a
> > non-prefix build. [to pick up a defaut PETSC_ARCH]
> >
>
>
> Satish, I think all what is needed is to fix a little the test_build
> target. Basically, test if the file under PETSC_ARCH exists, otherwise
> use PETSC_DIR/include/petscconf.h . Perhpas I'm missing something, but
> this should be near to work.
We've avoided using gnu make extensions - so there is no usage of 'if'
directives in petsc makefiles. [and we've used include directive as
alternative]
But there is a plan to switch over to gnumake - in which case all of this
code can perhaps be reworked.
And I'm able to reproduce the problem. The issue is not the above line - but
the following [from target 'test']:
>>>>>>
@if [ "${FC}" != "" ]; then \
egrep "^#define PETSC_USE_FORTRAN_DATATYPES 1" ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h | tee .ftn-dtype.log > /dev/null; \
if test -s .ftn-dtype.log; then F90TEST="testex5f90t"; else F90TEST="testex5f"; fi; ${RM} .ftn-dtype.log; \
cd src/snes/examples/tutorials >/dev/null; ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} $${F90TEST}; \
fi;
<<<<<<
balay at petsc^/sandbox/balay/petsc-3.4.0 $ make PETSC_ARCH=arch-linux2-c-debug PETSC_DIR=/sandbox/balay/petsc-prefix test
Running test examples to verify correct installation
Using PETSC_DIR=/sandbox/balay/petsc-prefix and PETSC_ARCH=arch-linux2-c-debug
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 2 MPI processes
egrep: /sandbox/balay/petsc-prefix/arch-linux2-c-debug/include/petscconf.h: No such file or directory
Fortran example src/snes/examples/tutorials/ex5f run successfully with 1 MPI process
Completed test examples
balay at petsc^/sandbox/balay/petsc-3.4.0 $
Perhaps a fix is possible. [by somehow figuring out that this is a
prefix build - and flagging an error if PETSC_ARCH is detected - in
'test:' target]
Satish
More information about the petsc-users
mailing list