Skip to content

Commit

Permalink
Put spack specs in quotes to support version ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Mar 1, 2023
1 parent ac13ad2 commit f39f85b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions conda/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, spack_env,
specs = list()

if cmake != 'None':
specs.append(f'cmake@{cmake}')
specs.append(f'cmake "@{cmake}"')

e3sm_hdf5_netcdf = config.getboolean('deploy', 'use_e3sm_hdf5_netcdf')
if not e3sm_hdf5_netcdf:
Expand All @@ -406,27 +406,28 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, spack_env,
netcdf_fortran = config.get('deploy', 'netcdf_fortran')
pnetcdf = config.get('deploy', 'pnetcdf')
specs.extend([
f'hdf5@{hdf5}+cxx+fortran+hl+mpi+shared',
f'netcdf-c@{netcdf_c}+mpi~parallel-netcdf',
f'netcdf-fortran@{netcdf_fortran}',
f'parallel-netcdf@{pnetcdf}+cxx+fortran'])
f'hdf5 "@{hdf5}+cxx+fortran+hl+mpi+shared"',
f'netcdf-c "@{netcdf_c}+mpi~parallel-netcdf"',
f'netcdf-fortran "@{netcdf_fortran}"',
f'parallel-netcdf "@{pnetcdf}+cxx+fortran"'])

if esmf != 'None':
specs.append(f'esmf@{esmf}+mpi+netcdf~pio+pnetcdf')
specs.append(f'esmf "@{esmf}+mpi+netcdf~pio+pnetcdf"')
if lapack != 'None':
specs.append(f'netlib-lapack@{lapack}')
specs.append(f'netlib-lapack "@{lapack}"')
include_e3sm_lapack = False
else:
include_e3sm_lapack = True
if petsc != 'None':
specs.append(f'petsc@{petsc}+mpi+batch')
specs.append(f'petsc "@{petsc}+mpi+batch"')

if scorpio != 'None':
specs.append(
f'scorpio@{scorpio}+pnetcdf~timing+internal-timing~tools+malloc')
f'scorpio '
f'"@{scorpio}+pnetcdf~timing+internal-timing~tools+malloc"')

if albany != 'None':
specs.append(f'albany@{albany}+mpas')
specs.append(f'albany "@{albany}+mpas"')

yaml_template = f'{spack_template_path}/{machine}_{compiler}_{mpi}.yaml'
if not os.path.exists(yaml_template):
Expand Down

0 comments on commit f39f85b

Please sign in to comment.