From e7efd491d99811c557256e0ff6ca19ce1f9204cd Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Thu, 29 Aug 2024 12:46:38 -0400 Subject: [PATCH] Update env files from GNU 10.2.0 to 12.2.0 + related updates 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 --- docs/source/geos-chem-shared-docs | 2 +- .../getting-started/login-env-compilers.rst | 4 +- .../getting-started/login-env-files-gnu.rst | 84 +++++++++++++------ .../getting-started/login-env-files-intel.rst | 41 ++++++--- .../getting-started/login-env-files.rst | 2 +- .../getting-started/login-env-parallel.rst | 4 +- docs/source/getting-started/login-env.rst | 7 ++ 7 files changed, 102 insertions(+), 42 deletions(-) diff --git a/docs/source/geos-chem-shared-docs b/docs/source/geos-chem-shared-docs index ce3c86a..47cb22b 160000 --- a/docs/source/geos-chem-shared-docs +++ b/docs/source/geos-chem-shared-docs @@ -1 +1 @@ -Subproject commit ce3c86accdcd73d3c3a46e41be1fcc09775200dd +Subproject commit 47cb22bf9a93dd5c54a597062b41ef4ab1db4ce9 diff --git a/docs/source/getting-started/login-env-compilers.rst b/docs/source/getting-started/login-env-compilers.rst index 6885a8e..e4f6c58 100644 --- a/docs/source/getting-started/login-env-compilers.rst +++ b/docs/source/getting-started/login-env-compilers.rst @@ -4,8 +4,8 @@ Set environment variables for compilers ####################################### -The sample :ref:`GNU ` and :ref:`Intel -` environment files set the **environment +The sample :ref:`GNU ` and :ref:`Intel +` environment files set the **environment variables** listed below in order to select the desired C, C++, and Fortran compilers: diff --git a/docs/source/getting-started/login-env-files-gnu.rst b/docs/source/getting-started/login-env-files-gnu.rst index e8c37bb..05e4e24 100644 --- a/docs/source/getting-started/login-env-files-gnu.rst +++ b/docs/source/getting-started/login-env-files-gnu.rst @@ -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 +`_. + +.. 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 _HOME variables for each loaded module + # (NOTE: Lmod will define _HOME variables for each loaded module) #============================================================================== # Make all files world-readable by default @@ -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 @@ -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 `, which will be discussed in a subsequent chapter. diff --git a/docs/source/getting-started/login-env-files-intel.rst b/docs/source/getting-started/login-env-files-intel.rst index 4b0494f..d2f3c49 100644 --- a/docs/source/getting-started/login-env-files-intel.rst +++ b/docs/source/getting-started/login-env-files-intel.rst @@ -1,4 +1,4 @@ -.. _env-files-intel19: +.. _env-files-intel: ################################################ Sample environment file for Intel 2023 compilers @@ -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 @@ -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 diff --git a/docs/source/getting-started/login-env-files.rst b/docs/source/getting-started/login-env-files.rst index 3e76c85..3ef2e27 100644 --- a/docs/source/getting-started/login-env-files.rst +++ b/docs/source/getting-started/login-env-files.rst @@ -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 ` and :ref:`Intel ` + for :ref:`GNU ` and :ref:`Intel ` compilers and related software are provided in the following sections. For general information about how libraries are loaded, see diff --git a/docs/source/getting-started/login-env-parallel.rst b/docs/source/getting-started/login-env-parallel.rst index bd7bfaf..b2a9fba 100644 --- a/docs/source/getting-started/login-env-parallel.rst +++ b/docs/source/getting-started/login-env-parallel.rst @@ -24,8 +24,8 @@ shared-memory (aka serial) parallelization. `_ for more computationally-intensive simulations. -In the the sample environment files for :ref:`GNU ` and -:ref:`Intel `, we define the following **environment +In the the sample environment files for :ref:`GNU ` and +:ref:`Intel `, we define the following **environment varaiables** for OpenMP parallelization: .. option:: OMP_NUM_THREADS diff --git a/docs/source/getting-started/login-env.rst b/docs/source/getting-started/login-env.rst index 156345c..c463c78 100644 --- a/docs/source/getting-started/login-env.rst +++ b/docs/source/getting-started/login-env.rst @@ -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 ` needed by GEOS-Chem into your environment. You can do this with a script known