PETSc
PETSc, the Portable Extensible Toolkit for Scientific Computation, is a suite of data structures and routines for the uni- and parallel processor solution of large-scale scientific application problems modeled by partial differential equations. PETSc employs the MPI standard for all message-passing communication. The code is written in a data-structure-neutral manner to enable easy reuse and flexibility.
PETSc integrates a hierarchy of components, enabling the user to employ the level of abstraction that is most natural for a particular problem. Some of the components are:
- Mat - a suite of data structures and code for the manipulation of parallel sparse matrices;
- PC - a collection of preconditioners;
- KSP - data-structure-neutral implementations of many popular Krylov space iterative methods;
- SLES - a higher-level interface for the solution of large-scale linear systems;
- SNES - data-structure-neutral implementations of Newton-like methods for nonlinear systems.
Installed on bigben, pople and warhol.
Bigben Usage
- Prepare a batch job containing commands to do the following:
- Load the Petsc module with
module load petsc
which defines the necessary environment variables. Note that you can determine the default version of PETSc by typing:module show petsc
- Compile your program. Use the appropriate version of PETSc:
-
-O, Optimized for Fortran or C
-g, Debug version for Fortran or C
-O_c++, Optimized for C++
-g_c++, Debug version for C++
For example, to use the debug version, in the C shell:setenv BOPT g
or, when compiling:make BOPT=g prog
- Use pbsyod
to execute the program.
pbsyod -size $PBS_O_SIZE prog
- Load the Petsc module with
- Submit the batch job with the qsub command.
Sample job
See the sample bigben petsc jobs.
Pople Usage
- Prepare a batch job containing commands to do the following:
- Set up the module command for batch usage, depending on the shell you use.
- Load the Petsc module with
module load petsc
which defines the necessary environment variables. Note that you can determine the default version of PETSc by typing:module show petsc
- Compile your program. Use the appropriate version of PETSc:
-
-O, Optimized for Fortran or C
-g, Debug version for Fortran or C
-O_c++, Optimized for C++
-g_c++, Debug version for C++
For example, to use the debug version, in the C shell:setenv BOPT g
or, when compiling:make BOPT=g prog
- Use the mpirun
to execute the program.
mpirun -np x prog
where x is the number of cores. This should be the same number set with the PBS ncpus directive.
- Submit the batch job with the qsub command.
Sample job
See the sample pople petsc jobs.
Warhol Usage
- Prepare a batch job containing commands to do the following:
- Load the Petsc module with
module load petsc
which defines the necessary environment variables. - Compile your program. Use the appropriate version of PETSc:
-
-O, Optimized for Fortran or C
-g, Debug version for Fortran or C
-O_c++, Optimized for C++
-g_c++, Debug version for C++
For example, to use the debug version, in the C shell:setenv BOPT g
or, when compiling:make BOPT=g prog
- Use the mpirun
to execute the program.
mpirun -np x prog
where x is the number of cores. This should be the same number set with the PBS nodes=x:ppn=y directive.
- Load the Petsc module with
- Submit the batch job with the qsub command.
Sample job
See the sample warhol petsc jobs.