Skip to content

Commit

Permalink
Update env files from GNU 10.2.0 to 12.2.0 + related updates
Browse files Browse the repository at this point in the history
docs/source/geos-chem-shared-docs
- Fixed broken links in supplemental-guides/spack-guide.rst

docs/source/getting-started/login-env-files-gnu.rst
- Changed label from env-files-gnu10 to env-files-gnu
- Added tip box to build software with Spack if necessary

docs/source/getting-started/login-env-files-intel.rst
- Changed label from _env-files-intel19 to _env-files-intel
- Added tip box to build software with Spack if necessary

docs/source/getting-started/login-env-compilers.rst
docs/source/getting-started/login-env-parallel.rst
- Updated references accordingly

docs/source/getting-started/login-env.rst
- Updated references accordingly
- Added tip box to build software with Spack if necessary

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Aug 29, 2024
1 parent 750151f commit e7efd49
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 42 deletions.
2 changes: 1 addition & 1 deletion docs/source/geos-chem-shared-docs
4 changes: 2 additions & 2 deletions docs/source/getting-started/login-env-compilers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Set environment variables for compilers
#######################################

The sample :ref:`GNU <env-files-gnu10>` and :ref:`Intel
<env-files-intel19>` environment files set the **environment
The sample :ref:`GNU <env-files-gnu>` and :ref:`Intel
<env-files-intel>` environment files set the **environment
variables** listed below in order to select the desired C, C++, and
Fortran compilers:

Expand Down
84 changes: 60 additions & 24 deletions docs/source/getting-started/login-env-files-gnu.rst
Original file line number Diff line number Diff line change
@@ -1,36 +1,64 @@
.. _env-files-gnu10:
.. _env-files-gnu:

################################################
Sample environment file for GNU 10.2.0 compilers
Sample environment file for GNU 12.2.0 compilers
################################################

Below is a sample environment file (based on an enviroment file for
the Harvard Cannon computer cluster). This file will load software
libraries built with the GNU 10.2.0 compilers.
libraries built with the `GNU 12.2.0 compilers
<https://gcc.gnu.org/onlinedocs/12.2.0/>`_.

.. note::

This environment file shown below assumes that required software
packages for :program:`GEOS-Chem Classic` are available as
pre-built modules. If your computer system does not have these
packages pre-installed, you can build them with Spack. Please see
our :ref:`spackguide` supplemental guide for detailed instructions.

Save the code below (with any appropriate modifications for your own
computer system) to a file named :file:`~/gcclassic.gnu10.env`.
computer system) to a file named :file:`~/gcclassic.gnu12.env`.

.. code-block:: bash
###############################################################################
#
# Environment file for GCClassic + GNU Compiler Collection 12.2.0
#
###############################################################################
# Display message (if we are in a terminal window)
if [[ $- = *i* ]] ; then
echo "Loading modules for GEOS-Chem Classic, please wait ..."
fi
#==============================================================================
# Load software packages (EDIT AS NEEDED)
# Unload all previously-unloaded software
#==============================================================================
# Unload all modules first
# Unload packages loaded with "module load"
module purge
# Load modules
module load gcc/10.2.0-fasrc01 # gcc / g++ / gfortran
module load openmpi/4.1.0-fasrc01 # MPI
module load netcdf-c/4.8.0-fasrc01 # netcdf-c
module load netcdf-fortran/4.5.3-fasrc01 # netcdf-fortran
#==============================================================================
# Load software packages for GNU 12.2.0
#==============================================================================
if [[ $- = *i* ]] ; then
echo "... Loading FASRC-built software, please wait ..."
fi
# Pre-built modules needed for GEOS-Chem
# (NOTE: These may be named differently on your system)
module load gcc/12.2.0-fasrc01 # gcc / g++ / gfortran
module load openmpi/4.1.4-fasrc01 # MPI
module load netcdf-c/4.9.2-fasrc01 # netcdf-c
module load netcdf-fortran/4.6.0-fasrc02 # 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)
#==============================================================================
# Environment variables and related settings
# (NOTE: Lmod will define <module>_HOME variables for each loaded module
# (NOTE: Lmod will define <module>_HOME variables for each loaded module)
#==============================================================================
# Make all files world-readable by default
Expand All @@ -55,13 +83,13 @@ computer system) to a file named :file:`~/gcclassic.gnu10.env`.
# netCDF
if [[ "x${NETCDF_HOME}" == "x" ]]; then
export NETCDF_HOME="${NETCDF_C_HOME}"
export NETCDF_HOME="${NETCDF_C_HOME}"
fi
export NETCDF_C_ROOT="${NETCDF_HOME}"
export NETCDF_FORTRAN_ROOT="${NETCDF_FORTRAN_HOME}"
export NETCDF_FORTRAN_ROOT=${NETCDF_FORTRAN_HOME}
# KPP 3.0.0+
export KPP_FLEX_LIB_DIR="${FLEX_HOME}/lib64"
export KPP_FLEX_LIB_DIR=${FLEX_HOME}/lib64
#==============================================================================
# Set limits
Expand All @@ -75,20 +103,28 @@ computer system) to a file named :file:`~/gcclassic.gnu10.env`.
#==============================================================================
# Print information
#==============================================================================
module list
.. tip::
Ask your sysadmin how to load software libraries. If you are using
your institution's computer cluster, then chances are there will
be a software module system installed, with commands similar to
those listed above.
module list
Then you can activate these seetings from the command line by typing:
echo ""
echo "Environment:"
echo ""
echo "CC : ${CC}"
echo "CXX : ${CXX}"
echo "FC : ${FC}"
echo "KPP_FLEX_LIB_DIR : ${KPP_FLEX_LIB_DIR}"
echo "MPI_HOME : ${MPI_HOME}"
echo "NETCDF_HOME : ${NETCDF_HOME}"
echo "NETCDF_FORTRAN_HOME : ${NETCDF_FORTRAN_HOME}"
echo "OMP_NUM_THREADS : ${OMP_NUM_THREADS}"
echo ""
echo "Done sourcing ${BASH_SOURCE[0]}"
To activate the settings contained in the environment file, type:

.. code-block:: console
$ . ~/gcclassic.gnu10.env
$ . ~/gcclassic.gnu12.env
You may also place the above command within your :ref:`GEOS-Chem run script
<run-script>`, which will be discussed in a subsequent chapter.
41 changes: 29 additions & 12 deletions docs/source/getting-started/login-env-files-intel.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _env-files-intel19:
.. _env-files-intel:

################################################
Sample environment file for Intel 2023 compilers
Expand All @@ -8,14 +8,24 @@ Below is a sample environment file (based on an enviroment file for
the Harvard Cannon computer cluster). This file will load software
libraries built with the Intel 2023 compilers.

.. note::

This environment file shown below assumes that required software
packages for :program:`GEOS-Chem Classic` are available as
pre-built modules. If your computer system does not have these
packages pre-installed, you can build them with Spack. Please see
our :ref:`spackguide` supplemental guide for detailed instructions.

Add the code below (with the appropriate modifications for your
system) into a file named :file:`~/gcclassic.intel23.env`.

.. code-block:: bash
#==============================================================================
# Load software packages (EDIT AS NEEDED)
#==============================================================================
###############################################################################
#
# Environment file for GCClassic + Intel 2023 compilers
#
###############################################################################
# Unload all modules first
module purge
Expand Down Expand Up @@ -77,14 +87,21 @@ system) into a file named :file:`~/gcclassic.intel23.env`.
module list
.. tip::

Ask your sysadmin how to load software libraries. If you
are using your institution's computer cluster, then chances
are there will be a software module system installed, with
commands similar to those listed above.

Then you can activate these settings from the command line by typing:
echo ""
echo "Environment:"
echo ""
echo "CC : ${CC}"
echo "CXX : ${CXX}"
echo "FC : ${FC}"
echo "KPP_FLEX_LIB_DIR : ${KPP_FLEX_LIB_DIR}"
echo "MPI_HOME : ${MPI_HOME}"
echo "NETCDF_HOME : ${NETCDF_HOME}"
echo "NETCDF_FORTRAN_HOME : ${NETCDF_FORTRAN_HOME}"
echo "OMP_NUM_THREADS : ${OMP_NUM_THREADS}"
echo ""
echo "Done sourcing ${BASH_SOURCE[0]}"
To activate the settings contained in the environment file, type:

.. code-block:: console
Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting-started/login-env-files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ command such as:

Keep a separate environment file for each combination of
modules that you will use. Example environment files
for :ref:`GNU <env-files-gnu10>` and :ref:`Intel <env-files-intel19>`
for :ref:`GNU <env-files-gnu>` and :ref:`Intel <env-files-intel>`
compilers and related software are provided in the following sections.

For general information about how libraries are loaded, see
Expand Down
4 changes: 2 additions & 2 deletions docs/source/getting-started/login-env-parallel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ shared-memory (aka serial) parallelization.
<https://gchp.readthedocs.io>`_ for more computationally-intensive
simulations.

In the the sample environment files for :ref:`GNU <env-files-gnu10>` and
:ref:`Intel <env-files-intel19>`, we define the following **environment
In the the sample environment files for :ref:`GNU <env-files-gnu>` and
:ref:`Intel <env-files-intel>`, we define the following **environment
varaiables** for OpenMP parallelization:

.. option:: OMP_NUM_THREADS
Expand Down
7 changes: 7 additions & 0 deletions docs/source/getting-started/login-env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ Customize your login environment
Machine Images (AMIs) all of the required software libraries will be
automatically loaded.

.. tip::

If your computer system lacks the required software packages for
:program:`GEOS-Chem Classic`, you can build them with the Spack
package manager. For detailed instructions, please see our
:ref:`spackguide` supplemental guide.

Each time you log in to your computer system, you'll need to load
the :ref:`software libraries <req-soft>` needed by
GEOS-Chem into your environment. You can do this with a script known
Expand Down

0 comments on commit e7efd49

Please sign in to comment.