Skip to content

Commit

Permalink
Add support for derecho
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mnlevy1981 committed Aug 4, 2023
1 parent 571e674 commit 9175461
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
25 changes: 25 additions & 0 deletions tests/python_for_tests/machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# Supported machines for running MARBL tests
supported_machines = ['local',
'derecho',
'cheyenne',
'hobart',
'edison',
Expand All @@ -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
Expand Down Expand Up @@ -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')
Expand Down
4 changes: 3 additions & 1 deletion tests/python_for_tests/marbl_testing_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 9175461

Please sign in to comment.