Skip to content

Commit

Permalink
Update trilinos and albany variants on pm-gpu
Browse files Browse the repository at this point in the history
Other GPU machines will need to set variants in a similar way
  • Loading branch information
xylar committed Oct 29, 2024
1 parent 746d85f commit 88de99f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 4 additions & 0 deletions compass/machines/pm-gpu.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spack = /global/cfs/cdirs/e3sm/software/compass/pm-gpu/spack
# pnetcdf as E3SM (spack modules are used otherwise)
use_e3sm_hdf5_netcdf = True

# spack variants for Albany and Trilinos
albany_variants = +mpas~py+unit_tests+cuda+uvm+sfad sfadsize=12
trilinos_variants = +cuda+uvm+ampere80+zen3

# The parallel section describes options related to running jobs in parallel.
# Most options in this section come from mache so here we just add or override
# some defaults
Expand Down
15 changes: 4 additions & 11 deletions conda/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901
tmpdir, logger):

albany = config.get('deploy', 'albany')
albany_variants = config.get('deploy', 'albany_variants')
trilinos_variants = config.get('deploy', 'trilinos_variants')
cmake = config.get('deploy', 'cmake')
esmf = config.get('deploy', 'esmf')
lapack = config.get('deploy', 'lapack')
Expand All @@ -479,9 +481,6 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901
scorpio = config.get('deploy', 'scorpio')
parallelio = config.get('deploy', 'parallelio')

# for now, we'll assume Cuda is needed anytime GPUs are present
with_cuda = config.has_option('parallel', 'gpus_per_node')

if config.has_option('deploy', 'spack_mirror'):
spack_mirror = config.get('deploy', 'spack_mirror')
else:
Expand Down Expand Up @@ -543,14 +542,8 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901
f'@{parallelio}+pnetcdf~timing"')

if albany != 'None':
if with_cuda:
albany_cuda = '+cuda+uvm+sfad sfadsize=12'
trilinos_cuda = '+cuda+uvm'
else:
albany_cuda = ''
trilinos_cuda = ''
specs.append(f'"trilinos-for-albany@{albany}{trilinos_cuda}"')
specs.append(f'"albany@{albany}+mpas~py+unit_tests{albany_cuda}"')
specs.append(f'"trilinos-for-albany@{albany}{trilinos_variants}"')
specs.append(f'"albany@{albany}{albany_variants}"')

yaml_template = f'{spack_template_path}/{machine}_{compiler}_{mpi}.yaml'
if not os.path.exists(yaml_template):
Expand Down
3 changes: 3 additions & 0 deletions conda/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ mpi = nompi

# the version of various packages to include if using spack
albany = compass-2024-03-13
# spack variants for Albany and Trilinos
albany_variants = +mpas~py+unit_tests
trilinos_variants =
# cmake newer than 3.23.0 needed for Trilinos
cmake = 3.23.0:
esmf = 8.6.1
Expand Down

0 comments on commit 88de99f

Please sign in to comment.