diff --git a/README.rst b/README.rst index be233f5a..32ecf6a0 100644 --- a/README.rst +++ b/README.rst @@ -19,16 +19,40 @@ This loads machine info for Anvil and prints it: .. code-block:: none Machine: anvil - E3SM Supported Machine? True + E3SM Supported Machine: True Compilers: intel, gnu - MPI libraries: mvapich, impi + MPI libraries: impi, openmpi, mvapich OS: LINUX + E3SM-Unified: - Base path: /lcrc/soft/climate/e3sm-unified E3SM-Unified is not currently loaded + Base path: /lcrc/soft/climate/e3sm-unified + Diagnostics: Base path: /lcrc/group/e3sm/diagnostics + Config options: + [e3sm_unified] + group = cels + compiler = intel + mpi = impi + base_path = /lcrc/soft/climate/e3sm-unified + + [diagnostics] + base_path = /lcrc/group/e3sm/diagnostics + + [web_portal] + base_path = /lcrc/group/e3sm/public_html + base_url = https://web.lcrc.anl.gov/public/e3sm/ + + [parallel] + system = slurm + parallel_executable = srun + cores_per_node = 36 + account = condo + partitions = acme-small, acme-medium, acme-large + qos = regular, acme_high + If you are on the login node of one of the following E3SM supported machines, you don't need to provide the machine name. It will be recognized from the host name: @@ -94,6 +118,12 @@ e3sm_unified_activation : str diagnostics_base : str The base directory for diagnostics data +web_portal_base : str + The base directory for the web portal + +web_portal_url : str + The base URL for the web portal + License ------- diff --git a/mache/machine_info.py b/mache/machine_info.py index fc1fb9b4..8e0ab9aa 100644 --- a/mache/machine_info.py +++ b/mache/machine_info.py @@ -2,6 +2,7 @@ from importlib.resources import path import configparser import os +import pwd from mache.discover import discover_machine @@ -45,6 +46,17 @@ class MachineInfo: diagnostics_base : str The base directory for diagnostics data + + web_portal_base : str + The base directory for the web portal + + web_portal_url : str + The base URL for the web portal + + username : str + The name of the current user, for use in web-portal directories. This + value is also added to the ``web_portal`` and ``username`` option of + the ``config`` attribute. """ def __init__(self, machine=None): @@ -79,6 +91,12 @@ def __init__(self, machine=None): self.diagnostics_base = None self._get_diagnostics_info() + self.web_portal_base = None + self.web_portal_url = None + + self.username = pwd.getpwuid(os.getuid()).pw_name + self.config.set('web_portal', 'username', self.username) + def __str__(self): """ Convert the info to a format that is good for printing diff --git a/mache/machines/anvil.cfg b/mache/machines/anvil.cfg index 767ab680..0eab2b01 100644 --- a/mache/machines/anvil.cfg +++ b/mache/machines/anvil.cfg @@ -24,6 +24,16 @@ base_path = /lcrc/soft/climate/e3sm-unified base_path = /lcrc/group/e3sm/diagnostics +# config options associated with web portals +[web_portal] + +# The path to the base of the web portals +base_path = /lcrc/group/e3sm/public_html + +# The base URL that corresponds to the base path +base_url = https://web.lcrc.anl.gov/public/e3sm/ + + # The parallel section describes options related to running jobs in parallel [parallel] diff --git a/mache/machines/chrysalis.cfg b/mache/machines/chrysalis.cfg index bac1860c..36e536a4 100644 --- a/mache/machines/chrysalis.cfg +++ b/mache/machines/chrysalis.cfg @@ -24,6 +24,16 @@ base_path = /lcrc/soft/climate/e3sm-unified base_path = /lcrc/group/e3sm/diagnostics +# config options associated with web portals +[web_portal] + +# The path to the base of the web portals +base_path = /lcrc/group/e3sm/public_html + +# The base URL that corresponds to the base path +base_url = https://web.lcrc.anl.gov/public/e3sm/ + + # The parallel section describes options related to running jobs in parallel [parallel] diff --git a/mache/machines/compy.cfg b/mache/machines/compy.cfg index 6724d461..60a355a4 100644 --- a/mache/machines/compy.cfg +++ b/mache/machines/compy.cfg @@ -24,6 +24,16 @@ base_path = /share/apps/E3SM/conda_envs base_path = /compyfs/diagnostics +# config options associated with web portals +[web_portal] + +# The path to the base of the web portals +base_path = /compyfs/www/ + +# The base URL that corresponds to the base path +base_url = https://compy-dtn.pnl.gov/ + + # The parallel section describes options related to running jobs in parallel [parallel] diff --git a/mache/machines/cori-haswell.cfg b/mache/machines/cori-haswell.cfg index 64bd7dfa..2ee079f7 100644 --- a/mache/machines/cori-haswell.cfg +++ b/mache/machines/cori-haswell.cfg @@ -24,6 +24,16 @@ base_path = /global/common/software/e3sm/anaconda_envs base_path = /global/cfs/cdirs/e3sm/diagnostics +# config options associated with web portals +[web_portal] + +# The path to the base of the web portals +base_path = /global/cfs/cdirs/e3sm/www + +# The base URL that corresponds to the base path +base_url = https://portal.nersc.gov/project/e3sm/ + + # The parallel section describes options related to running jobs in parallel [parallel] diff --git a/mache/machines/cori-knl.cfg b/mache/machines/cori-knl.cfg index 7a64a393..4a1c8d86 100644 --- a/mache/machines/cori-knl.cfg +++ b/mache/machines/cori-knl.cfg @@ -24,6 +24,16 @@ base_path = /global/common/software/e3sm/anaconda_envs base_path = /global/cfs/cdirs/e3sm/diagnostics +# config options associated with web portals +[web_portal] + +# The path to the base of the web portals +base_path = /global/cfs/cdirs/e3sm/www + +# The base URL that corresponds to the base path +base_url = https://portal.nersc.gov/project/e3sm/ + + # The parallel section describes options related to running jobs in parallel [parallel]