[petsc-users] petsc 3.4:

Matteo Parsani parsani.matteo at gmail.com
Wed May 15 10:03:18 CDT 2013


Thanks Satish and Lisandro. It not a problem at all because PETSc is usable
but such an if would avoid that message.

Regarding the compilation, installation and test instruction printed a
screen, maybe also there it would be nice to have some if statements.

Thank you again.




On Wed, May 15, 2013 at 10:32 AM, Satish Balay <balay at mcs.anl.gov> wrote:

> On Wed, 15 May 2013, Lisandro Dalcin wrote:
>
> > On 15 May 2013 17:12, Satish Balay <balay at mcs.anl.gov> wrote:
> > > 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]
> > >
> >
> > I was not clear enough. I'm talking about a shell "if", something like
> >
> > if [-f ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h]; then \
> >    egrep ...
> > else
> >    egrep ....
> > fi
>
> Sure - I was hoping for a: 'if [ "${PREFIX}" = "" ]' - but currently
> configure doesn't appear so set such a thing. We could add that - or
> just use the if statement of petscconf.h as you suggest.
>
> Satish
>
> -----
>
> diff --git a/makefile b/makefile
> index 372e593..9bc5cfb 100644
> --- a/makefile
> +++ b/makefile
> @@ -138,7 +138,11 @@ test_build:
>         @cd src/snes/examples/tutorials >/dev/null; ${OMAKE}
> PETSC_ARCH=${PETSC_ARCH}  PETSC_DIR=${PETSC_DIR} clean
>         @cd src/snes/examples/tutorials >/dev/null; ${OMAKE}
> PETSC_ARCH=${PETSC_ARCH}  PETSC_DIR=${PETSC_DIR} testex19
>         @if [ "${FC}" != "" ]; then \
> -          egrep "^#define PETSC_USE_FORTRAN_DATATYPES 1"
> ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h | tee .ftn-dtype.log >
> /dev/null; \
> +          if [ -f ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h ]; then \
> +            egrep "^#define PETSC_USE_FORTRAN_DATATYPES 1"
> ${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h | tee .ftn-dtype.log >
> /dev/null; \
> +          else \
> +            egrep "^#define PETSC_USE_FORTRAN_DATATYPES 1"
> ${PETSC_DIR}/include/petscconf.h | tee .ftn-dtype.log > /dev/null; \
> +          fi; \
>            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;
>
>


-- 
Matteo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130515/79eef8d2/attachment.html>


More information about the petsc-users mailing list