Access to PETSc Toolkit on JUROPA

PETSc has been installed on JUROPA in a basic version using only LAPACK from mkl in /usr/local/PETSc/3.0.0-p10-basic and configured with --with-scalar-type=complex in /usr/local/PETSc/3.0.0-p10-basic-complex. Version 3.1-p0 and 3.1-p8 are available in the same way.

Preparations necessary to use PETSc on JUROPA
Versions 3.0.0-p10-basic and basic-complex as well as versions 3.1-p0-basic and basic-complex are compiled with intel/11.1/059 and the corresponding mkl/10.2.2.025.

# define environment variable PETSC_DIR by calling

module load PETSc/3.0.0-p10-basic  for 3.0.0 basic real version
module load PETSc/3.0.0-p10-basic-complex  for 3.0.0 basic complex version
module load PETSc/3.1-p0-basic  for 3.1 basic real version
module load PETSc/3.1-p0-basic-complex  for 3.1 basic complex version

Versions 3.1-p8-basic and basic-complex are compiled with intel/12.0.4. To get that version of PETSc you also have to use the same compiler and mkl version.

# define environment variable PETSC_DIR by calling

module unload intel
module unload mkl
module load intel/12.0.4
module load PETSc/3.1-p8-basic  for 3.1 basic real version
module load PETSc/3.1-p8-basic-complex  for 3.1 basic complex version

If you don't want to use the PETSc makefiles make sure that your makefile contains the statement

include  ${PETSC_DIR}/conf/variables
include  ${PETSC_DIR}/conf/rules

Examples

Examples may be found in several subdirectories of the directory /usr/local/PETSc/3.1-p0-basic/src/

To run for instance ex1 from /usr/local/PETSc/3.1-p0-basic/src/vec/vec/examples/tutorials you have to do the following:

# copy ex1.c and the makefile to the current directory

cp   /usr/local/PETSc/3.1-p0-basic/src/vec/vec/examples/tutorials/ex1.c   .    
cp   /usr/local/PETSc/3.1-p0-basic/src/vec/vec/examples/tutorials/makefile   .    

# compile and link the example code
make   ex1     

To execute the example on 2 processors you have to write an batchfile runex1 with the following commands:

#!/bin/bash   -x
#MSUB   -l nodes=1:ppn=8
module   load   petsc/3.1-p0-basic
mpiexec   -np 2   ex1

If you used petsc/3.1-p8-basic and an example from there your file runex1 should look like the following:

#!/bin/bash   -x
#MSUB   -l nodes=1:ppn=8
module   load   petsc/3.1-p8-basic
module   unload   mkl
module   unload   intel
module   load   intel/12.0.4
mpiexec   -np 2   ex1

and to submit it by saying:

msub   runex1


last change 24.02.2011 | Math Admin | Print