1414def 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,
159152def 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,
273261def 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
380362def _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
0 commit comments