From 917546150237787ea0bfb1413eefc2ed15ddad1f Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 4 Aug 2023 11:50:52 -0600 Subject: [PATCH] Add support for derecho Currently allows for intel, cray, nvhpc, and pgi compilers. Note that I don't support the various permutations of intel (intel-oneapi, intel-classic); I think intel-classic uses the same fortran compiler as intel, and I don't know if the fortran compiler in intel-oneapi is still named "ifort" or if it is something else. --- tests/python_for_tests/machines.py | 25 +++++++++++++++++++ tests/python_for_tests/marbl_testing_class.py | 4 ++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/tests/python_for_tests/machines.py b/tests/python_for_tests/machines.py index f0cd9ced..a53e0073 100644 --- a/tests/python_for_tests/machines.py +++ b/tests/python_for_tests/machines.py @@ -5,6 +5,7 @@ # Supported machines for running MARBL tests supported_machines = ['local', + 'derecho', 'cheyenne', 'hobart', 'edison', @@ -23,6 +24,18 @@ def load_module(mach, compiler, module_name): logger.info("Building with %s on %s" % (compiler, mach)) logger.info("Loading module %s..." % module_name) + if mach == 'derecho': + sys.path.insert(0, os.path.join(os.sep, 'glade', 'u', 'apps', 'derecho', '23.06', 'spack', 'opt', 'spack', 'lmod', '8.7.20', 'gcc', '7.5.0', 'pdxb', 'lmod', 'lmod', 'init')) + from env_modules_python import module + module('--force', 'purge') + module('load', 'ncarenv/23.06') + module('load', 'craype') + module('load', module_name) + module('load', 'netcdf/4.9.2') + module('load', 'ncarcompilers') + if compiler in ['gnu', 'cray']: + module('load', 'cray-libsci/23.02.1.1') + if mach == 'cheyenne': sys.path.insert(0, os.path.join(os.sep, 'glade', 'u', 'apps', 'ch', 'opt', 'lmod', '7.2.1', 'lmod', 'lmod', 'init')) from env_modules_python import module @@ -69,6 +82,18 @@ def machine_specific(mach, supported_compilers, module_names): logger.info(supported_machines) sys.exit(1) + if mach == 'derecho': + # NCAR machine + supported_compilers.append('intel') + supported_compilers.append('gnu') + supported_compilers.append('cray') + supported_compilers.append('nvhpc') + module_names['intel'] = 'intel/2023.0.0' + module_names['gnu'] = 'gcc/12.2.0' + module_names['cray'] = 'cce/15.0.1' + module_names['nvhpc'] = 'nvhpc/23.1' + return + if mach == 'cheyenne': # NCAR machine supported_compilers.append('intel') diff --git a/tests/python_for_tests/marbl_testing_class.py b/tests/python_for_tests/marbl_testing_class.py index 2035aebd..44703db1 100644 --- a/tests/python_for_tests/marbl_testing_class.py +++ b/tests/python_for_tests/marbl_testing_class.py @@ -86,7 +86,9 @@ def parse_args(self, desc, HaveCompiler=True, HaveInputFile=True, from socket import gethostname self._hostname = gethostname() found = True - if 'cheyenne' in self._hostname: + if 'derecho' in self._hostname: + self._machine = 'derecho' + elif 'cheyenne' in self._hostname: self._machine = 'cheyenne' elif 'hobart' in self._hostname: self._machine = 'hobart'