Skip to content

Commit 80bc008

Browse files
authored
Merge pull request #198 from altheaden/remove-system-hdf5-netcdf
Remove `[include_]system_hdf5_netcdf`
2 parents eef533f + 59ff742 commit 80bc008

19 files changed

+20
-67
lines changed

mache/machines/anvil.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ mpi = openmpi
1515
# system libraries will be deployed
1616
base_path = /lcrc/soft/climate/e3sm-unified
1717

18-
# whether to use system modules for hdf5, netcdf-c, netcdf-fortran and pnetcdf
19-
# (spack modules are used otherwise)
20-
use_system_hdf5_netcdf = False
21-
2218

2319
# config options related to data needed by diagnostics software such as
2420
# e3sm_diags and MPAS-Analysis

mache/machines/chicoma-cpu.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ mpi = mpich
1515
# system libraries will be deployed
1616
base_path = /usr/projects/e3sm/e3sm-unified
1717

18-
# whether to use system modules for hdf5, netcdf-c, netcdf-fortran and pnetcdf
19-
# (spack modules are used otherwise)
20-
use_system_hdf5_netcdf = True
21-
2218
# location of a spack mirror for E3SM-Unified to use
2319
spack_mirror = /usr/projects/e3sm/e3sm-unified/spack/spack_mirror
2420

mache/machines/chrysalis.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ mpi = openmpi
1515
# system libraries will be deployed
1616
base_path = /lcrc/soft/climate/e3sm-unified
1717

18-
# whether to use system modules for hdf5, netcdf-c, netcdf-fortran and pnetcdf
19-
# (spack modules are used otherwise)
20-
use_system_hdf5_netcdf = False
21-
2218

2319
# config options related to data needed by diagnostics software such as
2420
# e3sm_diags and MPAS-Analysis

mache/machines/compy.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ mpi = openmpi
1515
# system libraries will be deployed
1616
base_path = /share/apps/E3SM/conda_envs
1717

18-
# whether to use the same modules for hdf5, netcdf-c, netcdf-fortran and
19-
# pnetcdf as E3SM (spack modules are used otherwise)
20-
use_system_hdf5_netcdf = False
21-
2218

2319
# config options related to data needed by diagnostics software such as
2420
# e3sm_diags and MPAS-Analysis

mache/machines/frontier.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ mpi = mpich
1515
# system libraries will be deployed
1616
base_path = /ccs/proj/cli115/software/e3sm-unified
1717

18-
# whether to use system modules for hdf5, netcdf-c, netcdf-fortran and pnetcdf
19-
# (spack modules are used otherwise)
20-
use_system_hdf5_netcdf = True
21-
2218

2319
# config options related to data needed by diagnostics software such as
2420
# e3sm_diags and MPAS-Analysis

mache/machines/pm-cpu.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ mpi = mpich
1515
# system libraries will be deployed
1616
base_path = /global/common/software/e3sm/anaconda_envs
1717

18-
# whether to use system modules for hdf5, netcdf-c, netcdf-fortran and pnetcdf
19-
# (spack modules are used otherwise)
20-
use_system_hdf5_netcdf = True
21-
2218

2319
# config options related to data needed by diagnostics software such as
2420
# e3sm_diags and MPAS-Analysis

mache/machines/pm-gpu.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ mpi = mpich
1515
# system libraries will be deployed
1616
base_path = /global/common/software/e3sm/anaconda_envs
1717

18-
# whether to use system modules for hdf5, netcdf-c, netcdf-fortran and pnetcdf
19-
# (spack modules are used otherwise)
20-
use_system_hdf5_netcdf = True
21-
2218

2319
# config options related to data needed by diagnostics software such as
2420
# e3sm_diags and MPAS-Analysis

mache/spack/__init__.py

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
def make_spack_env(spack_path, env_name, spack_specs, compiler, mpi,
1515
machine=None, config_file=None, include_e3sm_lapack=False,
1616
include_e3sm_hdf5_netcdf=False,
17-
include_system_hdf5_netcdf=False,
1817
yaml_template=None, tmpdir=None, spack_mirror=None,
1918
custom_spack=''):
2019
"""
@@ -54,10 +53,6 @@ def make_spack_env(spack_path, env_name, spack_specs, compiler, mpi,
5453
Whether to include the same hdf5, netcdf-c, netcdf-fortran and pnetcdf
5554
as used in E3SM
5655
57-
include_system_hdf5_netcdf : bool, optional
58-
Whether to include the system hdf5, netcdf-c, netcdf-fortran and
59-
pnetcdf (not necessarily the same as E3SM)
60-
6156
yaml_template : str, optional
6257
A jinja template for a yaml file to be used for the environment instead
6358
of the mache template. This allows you to use compilers and other
@@ -95,8 +90,7 @@ def make_spack_env(spack_path, env_name, spack_specs, compiler, mpi,
9590
specs = ''.join([f' - {spec}\n' for spec in spack_specs]) # noqa: E221
9691

9792
yaml_data = _get_yaml_data(machine, compiler, mpi, include_e3sm_lapack,
98-
include_e3sm_hdf5_netcdf,
99-
include_system_hdf5_netcdf, specs,
93+
include_e3sm_hdf5_netcdf, specs,
10094
yaml_template)
10195

10296
yaml_filename = os.path.abspath(f'{env_name}.yaml')
@@ -124,8 +118,7 @@ def make_spack_env(spack_path, env_name, spack_specs, compiler, mpi,
124118
continue
125119
bash_script = template.render(
126120
e3sm_lapack=include_e3sm_lapack,
127-
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf,
128-
system_hdf5_netcdf=include_system_hdf5_netcdf)
121+
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf)
129122

130123
modules = f'{modules}\n{bash_script}'
131124

@@ -159,7 +152,7 @@ def make_spack_env(spack_path, env_name, spack_specs, compiler, mpi,
159152
def get_spack_script(spack_path, env_name, compiler, mpi, shell, machine=None,
160153
config_file=None, include_e3sm_lapack=False,
161154
include_e3sm_hdf5_netcdf=False,
162-
include_system_hdf5_netcdf=False, yaml_template=None):
155+
yaml_template=None):
163156
"""
164157
Build a snippet of a load script for the given spack environment
165158
@@ -195,10 +188,6 @@ def get_spack_script(spack_path, env_name, compiler, mpi, shell, machine=None,
195188
Whether to include the same hdf5, netcdf-c, netcdf-fortran and pnetcdf
196189
as used in E3SM
197190
198-
include_system_hdf5_netcdf : bool, optional
199-
Whether to include the system hdf5, netcdf-c, netcdf-fortran and
200-
pnetcdf (not necessarily the same as E3SM)
201-
202191
yaml_template : str, optional
203192
A jinja template for a yaml file to be used for the environment instead
204193
of the mache template. This allows you to use compilers and other
@@ -231,7 +220,7 @@ def get_spack_script(spack_path, env_name, compiler, mpi, shell, machine=None,
231220

232221
yaml_data = _get_yaml_data(
233222
machine, compiler, mpi, include_e3sm_lapack, include_e3sm_hdf5_netcdf,
234-
include_system_hdf5_netcdf, specs='', yaml_template=yaml_template)
223+
specs='', yaml_template=yaml_template)
235224

236225
if modules_before or modules_after:
237226
load_script = 'module purge\n'
@@ -259,8 +248,7 @@ def get_spack_script(spack_path, env_name, compiler, mpi, shell, machine=None,
259248
continue
260249
shell_script = template.render(
261250
e3sm_lapack=include_e3sm_lapack,
262-
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf,
263-
system_hdf5_netcdf=include_system_hdf5_netcdf)
251+
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf)
264252
load_script = f'{load_script}\n{shell_script}'
265253

266254
if modules_after:
@@ -273,7 +261,6 @@ def get_spack_script(spack_path, env_name, compiler, mpi, shell, machine=None,
273261
def get_modules_env_vars_and_mpi_compilers(machine, compiler, mpi, shell,
274262
include_e3sm_lapack=False,
275263
include_e3sm_hdf5_netcdf=False,
276-
include_system_hdf5_netcdf=False,
277264
yaml_template=None):
278265
"""
279266
Get the non-spack modules, environment variables and compiler names for a
@@ -302,10 +289,6 @@ def get_modules_env_vars_and_mpi_compilers(machine, compiler, mpi, shell,
302289
Whether to include the same hdf5, netcdf-c, netcdf-fortran and pnetcdf
303290
as used in E3SM
304291
305-
include_system_hdf5_netcdf : bool, optional
306-
Whether to include the system hdf5, netcdf-c, netcdf-fortran and
307-
pnetcdf (not necessarily the same as E3SM)
308-
309292
yaml_template : str, optional
310293
A jinja template for a yaml file to be used for the environment instead
311294
of the mache template. This allows you to use compilers and other
@@ -350,7 +333,7 @@ def get_modules_env_vars_and_mpi_compilers(machine, compiler, mpi, shell,
350333
if with_modules:
351334
yaml_data = _get_yaml_data(
352335
machine, compiler, mpi, include_e3sm_lapack,
353-
include_e3sm_hdf5_netcdf, include_system_hdf5_netcdf, specs='',
336+
include_e3sm_hdf5_netcdf, specs='',
354337
yaml_template=yaml_template)
355338
mods = _get_modules(yaml_data)
356339
mod_env_commands = f'{mod_env_commands}\n{mods}\n'
@@ -367,8 +350,7 @@ def get_modules_env_vars_and_mpi_compilers(machine, compiler, mpi, shell,
367350
continue
368351
shell_script = template.render(
369352
e3sm_lapack=include_e3sm_lapack,
370-
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf,
371-
system_hdf5_netcdf=include_system_hdf5_netcdf)
353+
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf)
372354
mod_env_commands = f'{mod_env_commands}\n{shell_script}'
373355

374356
mpicc, mpicxx, mpifc = _get_mpi_compilers(machine, compiler, mpi,
@@ -378,7 +360,7 @@ def get_modules_env_vars_and_mpi_compilers(machine, compiler, mpi, shell,
378360

379361

380362
def _get_yaml_data(machine, compiler, mpi, include_e3sm_lapack,
381-
include_e3sm_hdf5_netcdf, include_system_hdf5_netcdf, specs,
363+
include_e3sm_hdf5_netcdf, specs,
382364
yaml_template):
383365
""" Get the data from the jinja-templated yaml file based on settings """
384366
if yaml_template is None:
@@ -397,8 +379,7 @@ def _get_yaml_data(machine, compiler, mpi, include_e3sm_lapack,
397379

398380
yaml_data = template.render(specs=specs,
399381
e3sm_lapack=include_e3sm_lapack,
400-
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf,
401-
system_hdf5_netcdf=include_system_hdf5_netcdf)
382+
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf)
402383
return yaml_data
403384

404385

mache/spack/chicoma-cpu_gnu_mpich.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ spack:
123123
- cray-libsci/23.05.1.4
124124
buildable: false
125125
{% endif %}
126-
{% if e3sm_hdf5_netcdf or system_hdf5_netcdf %}
126+
{% if e3sm_hdf5_netcdf %}
127127
hdf5:
128128
externals:
129129
- spec: [email protected]~cxx+fortran+hl~java+mpi+shared

mache/spack/chicoma-cpu_nvidia_mpich.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ spack:
115115
prefix: /opt/cray/pe/libsci/23.05.1.4/NVIDIA/20.7/x86_64
116116
buildable: false
117117
{% endif %}
118-
{% if e3sm_hdf5_netcdf or system_hdf5_netcdf %}
118+
{% if e3sm_hdf5_netcdf %}
119119
hdf5:
120120
externals:
121121
- spec: [email protected]~cxx+fortran+hl~java+mpi+shared

0 commit comments

Comments
 (0)