Difference between revisions of "PETSc"

From Tau Wiki
Jump to: navigation, search
 
(Performance results)
 
(5 intermediate revisions by the same user not shown)
Line 25: Line 25:
 
  ./configure --with-cc=gcc --with-fc=gfortran --download-f-blas-lapack=1 --download-mpich=1
 
  ./configure --with-cc=gcc --with-fc=gfortran --download-f-blas-lapack=1 --download-mpich=1
  
== Configuring/Compile TAU ==
+
== Configuring/Compile PDT and TAU ==
  
 +
PDT:
 +
./configure -GNU
 +
make all
 +
make install
 +
 +
TAU:
 
  ./configure -pdt=<path to PDT> -cc=gcc -c++=g++ -fortran=gnu -mpiinc=<path to petsc-3.2-p7>/arch-linux2-c-debug/include -mpilib=<path to petsc-3.2-p7>/arch-linux2-c-debug/lib -mpilibrary=-lmpichf90#-lmpich#-lmpl -DISABLESHARED
 
  ./configure -pdt=<path to PDT> -cc=gcc -c++=g++ -fortran=gnu -mpiinc=<path to petsc-3.2-p7>/arch-linux2-c-debug/include -mpilib=<path to petsc-3.2-p7>/arch-linux2-c-debug/lib -mpilibrary=-lmpichf90#-lmpich#-lmpl -DISABLESHARED
 
  make install
 
  make install
Line 32: Line 38:
 
== Compile PETSc ==
 
== Compile PETSc ==
 
  export TAU_MAKEFILE=<path to TAU>/<arch>/lib/Makefile.tau-mpi-pdt
 
  export TAU_MAKEFILE=<path to TAU>/<arch>/lib/Makefile.tau-mpi-pdt
  export TAU_OPTIONS='-optVerbose -optNoRevert -optTau="-rn PetscFunctionReturn -rv PetscFunctionReturnVoid\(\)"'
+
  export TAU_OPTIONS='-optVerbose -optNoRevert -optTau="-rn PetscFunctionReturn -rv PetscFunctionReturnVoid\(\)" -optPdtCOpts="-D_MM_HINT_NTA=0"'
  make all PCC=tau_cc.sh FC=tau_f90.sh PCC_LINKER=tau_cc.sh FC_LINKER=tau_f90.sh
+
  make all-legacy PCC=tau_cc.sh FC=tau_f90.sh PCC_LINKER=tau_cc.sh FC_LINKER=tau_f90.sh
 
  make test PCC=tau_cc.sh FC=tau_f90.sh PCC_LINKER=tau_cc.sh FC_LINKER=tau_f90.sh
 
  make test PCC=tau_cc.sh FC=tau_f90.sh PCC_LINKER=tau_cc.sh FC_LINKER=tau_f90.sh
  
Line 40: Line 46:
 
  cd src/snes/examples/tutorials
 
  cd src/snes/examples/tutorials
 
  make ex19 PCC=tau_cc.sh FC=tau_f90.sh PCC_LINKER=tau_cc.sh FC_LINKER=tau_f90.sh
 
  make ex19 PCC=tau_cc.sh FC=tau_f90.sh PCC_LINKER=tau_cc.sh FC_LINKER=tau_f90.sh
  ../../../../arch-linux2-c-debug/bin/mpirun -np 2 ./ex19
+
  ../../../../arch-linux2-c-debug/bin/mpiexec -n 4 ./ex19 -da_grid_x 20 -da_grid_y 20 -lidvelocity 1 -snes_ksp_ew -pc_mg_smoothdown 2 -pc_mg_smoothup 2
 +
 
 +
== Performance results ==
 +
 
 +
For example a 2 processor run of ex19 you should see:
 +
paraprof
 +
 
 +
 
 +
[[Image:petsc-ex19.png|950px]]

Latest revision as of 22:32, 4 June 2012


Background

Link Code Version Machine Date
ANL website tar ball 3.2-p7 Manticore June 2012


Configure PETSc

export PETSC_DIR=`pwd`
./configure --with-cc=gcc --with-fc=gfortran --download-f-blas-lapack=1 --download-mpich=1

Configuring/Compile PDT and TAU

PDT:

./configure -GNU
make all
make install

TAU:

./configure -pdt=<path to PDT> -cc=gcc -c++=g++ -fortran=gnu -mpiinc=<path to petsc-3.2-p7>/arch-linux2-c-debug/include -mpilib=<path to petsc-3.2-p7>/arch-linux2-c-debug/lib -mpilibrary=-lmpichf90#-lmpich#-lmpl -DISABLESHARED
make install

Compile PETSc

export TAU_MAKEFILE=<path to TAU>/<arch>/lib/Makefile.tau-mpi-pdt
export TAU_OPTIONS='-optVerbose -optNoRevert -optTau="-rn PetscFunctionReturn -rv PetscFunctionReturnVoid\(\)" -optPdtCOpts="-D_MM_HINT_NTA=0"'
make all-legacy PCC=tau_cc.sh FC=tau_f90.sh PCC_LINKER=tau_cc.sh FC_LINKER=tau_f90.sh
make test PCC=tau_cc.sh FC=tau_f90.sh PCC_LINKER=tau_cc.sh FC_LINKER=tau_f90.sh

If you have any other examples you would like to run (for example, ex19) do the following:

cd src/snes/examples/tutorials
make ex19 PCC=tau_cc.sh FC=tau_f90.sh PCC_LINKER=tau_cc.sh FC_LINKER=tau_f90.sh
../../../../arch-linux2-c-debug/bin/mpiexec -n 4 ./ex19  -da_grid_x 20 -da_grid_y 20 -lidvelocity 1 -snes_ksp_ew -pc_mg_smoothdown 2 -pc_mg_smoothup 2

Performance results

For example a 2 processor run of ex19 you should see:

paraprof


Petsc-ex19.png