Absoft User Forum

Support => Building and Using Additional Software & Libraries => Topic started by: forumadmin on March 29, 2012, 02:43:17 PM

Title: Building PETSc on 64 Bit Linux
Post by: forumadmin on March 29, 2012, 02:43:17 PM
This post provides instructions on building PETSc on 64 bit Linux with Absoft Pro Fortran 2012 (v11.5.0) and later.

PETSc, pronounced PET-see (the S is silent), is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. It supports MPI, shared memory pthreads, and NVIDIA GPUs, as well as hybrid MPI-shared memory pthreads or MPI-GPU parallelism.

DOWNLOADING THE REQUIRED PACKAGE

The PETSc package is available from http://www.mcs.anl.gov/petsc/download/index.html.

At the time this post was written the current version was 3.2. The instructions below were developed using petsc-3.2-p7.tar.gz source package.

CREATING THE PETSc SOURCE TREE

Extract the PETSc source with the following command:

   tar -xzvf petsc-3.2-p7.tar.gz

This will create a directory named petsc-3.2-p7  in the current working directory.

CONFIGURING, BUILDING AND TESTING 64 BIT PETSc

Use following commands configure, build  and test 64 bit PETSc with Absoft Fortran 2012 (v11.5.0) and later.

   cd  petsc-3.2-p7

  export PETSC_DIR=$PWD
  export PETSC_ARCH=linux-absoft-opt
  ./config/configure.py \
    --with-fc=af90 \
    --FFLAGS="-m64" \
    --with-debugging=0 \
    --with-gnu-compilers=1 \
    --with-mpi-compilers=0 \
    --with-vendor-compilers=absoft \
    --with-shared-libraries=0 \
    --with-blas-lib=/opt/absoft11.5/lib64/librefblas.a \
    --with-lapack-lib=/opt/absoft11.5/lib64/libreflapack.a \
    --download-mpich=yes \
    --download-superlu=1 \
    --download-superlu_dist=1 \
    --download-parmetis=1 \
    --download-mumps=1 \
    --download-blacs=1 \
    --download-scalapack=1 \
    --with-fortran-kernels=generic

After the configure completes, a command will be displayed which you can use to make the newly configured PETSc system.

After the make completes, a command will be displayed which you can use to test the newly built PETSc system. Before doing this, you must rename the BLACS library that ships with Absoft Pro Fortran 2012 using the following command:

    sudo mv /opt/absoft11.5/lib64/libblacs.a   /opt/absoft11.5/lib64/libAbsoftblacs.a

FURTHER INFORMATION

More information is available at the PETSc website: http://www.mcs.anl.gov/petsc/