Skip to content

Building MSI on NERSC CORI

Chonglin Zhang edited this page Apr 30, 2019 · 5 revisions

Instructions to build MSI on the CORI machine at NERSC:

Install SCOREC/core

Follow this instruction: Building on NERSC Cori to configure/compile/install PUMI/core.

Load PETSc Module

Load the appropriate PETSc modules to set the PETSC_DIR and PETSC_ARCH environment variables. At the moment MSI uses int for all matrix and vector indices which requires that we use a 32-bit version of PETSc, so

module load cray-petsc/3.8.4.0

should suffice.

On CORI the module load command adds the necessary libraries and include directories for the module/dependency to the environment's list of implicit include directories and link libraries, so the CMake configuration doesn't actually need to find the package or do anything to configure against PETSc, calls to the compiler will succeed in compiling code dependent on PETSc. For that reason we bypass the find_package(PETSc) CMake call on NERSC machines.

Install MSI

If you follow the NERSC development guidelines the development root directory for a NERSC host should be ${HOME}/${NERSC_HOST} so the cori development root should be /global/homes/w/${USER}/cori.

In the MSI project's root directory (should be /global/homes/w/${USER}/cori/msi):

mkdir build
cp example-config.sh build/config.sh

Edit the parameters at the top of the config.sh file:

DEVLOC=/global/homes/w/
DEVDIR=${NERSC_HOST}
CC=cc
CXX=CC
FTN=ftn

Finally we should be able to ./config.sh && make -j 8 install to configure, build, and install the MSI library.

Clone this wiki locally