-
Notifications
You must be signed in to change notification settings - Fork 0
Loading software packages into your Cannon login environment
On this page we provide information about software packages that you can use with Cannon, and how to load these packages into your login environment.
The GEOS-Chem Support Team has created several environment files for GEOS-Chem Classic and GCHP. Environment files are scripts containing commands to load both FASRC-built software packages and locally-built software packages for RockyLinux. Additional settings (such as environment variables that specify library paths) are also defined in these environment files.
If you have not yet downloaded the cannon-env repository, use this command to create a fresh clone:
$ git clone https://github.com/Harvard-ACMG/cannon-envOr if you already have a clone of the cannon-env repository, then navigate to it
$ cd /path/to/cannon-env # /path/to/cannon-env is the absolute path of your clone of cannon-env
$ git fetch -p https://github.com/Harvard-ACMG/cannon-env
$ git checkout main
$ git pullThen navigate to the envs subdirectory.
$ cd envs
$ ls
gnu10/ gnu12/ intel23/ README.md Environment files are contained in the subfolders of envs, separated the compiler type (gnu or intel) and version.
TIP: Consider watching the cannon-env repository. Point your browser to https://github.com/Harvard-ACMG/cannon-env and click on the Watch button at the top right of the page. GitHub will then send you notifications when files in cannon-env are modified.
These environment files contain commands to load core packages and locally built packages built with the GNU Compiler Collection version 10.2.0.
NOTE: Some software packages that do not use MPI and netCDF have been built with the GNU Compiler Collection 8.5.0, which comes pre-installed with Rocky Linux 8.7. This allows us to keep a single copy of these packages, instead of having to build separate copies for GNU 10.2.0 and 12.2.0.
| Environment file | Loads packages for | With these compilers | Software packages |
|---|---|---|---|
gcclassic.rocky+gnu10.env |
GEOS-Chem Classic | gcc, g++, gfortran 10.2.0 & 8.5.0 | FASRC + Spack |
gcclassic.rocky+gnu10.minimal.env |
GEOS-Chem Classic | gcc, g++. gfortran 10.2.0 | FASRC only |
gchp.rocky+gnu10.env |
GCHP | gcc, g++, gfortran 10.2.0 & 8.5.0 | FASRC + Spack |
gchp.rocky+gnu10.minimal.env |
GCHP | gcc, g++, gfortran 10.2.0 | FASRC only |
These environment files contain commands to load core packages and locally built packages built with the GNU Compiler Collection version 12.2.0.
NOTE: Some software packages that do not use MPI and netCDF have been built with the GNU Compiler Collection 8.5.0, which comes pre-installed with Rocky Linux 8.7. This allows us to keep a single copy of these packages, instead of having to build separate copies for GNU 10.2.0 and 12.2.0.
| Environment file | Loads packages for | With these compilers | Software packages |
|---|---|---|---|
gcclassic.rocky+gnu12.env |
GEOS-Chem Classic | gcc, g++, gfortran 12.2.0 & 8.5.0 | FASRC + Spack |
gcclassic.rocky+gnu12.minimal.env |
GEOS-Chem Classic | gcc, g++, gfortran 12.2.0 | FASRC only |
gchp.rocky+gnu12.env |
GCHP | gcc, g++, gfortran 12.2.0 & 8.5.0 | FASRC + Spack |
gchp.rocky+gnu12.minimal.env |
GCHP | gcc, g++, gfortran 12.2.0 | FASRC only |
These environment files contain commands to load core packages built with the Intel OneAPI 23.0.0 compilers.
| Environment file | Loads packages for | With these compilers | Software packages |
|---|---|---|---|
gcclassic.rocky+intel23.minimal.env |
GEOS-Chem Classic | icx, ifort 23.0.0 | FASRC only |
gchp.rocky+intel23.minimal.env |
GCHP | icx, ifort 23.0.0 | FASRC only |
To apply the settings contained in an environment file, type
$ source <env-file-name>where <env-file-name> refers to one of the files listed above.
-
For interactive login sessions, use one of the
*rocky+gnu10.envor*rocky+gnu12.envenvironment files. This will load the complete set of packages into your Linux environment. -
For batch jobs, use one of the
*rocky+gnu10.minimal.env,*rocky+gnu12.minimal.env, or*rocky+intel23.minimal.envenvironment files. This will load only the essential software packages needed to run GEOS-Chem Classic or GCHP (omitting the Spack-built packages). -
Copy or link these environment files to a convenient location (such as your home directory) for convenient access.
FASRC have built several core packages (aka modules) for RockyLinux. These include compilers, netCDF libraries, MPI libraries, and programming languages (and their dependencies). FASRC-built packages use this naming scheme:
<package-name>/<package-version>-fasrc<build-id>where
-
<package-name>is the package name -
<package-version>is the package version number (usually integersX.Y.Z) -
<build-id>is a 2-digit number (e.g.01,02,03). Most packages will only use01. But if there is a package that has been built with more than one compiler or MPI version, then numbers higher than01will be used to differentiate the builds.
These commands are present in environment files that load packages built with the GNU 10.2.0 compilers).
module purge # Unload all prior loaded modules
module load gcc/10.2.0-fasrc01 # GNU compilers v. 10.2.0
module load openmpi/4.1.0-fasrc01 # OpenMPI (needed for netCDF and GCHP)
module load netcdf-fortran/4.5.3-fasrc01 # netcdf-fortran library
module load flex/2.6.4-fasrc01 # Fast lexical analyzer (needed for KPP)
module load cmake/3.25.2-fasrc01 # CMake (needed to compile GEOS-Chem and HEMCO)Type module list to get a listing of modules that have been loaded:
Currently Loaded Modules:
1) gmp/6.2.1-fasrc01 4) gcc/10.2.0-fasrc01 7) szip/2.1.1-fasrc01 10) netcdf-fortran/4.5.3-fasrc01
2) mpfr/4.1.0-fasrc01 5) openmpi/4.1.0-fasrc01 8) hdf5/1.10.7-fasrc01 11) flex/2.6.4-fasrc01
3) mpc/1.2.1-fasrc01 6) zlib/1.2.11-fasrc01 9) netcdf-c/4.8.0-fasrc01 12) cmake/3.25.2-fasrc01These commands are present in environment files that load packages built with the GNU 12.2.0 compilers).
module purge # Unloads all prior loaded modules
module load gcc/12.2.0-fasrc01 # GNU compilers, v. 12.2.0
module load openmpi/4.1.4-fasrc01 # OpenMPI (needed for netCDF and GCHP)
module load netcdf-fortran/4.6.0-fasrc02 # netCDF-Fortran (loads netCDF-C and HDF5 modules)
module load flex/2.6.4-fasrc01 # Fast lexical analyzer (needed for KPP)
module load cmake/3.25.2-fasrc01 # CMake (needed to compile GEOS-Chem and HEMCO)Type module list to get a listing of all loaded modules:
Currently Loaded Modules:
1) gmp/6.2.1-fasrc01 4) gcc/12.2.0-fasrc01 7) szip/2.1.1-fasrc01 10) netcdf-fortran/4.6.0-fasrc02
2) mpfr/4.2.0-fasrc01 5) openmpi/4.1.4-fasrc01 8) hdf5/1.14.0-fasrc01 11) flex/2.6.4-fasrc01
3) mpc/1.3.1-fasrc01 6) zlib/1.2.13-fasrc01 9) netcdf-c/4.9.2-fasrc01 12) cmake/3.25.2-fasrc01These commands are present in environment files that load packages built with the Intel 23.0.0 compilers).
# Load FASRC-built modules
module load intel/23.0.0-fasrc01 # icc / i++ / gfortran
module load intelmpi/2021.8.0-fasrc01 # MPI
module load netcdf-fortran/4.6.0-fasrc03 # netCDF-Fortran
module load flex/2.6.4-fasrc01 # Flex lexer (needed for KPP)
module load cmake/3.25.2-fasrc01 # CMake (needed to compile)Type module list to get a listing of all loaded modules:
Currently Loaded Modules:
1) intel/23.0.0-fasrc01 4) szip/2.1.1-fasrc02 7) netcdf-fortran/4.6.0-fasrc03
2) intelmpi/2021.8.0-fasrc01 5) hdf5/1.14.0-fasrc02 8) flex/2.6.4-fasrc01
3) zlib/1.2.11-fasrc02 6) netcdf-c/4.9.2-fasrc02 9) cmake/3.25.2-fasrc01The following modules are often needed for post-processing and analysis:
module load IDL/8.7.2-fasrc01 # IDL language (needed for GAMAP)
moudle load python/3.10.9-fasrc01 # Python and Mamba
module load R/4.2.2-fasrc01 # R language
module load matlab/R2022b-fasrc01 # matlab languageTo find other available FASRC-built packages, use this command:
$ module availTo find more information about a specific FASRC-built package, type:
$ module spider <package-name>where <package-name> is the name of the package you are interested in.
These packages may be commented out in your environment file. To use them, simply remove the comment character (#) in front of the package name. Then source the environment file to apply the changes.
In addition to the FASRC-built software packages that we previously discussed, the GEOS-Chem Support Team has built the following local software packages. These will be loaded when you source one of the environment files listed above.
The Earth System Modeling Framework (ESMF) is a library required by GCHP. See the table below for the available ESMF versions for RockyLinux:
-
<ROOT>refers to the path/n/jacob_lab/Lab/RockyLinux.
| Package | Version | Compiler | Path | Needed for |
|---|---|---|---|---|
| ESMF | 8.6.1 | GNU 12.2.0 | <ROOT>/ESMF/ESMF_8_5_0/INSTALL_gnu12_openmpi4 |
GCHP |
| ESMF | 8.6.1 | Intel 23.0.0 | <ROOT>/ESMF/ESMF_8_5_0/INSTALL_intel23_intelmpi2020 |
GCHP |
When you source one of the GCHP environment files for RockyLinux, several environment variables will be defined that will tell GCHP where to find ESMF.
We have also built several software packages using the Spack package manager. In general, GEOS-Chem and GCHP will only need to use FASRC core packages such as compilers, netCDF, and MPI libraries. The Spack-built packages provide useful tools for post-processing and analysis.
Spack-built packages can be loaded with the same module load commands as the FASRC core packages. Several relevant Spack-built packages will be loaded into your environment when you source [one of the environment files described above]
(https://github.com/Harvard-ACMG/knowledge-base/wiki/Loading-software-packages-into-your-Cannon-login-environment#environment-files-for-rockylinux).
If you type module list, you may see many Spack-built packages in the printout. Several of these are dependencies for other packages, and these can be ignored. The Spack-built packages that you will probably use most frequently with GEOS-Chem are:
These packages do not depend on MPI or netCDF, and thus can be built with the compiler that ships with Rocky Linux (GNU 8.5.0).
| Package | Description | Load package for GNU 8.5.0 |
|---|---|---|
bison |
Parser, needed by KPP | module load bison/3.0.4-gcc-8.5.0 |
colordiff |
Colorizes output from diff
|
module load colordiff/1.0.21-gcc-8.5.0 |
jq |
Command-line JSON processor | module load jq/1.6-gcc-8.5.0 |
openjdk |
Java runtime environment | module load openjdk/11.0.17_8-gcc-8.5.0 |
perl |
The Perl scripting language | module load perl/5.26.3-gcc-8.5.0 |
parallel |
GNU Parallel | module load parallel/20220522-gcc-8.5.0 |
These packages had to be built with the same compiler that was used to build MPI and netCDF. Thus we have built two sets of these packages, one for GNU 10.2.0 and one for GNU 12.2.0.
| Package | Description | Load package for GNU 8.5.0 | Load package for GNU 12.2.0 |
|---|---|---|---|
cdo |
Climate Data Operators | spack load cdo%gcc@10.2.0 |
spack load cdo%gcc@12.2.0 |
nco |
The netCDF operators | module load nco/5.1.4-gcc-10.2.0 |
module load cdo/5.1.4-gcc-12.2.0 |
ncview |
netCDF file viewer | module load ncview/2.1.8-gcc-10.2.0 |
module load ncview/2.1.8-gcc-12.2.0 |
Note that the Spack-built packages use this naming scheme:
<package-name>/<version>-<compiler-name>-<compiler-version>where:
-
<package-name>is the name of a Spack-built software package (e.g.cdo) -
<package-version>is the version number of a Spack-built software package -
<compiler-name>is the name of the compiler. This will always begcc, which refers to the GNU Compiler Collection (and not GEOS-Chem Classic). -
<compiler-version>is the version number of the compiler. This will be either10.2.0or12.2.0.
Also note, the Spack configuration files (compilers.yaml, modules.yaml, and packages.yaml) in our spack-env repository have been set up in order to ensure that packages that require netCDF (e.g. cdo, nco, ncview`) will use the FASRC-built netCDF modules. Otherwise, Spack start installing a new version of netCDF (with dependencies) that will cause package conflicts.
If you need to load software packages that were originally built on the CentOS 7 operating system (i.e. prior to the June 2023 operating system update to RockyLinux), you can use the Singularity container provided by FASRC. This container contains all of the modules that were present on Cannon before the switchover.