Load required libraries¶
This supplemental guide describes the how to load the required software dependencies for GEOS-Chem and HEMCO into your computational environment.
On the Amazon Web Services Cloud¶
All of the required software libraries for GEOS-Chem and HEMCO will be included in the Amazon Machine Image (AMI) that you use to initialize your Amazon Elastic Cloud Compute (EC2) instance. For more information, please see our our GEOS-Chem cloud computing tutorial.
On a shared computer cluster¶
If you plan to use GEOS-Chem or HEMCO on a shared computational cluster (e.g. at a university or research institution), then there is a good chance that your IT staff will have already installed several of the required libraries.
Depending on your system’s setup, there are a few different ways in which you can make these libraries available for use in your computational environment. These are described in the following sections:
Check if libraries are available as modules¶
Many high-performance computing (HPC) clusters use a module manager such as Lmod or environment-modules to load software packages and libraries. A module manager allows you to load different compilers and libraries with simple commands.
One downside of using a module manager is that you are locked into using only those compiler and software versions that have already been installed on your system by your IT staff. But in general, module managers succeed in ensuring that only well-tested compiler/software combinations are made available to users.
Example: Load modules for GNU compilers 8.2.0¶
If your computer system uses lmod, you can load software packages into your computational environment with module load commands, such as:
$ module purge $ module load git/2.17.0-fasrc01 $ module load gcc/8.2.0-fasrc01 $ module load openmpi/3.1.1-fasrc01 $ module load netcdf/4.1.3-fasrc02 $ module load perl/5.26.1-fasrc01 $ module load cmake/3.17.3-fasrc01
In this example (from the Harvard Cannon cluster), the version number and build identifier are part of the module name. This setup may differ on your system.
Consult your computer system documentation for more information on software package names.
Here is a summary of what the above commands do:
Removes all previously loaded modules
Loads Git (version control system)
Loads the GNU Compiler Collection (suite of C, C++, and Fortran compilers)
Loads the OpenMPI library (a dependency of netCDF)
Loads the netCDF library
Depending on how the netCDF libraries have been installed on your system, you might also need to load the netCDF-Fortran library separately, e.g.:
module load netcdf-fortran/...
Loads Perl (scripting language)
Loads Cmake (needed to compile GEOS-Chem)
Check if Spack-built libraries are available¶
If your system doesn’t have a module manager installed, check to see if the required libraries for GEOS-Chem and HEMCO were built the Spack package manager. Type
$ spack find
to locate any Spack-built software libraries on your system. If there Spack-built libraries are found, you may present, you may load them into your computational environment with spack load commands:
$ spack load email@example.com $ spack load firstname.lastname@example.org $ spack load email@example.com ... etc ...
When loading a Spack-built library, you can specify its version number. For example, spack load firstname.lastname@example.org tells Spack to load the GNU Compiler Collection version 10.2.0.
You may also specify a library by the compiler it was built with. For example, spack load email@example.com tells Spack to load the version of netCDF-Fortran that was built with GNU Compiler Collection version 10.2.0.
These specification methods are often necessary to select a given library in case there are several available builds to choose from.
We recommend that you place spack load commands into an environment file.
If a Spack environment has been installed on your system, type:
spack env activate -p ENVIRONMENT-NAME
to load all of the libraries in the environment together.
To deactivate the environment, type:
Check if libaries have been manually installed¶
If your computer system does not use a module manager and does not use
Spack, check for a manual library installation. Very often, common
software libraries are installed into standard locations (such as the
/usr/local/lib system folders). Ask your
sysadmin for more information.
Once you know the location of the compiler and netCDF libraries, you can set the proper environment variables for GEOS-Chem and HEMCO.
If there are none of these, install them with Spack¶
If your system has none of the required software packages that GEOS-Chem and HEMCO need, then we recommend that you use Spack to build the libraries yourself. Spack makes the process easy and will make sure that all software dependences are resolved.
Once you have installed the libraries with Spack, you can load the libraries into your computational environment as described above.