|
SCORPIO 1.9.0
|
The SCORPIO library source can be download from github.
git clone https://github.com/E3SM-Project/scorpio.git
The SCORPIO library requires a working C/C++ and Fortran compiler and an MPI library (e.g. MPICH). SCORPIO uses CMake for configuring the source, so the CMake software package needs to be available on the system. Since SCORPIO uses low level I/O libraries for I/O either NetCDF or PnetCDF libraries need to be installed on the system. SCORPIO includes support for NetCDF, PnetCDF, HDF5 and ADIOS2 I/O libraries.
SCORPIO has been built using multiple compilers and installed on a variety of supercomputers. To enable support for the NetCDF library specify the path to the NetCDF C and Fortran installations using NetCDF_C_PATH and NetCDF_Fortran_PATH configuration options. To enable support for the PnetCDF library specify the path to the library via the PnetCDF_PATH configuration option. Similarly to enable support for the HDF5 library specify the install path of the HDF5 library using the HDF5_PATH configuration option. To enable support for ADIOS2 ensure that the environment variable ADIOS2_DIR is set to the ADIOS2 install directory. On some machines where compression support is enabled ADIOS2 and HDF5 might depend on paths to the compression libraries. For example to add support for compression using Blosc2 in ADIOS2 and HDF5 set the environment variable Blosc2_DIR to the Blosc2 library install directory. The compiler (or compiler wrapper) used for the build can be set by setting the environment variables CC, CXX and FC for the C, Fortran and C++ compilers. The library is configured by running cmake (CMake configure) and built using make. Please see the instructions below on how to build and install SCORPIO on some of the commonly used machines (Please note that the modules installed on these machines may change after machine updates).
The E3SM project has installed modules for NetCDF, PnetCDF and ADIOS2 libraries on Aurora. To use these modules,
module use /lus/flare/projects/E3SMinput/soft/modulefiles
On Aurora the modules include support for NetCDF, PnetCDF, HDF5 and ADIOS2 I/O libraries.
Modules
Modules loaded for dependent software libraries depend on the compiler. The modules listed below are for the Intel OneAPI compiler.
Intel OneAPI compiler
%> module use /lus/flare/projects/E3SMinput/soft/modulefiles
%> module load cmake/3.31.8
%> module load oneapi/release/2025.2.0
%> module load netcdf/4.9.3c-4.6.2f
%> module load pnetcdf/1.14.0
%> module load adios2/2.10.2
%> module load hdf5/1.14.6
Environment Variables
Set the CC, CXX, FC environment variables to point to the compiler wrappers. Set Blosc2_DIR, ADIOS2_DIR environment variables to point to the Blosc2 and ADIOS2 install directories.
CC=mpicc
CXX=mpicxx
FC=mpif90
Blosc2_DIR=$BLOSC2_ROOT
ADIOS2_DIR=$ADIOS2_ROOT
Downloading & Building the library
The script below downloads (clones) the SCORPIO library and builds it
#!/bin/bash
source /usr/share/lmod/lmod/init/sh
module use /lus/flare/projects/E3SMinput/soft/modulefiles
module load cmake/3.31.8
module load oneapi/release/2025.2.0
module load netcdf/4.9.3c-4.6.2f
module load pnetcdf/1.14.0
module load adios2/2.10.2
module load hdf5/1.14.6
export Blosc2_DIR=$BLOSC2_ROOT
export ADIOS2_DIR=$ADIOS2_ROOT
export HDF5_PATH=$HDF5_ROOT
export LIBOMPTARGET_DEBUG=0
export OMP_TARGET_OFFLOAD=DISABLED
export MPIR_CVAR_ENABLE_GPU=0
export CC=mpicc
export CXX=mpicxx
export FC=mpifort
export F77=mpifort
git clone https://github.com/E3SM-Project/scorpio.git
cd scorpio
mkdir scorpio_build
cd scorpio_build
cmake \
-DPIO_BUILD_STATIC_LIBS=TRUE \
-DWITH_ADIOS2:BOOL=TRUE \
-DWITH_HDF5:BOOL=TRUE \
-DWITH_PNETCDF:BOOL=TRUE \
-DPIO_USE_MALLOC:BOOL=ON \
-DPIO_BUILD_TESTS:BOOL=ON \
-DPIO_ENABLE_EXAMPLES:BOOL=ON \
-DPIO_ENABLE_TESTS:BOOL=ON \
-DPIO_ENABLE_TIMING:BOOL=ON \
-DPnetCDF_PATH=$PNETCDF_PATH \
-DNetCDF_C_PATH=$NETCDF_PATH \
-DNetCDF_Fortran_PATH=$NETCDF_PATH \
-DHDF5_PATH=$HDF5_PATH \
-LH \
.. |& tee configure.log
make -j4 |& tee make.log
On Frontier the modules below include support for NetCDF, PnetCDF, HDF5 and ADIOS2 I/O libraries.
Modules
Modules loaded for dependent software libraries depend on the compiler. The modules listed below are for the GNU compiler.
Cray Programming environment + GNU compiler
%> module reset
%> module load Core/25.03
%> module load PrgEnv-gnu
%> module load cpe/24.11
%> module load libunwind/1.8.1 cray-python/3.11.7
%> module load subversion git cmake
%> module load cray-hdf5-parallel/1.14.3.3
%> module load cray-netcdf-hdf5parallel/4.9.0.15
%> module load cray-parallel-netcdf/1.12.3.15
%> module load adios2/2.10.2-mpi
Environment Variables
Set the CC, CXX, FC environment variables to point to the compiler wrappers. Set ADIOS2_DIR environment variable to point to the ADIOS2 install directory.
CC=cc
CXX=CC
FC=ftn
ADIOS2_DIR=$OLCF_ADIOS2_ROOT
Downloading & Building the library
The script below downloads (clones) the SCORPIO library and builds it
#!/bin/bash
source /opt/cray/pe/lmod/lmod/init/sh
module reset
module load Core/25.03
module load PrgEnv-gnu
module load cpe/24.11
module load libunwind/1.8.1
module load cray-python/3.11.7
module load subversion
module load git
module load cmake
module load cray-hdf5-parallel/1.14.3.3
module load cray-netcdf-hdf5parallel/4.9.0.15
module load cray-parallel-netcdf/1.12.3.15
module load adios2/2.10.2-mpi
export NETCDF_PATH=$NETCDF_DIR
export PNETCDF_PATH=$PNETCDF_DIR
export ADIOS2_DIR=$OLCF_ADIOS2_ROOT
export CC=cc
export CXX=CC
export FC=ftn
export F77=ftn
git clone https://github.com/E3SM-Project/scorpio.git
cd scorpio
mkdir scorpio_build
cd scorpio_build
cmake \
-DPIO_BUILD_STATIC_LIBS=TRUE \
-DWITH_PNETCDF:BOOL=TRUE \
-DWITH_ADIOS2:BOOL=ON \
-DADIOS_BP2NC_TEST=ON \
-DPIO_ENABLE_FORTRAN:BOOL=ON \
-DPIO_USE_MALLOC:BOOL=ON \
-DPIO_BUILD_TESTS:BOOL=ON \
-DPIO_ENABLE_EXAMPLES:BOOL=ON \
-DPIO_ENABLE_TESTS:BOOL=ON \
-DPIO_ENABLE_TIMING:BOOL=ON \
-DPLATFORM:STRING=linux-gnu \
-DPnetCDF_PATH=$PNETCDF_PATH \
-DNetCDF_C_PATH=$NETCDF_PATH \
-DNetCDF_Fortran_PATH=$NETCDF_PATH \
-LH \
.. |& tee configure.log
make -j4 |& tee make.log
On Perlmutter the modules below include support for NetCDF and PnetCDF I/O libraries.
Modules
Modules loaded for dependent software libraries depend on the compiler. The modules listed below are for the Intel compiler.
Cray Programming environment + Intel compiler
%> module reset
%> module load PrgEnv-intel/8.5.0
%> module load intel/2024.1.0
%> module load craype-accel-host
%> module load craype/2.7.32
%> module load cray-mpich/8.1.30
%> module load cray-hdf5-parallel/1.12.2.9
%> module load cray-netcdf-hdf5parallel/4.9.0.9
%> module load cray-parallel-netcdf/1.12.3.13
%> module load cmake/3.30.2
Environment Variables
Set the CC, CXX, FC environment variables to point to the compiler wrappers.
CC=cc
CXX=CC
FC=ftn
Downloading & Building the library
The script below downloads (clones) the SCORPIO library and builds it
#!/bin/bash
source /usr/share/lmod/8.3.1/init/sh
module reset
module load PrgEnv-intel/8.5.0
module load intel/2024.1.0
module load craype-accel-host
module load craype/2.7.32
module load cray-mpich/8.1.30
module load cray-hdf5-parallel/1.12.2.9
module load cray-netcdf-hdf5parallel/4.9.0.9
module load cray-parallel-netcdf/1.12.3.13
module load cmake/3.30.2
export CC=cc
export CXX=CC
export F77=ftn
export FC=ftn
git clone https://github.com/E3SM-Project/scorpio.git
cd scorpio
mkdir scorpio_build
cd scorpio_build
cmake \
-DNetCDF_PATH=${CRAY_NETCDF_HDF5PARALLEL_PREFIX} \
-DPnetCDF_PATH=${CRAY_PARALLEL_NETCDF_PREFIX} \
-LH \
.. |& tee configure.log
make -j 4 |& tee make.log
On a Linux desktop install an MPI library and the PnetCDF or NetCDF library.
Installing dependencies
Environment Variables
Set the CC, CXX, FC environment variables to point to the MPICH (MPI library) compiler wrappers.
CC=mpicc
CXX=mpicxx
FC=mpif90
Downloading & Building the library
Assuming MPICH and PnetCDF libraries were installed in /usr/local/mpich/4.2.3/install and /usr/local/pnetcdf/1.14.0/install respectively, the script below downloads (clones) the SCORPIO library and builds it
#!/bin/bash
export PATH=/usr/local/mpich/4.2.3/install/bin:$PATH
export PNETCDF_PATH=/usr/local/pnetcdf/1.14.0/install
export CC=mpicc
export CXX=mpicxx
export FC=mpif90
git clone https://github.com/E3SM-Project/scorpio.git
cd scorpio
mkdir scorpio_build
cd scorpio_build
cmake \
-DPIO_BUILD_STATIC_LIBS=TRUE \
-DWITH_PNETCDF:BOOL=TRUE \
-DPIO_ENABLE_FORTRAN:BOOL=ON \
-DPIO_USE_MALLOC:BOOL=ON \
-DPIO_BUILD_TESTS:BOOL=ON \
-DPIO_ENABLE_EXAMPLES:BOOL=ON \
-DPIO_ENABLE_TESTS:BOOL=ON \
-DPIO_ENABLE_TIMING:BOOL=ON \
-DPLATFORM:STRING=linux-gnu \
-DPnetCDF_PATH=$PNETCDF_PATH \
-LH \
.. |& tee configure.log
make -j4 |& tee make.log
Once the library is built you can build SCORPIO examples (In the SCORPIO_SOURCE/examples directory) using the examples target
make -j 4 examples
The examples can be run using the mpiexec (or the appropriate MPI program launcher) command.
After building the library you can build SCORPIO tests using the tests target
make -j 4 tests
On machines with a batch job scheduler (Aurora, Frontier, Perlmutter) refer to the appropriate user manual for information on how to run programs in batch jobs. The tests can be run from the build directory using the test target or using the CMake test driver ctest (from the command line on a Linux desktop and within a batch job on machines using a batch job scheduler)
make test
or
ctest
Last updated: 11-17-2025