NERSCPowering Scientific Discovery Since 1974

PETSc

Description and Overview

PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. It employs the MPI standard for parallelism.

On Cori and Edison PETSc is maintained as one of the Cray supported software packages.  

Cray PETSc includes the following packages:

  • MUMPS 
  • SuperLU 
  • SuperLU_dist 
  • ParMETIS 
  • HYPRE

How to Access PETSc at NERSC

To see all the available PETSc modules on a given machine use: module avail cray-petsc on Cori and Edison.

To select the default version use module load cray-petsc.  To select a specific version use, for example, module load petsc-complex/3.6.1.0.  

To get some specific usage information for a particular version use, for example, module help petsc-complex/3.2.02 .

Using PETSc on Edison and Cori

% module load cray-petsc
% ftn mycode.F90

Documentation

On the Cray systems, after you have loaded a Cray-installed PETSc modulefile, you can use man intro_petsc to get some basic information.  More info is available in Cray's Programming Environment User's Guide.  The base document number for this is S–2529.  Cray documents are generally of the form S-xxxx-nnn, where nun relates to the release.  The June, 2014 release of the Programming Environment User's Guide is S–2529-116.

There are no man pages available with the ACTS installed versions; however, there are doc and tutorials directories with many useful documents and examples.  Use the module show version command to see the location.

Full documentation about PETSc is available on the PETSc home page.

For questions about using PETsc at NERSC contact the consultants, consult@nersc.gov

Using Packages Within the Cray PETSc Release

MUMPS

You can view a sample MUMPS Fortran example code here.  This code happens to use double precision MUMPS routines.  To compile this code on Hopper using the Cray installation of PETSc and MUMPS you might use:

% module load cray-petsc
% ftn -Wl,-ydmumps_parallel_analysis_ dsimpletest.F

where the optional -Wl,-y compile flag simply tells the loader to state where the routine "dmumps_parallel_analysis" is loaded from and if you try this you'll see that it comes from the Cray "Third Party Software Library" (tpsl) libdmumps library, which is loaded automatically - both header files and library object archives - with the 'module load petsc' command.  A C example program is here.  Compile with cc simpletest.c.

HYPRE

A C example code is here.  Compile it on Hopper with cc ex11.c after loading the Cray PETSc modulefile. 

Availability

PackagePlatformCategoryVersionModuleInstall DateDate Made Default
PETSc babbage libraries/ math host-3.5.2 petsc/host-3.5.2 2014-11-07
PETSc babbage libraries/ math host-3.5.2 petsc-complex/host-3.5.2 2014-11-07
PETSc babbage libraries/ math host-3.5.2-threaded petsc/host-3.5.2-threaded 2014-11-14
PETSc babbage libraries/ math host-3.5.2-threaded petsc-complex/host-3.5.2-threade 2014-11-14
PETSc babbage libraries/ math mic-3.5.2 petsc/mic-3.5.2 2014-11-07 2014-11-07
PETSc babbage libraries/ math mic-3.5.2 petsc-complex/mic-3.5.2 2014-11-07 2014-11-07
PETSc babbage libraries/ math mic-3.5.2-threaded petsc/mic-3.5.2-threaded 2014-11-14
PETSc babbage libraries/ math mic-3.5.2-threaded petsc-complex/mic-3.5.2-threaded 2014-11-14
petsc cori libraries/ math 3.6.3 petsc/3.6.3 2016-02-01
petsc cori libraries/ math 3.7.2 petsc/3.7.2 2016-07-19
petsc edison libraries/ math 3.6.3 petsc/3.6.3 2016-01-21
petsc edison libraries/ math 3.7.2 petsc/3.7.2 2016-07-20