[petsc-dev] make test after make install is not right

Satish Balay balay at mcs.anl.gov
Mon Jul 28 10:54:15 CDT 2014


On Sun, 27 Jul 2014, Barry Smith wrote:

> 
>   Our 
> 
>      make install
>      unset PETSC_ARCH
>      export PETSC_DIR=/installed_location
>      make test 
> 
>   appears to be not working correctly

- Hm - 'make all' prints instructions for 'make install':

=========================================
gmake[1]: Leaving directory `/home/balay/petsc'
Now to install the libraries do:
make PETSC_DIR=/home/balay/petsc PETSC_ARCH=arch-mpich install
=========================================

- And 'make install' prints instructions on 'make test'

$ make PETSC_DIR=/home/balay/petsc PETSC_ARCH=arch-mpich install
*** Using PETSC_DIR=/home/balay/petsc PETSC_ARCH=arch-mpich ***
*** Installing PETSc at prefix location: /home/balay/tmp/petsc-install  ***
====================================
Install complete. It is useable with PETSC_DIR=/home/balay/tmp/petsc-install [and no more PETSC_ARCH].
Now to check if the libraries are working do (in current directory):
make PETSC_DIR=/home/balay/tmp/petsc-install test
====================================

- With the above instructions - make test works - but with a minor error.

$ make PETSC_DIR=/home/balay/tmp/petsc-install test
Running test examples to verify correct installation
Using PETSC_DIR=/home/balay/tmp/petsc-install and PETSC_ARCH=arch-mpich
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: /home/balay/tmp/petsc-install/arch-mpich/include/petscconf.h: No such file or directory
Fortran example src/snes/examples/tutorials/ex5f run successfully with 1 MPI process
Completed test examples
=========================================
Now to evaluate the computer systems you plan use - do:
make PETSC_DIR=/home/balay/tmp/petsc-install PETSC_ARCH=arch-mpich streams NPMAX=<number of MPI processes you intend to use>


- This can be fixed with using PETSC_ARCH='' - Yeah - using both build
makefiles and install makefiles has too many corner cases - but I'm not sure
if there is a better way..

$ make PETSC_DIR=/home/balay/tmp/petsc-install PETSC_ARCH='' test
Running test examples to verify correct installation
Using PETSC_DIR=/home/balay/tmp/petsc-install and PETSC_ARCH=
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
Fortran example src/snes/examples/tutorials/ex5f run successfully with 1 MPI process
Completed test examples
=========================================
Now to evaluate the computer systems you plan use - do:
make PETSC_DIR=/home/balay/tmp/petsc-install PETSC_ARCH= streams NPMAX=<number of MPI processes you intend to use>


Note: the primary fix is to specifying 'PETSC_DIR' & PETSC_ARCH from
command line to 'make' to override the defaults in conf/petscvariables

Satish

> 
> ~/Src/petsc  maint $ export PETSC_DIR=/Users/barrysmith/petsc-prefix
> ~/Src/petsc  maint $ make test_build
> Running test examples to verify correct installation
> Using PETSC_DIR=/Users/barrysmith/Src/petsc and PETSC_ARCH=arch-prefix
> 
> <<<<<<<<<<   ^^^^ Note here it lists the configured PETSC_DIR and PETSC_ARCH
> 
> 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
> Fortran example src/snes/examples/tutorials/ex5f run successfully with 1 MPI process
> Completed test examples
> ~/Src/petsc  maint $ echo $PETSC_DIR
> /Users/barrysmith/petsc-prefix
> ~/Src/petsc  maint $ echo $PETSC_ARCH
> 
> ~/Src/petsc  maint $ ls conf/
> adic.init          adicmf.init        gmakegen.py        rules              test.log           variables          
> adicmastercontrol  adicmfb.init       petscvariables     test               testmaingen.pyc    
> ~/Src/petsc  maint $ more conf/petscvariables 
> PETSC_ARCH=arch-prefix
> PETSC_DIR=/Users/barrysmith/Src/petsc
> include /Users/barrysmith/Src/petsc/arch-prefix/conf/petscvariables
> 
> <<<<<<<<<<<<<   At the top of makefile is 
> 
> # next line defines PETSC_DIR and PETSC_ARCH if they are not set
> include ././${PETSC_ARCH}/conf/petscvariables
> include ${PETSC_DIR}/conf/variables
> include ${PETSC_DIR}/conf/rules
> include ${PETSC_DIR}/conf/test
> 
> <<<<<<<<<<<<<<<< This means the PETSC_DIR is ALWAYS set to the configure one, not the installed one
> 
> ~/Src/petsc  maint $ rm conf/petscvariables 
> ~/Src/petsc  maint $ make test_build
> makefile:15: conf/petscvariables: No such file or directory
> make: *** No rule to make target `conf/petscvariables'.  Stop.
> 
> 
> <<<<<<<<<<<<<<<<<  How to fix this? should make install remove the stuff in conf/petscvariables?
> 
> ~/Src/petsc  maint $ touch conf/petscvariables
> ~/Src/petsc  maint $ make test_build
> Running test examples to verify correct installation
> Using PETSC_DIR=/Users/barrysmith/petsc-prefix and PETSC_ARCH=
> 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
> Fortran example src/snes/examples/tutorials/ex5f run successfully with 1 MPI process
> Completed test examples
> 
> <<<<<<<<<<<<<<<< That at least uses the right libraries/includes to run the tests
> 
>   
> 
> 
> 
> 
> 
> 




More information about the petsc-dev mailing list