Skip to content

Commit

Permalink
Merge pull request #204 from xylar/update-to-0.4.0-alpha.1
Browse files Browse the repository at this point in the history
Update to 0.4.0-alpha.1
  • Loading branch information
xylar authored Jul 23, 2024
2 parents 937c6eb + f95f59e commit d468fbd
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 16 deletions.
12 changes: 9 additions & 3 deletions deploy/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,11 @@ def build_spack_soft_env(config, update_spack, machine, env_type, # noqa: C901

esmf = config.get('deploy', 'esmf')

if config.has_option('deploy', 'spack_mirror'):
spack_mirror = config.get('deploy', 'spack_mirror')
else:
spack_mirror = None

spack_branch_base = f'{spack_base}/{spack_env}'

specs = list()
Expand Down Expand Up @@ -545,7 +550,8 @@ def build_spack_soft_env(config, update_spack, machine, env_type, # noqa: C901
spack_specs=specs, compiler=compiler, mpi=mpi,
machine=machine, config_file=machine_config,
include_e3sm_hdf5_netcdf=e3sm_hdf5_netcdf,
yaml_template=yaml_template, tmpdir=tmpdir)
yaml_template=yaml_template, tmpdir=tmpdir,
spack_mirror=spack_mirror)

spack_view = f'{spack_branch_base}/var/spack/environments/' \
f'{spack_env}/.spack-env/view'
Expand Down Expand Up @@ -593,12 +599,12 @@ def build_spack_libs_env(config, update_spack, machine, compiler, # noqa: C901
else:
include_e3sm_lapack = True
if metis != 'None':
specs.append(f'"metis@{metis}~shared"')
specs.append(f'"metis@{metis}+int64+real64~shared"')
if moab != 'None':
specs.append(
f'"moab@{moab}+mpi+hdf5+netcdf+pnetcdf+metis+parmetis+tempest"')
if parmetis != 'None':
specs.append(f'"parmetis@{parmetis}~shared"')
specs.append(f'"parmetis@{parmetis}+int64~shared"')
if petsc != 'None':
specs.append(f'"petsc@{petsc}+mpi+batch"')

Expand Down
2 changes: 1 addition & 1 deletion deploy/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mpi = nompi

# versions of conda packages
geometric_features = 1.2.0
mache = 1.19.0
mache = 1.24.0
mpas_tools = 0.34.1
otps = 2021.10
parallelio = 2.6.0
Expand Down
2 changes: 1 addition & 1 deletion e3sm_submodules/E3SM-Project
Submodule E3SM-Project updated 43 files
+49 −11 cime_config/allactive/config_pesall.xml
+1 −1 cime_config/config_archive.xml
+1 −0 cime_config/config_files.xml
+0 −0 cime_config/testmods_dirs/allactive/gis20km/shell_commands
+1 −0 cime_config/testmods_dirs/allactive/gis20km/user_nl_mali
+40 −2 cime_config/testmods_dirs/config_pes_tests.xml
+3 −2 cime_config/tests.py
+10 −10 components/eam/cime_config/config_pes.xml
+ components/eam/docs/figures/grid_illustration_ne4np4.png
+ components/eam/docs/figures/grid_illustration_ne4pg2.png
+23 −0 components/eam/docs/tech-guide/atmosphere-grid-overview.md
+2 −0 components/eam/docs/tech-guide/index.md
+1 −0 components/eam/mkdocs.yml
+1 −1 components/elm/cime_config/config_component.xml
+55 −0 components/homme/cmake/machineFiles/frontier-bfb.cmake
+20 −6 components/homme/src/share/cxx/ExecSpaceDefs.hpp
+24 −16 components/homme/src/share/viscosity_base.F90
+5 −4 components/homme/test/held_suarez0/explicit72.nl.sed
+2 −1 components/homme/test/held_suarez0/parseE3.py
+44 −11 components/homme/test/tool/ncl/topospectra.ncl
+16 −3 components/homme/test/tool/test.job
+5 −3 components/homme/test_execs/thetal_kokkos_ut/caar_interface.F90
+195 −188 components/homme/test_execs/thetal_kokkos_ut/caar_ut.cpp
+2 −3 components/mpas-albany-landice/cime_config/testdefs/testmods_dirs/mali/gis20km/shell_commands
+1 −0 components/mpas-albany-landice/cime_config/testdefs/testmods_dirs/mali/gis20km/user_nl_mali
+29 −13 components/mpas-ocean/src/shared/mpas_ocn_tracer_surface_restoring.F
+13 −0 docs/dev-guide/adding-grid-support/adding-grid-support-grid-types.md
+24 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide.md
+ docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/RRM_grid_reference.png
+3 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/add-grid-config.md
+258 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-RRM-grid-file.md
+6 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-atm-initial-condition.md
+6 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-dry-deposition.md
+6 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-lnd-initial-condition.md
+6 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-lnd-input-data.md
+56 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-mapping-files.md
+619 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-topo-file.md
+38 −0 docs/dev-guide/adding-grid-support/adding-grid-support-step-by-step-guide/generate-uniform-grid-file.md
+8 −0 docs/dev-guide/adding-grid-support/index.md
+11 −2 docs/dev-guide/index.md
+1 −1 docs/index.md
+3 −1 mkdocs.yaml
+2 −0 tools/generate_domain_files/docs/index.md
2 changes: 1 addition & 1 deletion e3sm_submodules/MALI-Dev
Submodule MALI-Dev updated 2907 files
2 changes: 1 addition & 1 deletion e3sm_submodules/Omega
Submodule Omega updated 1027 files
8 changes: 8 additions & 0 deletions polaris/machines/chicoma-cpu.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ spack = /usr/projects/e3sm/polaris/chicoma-cpu/spack
# pnetcdf as E3SM (spack modules are used otherwise)
use_e3sm_hdf5_netcdf = True

# location of a spack mirror for polaris to use
spack_mirror = /usr/projects/e3sm/polaris/chicoma-cpu/spack/spack_mirror


# The parallel section describes options related to running jobs in parallel
[parallel]
Expand All @@ -42,6 +45,11 @@ cores_per_node = 128
# hanging on perlmutter)
threads_per_core = 1

# quality of service
# overriding mache because the debug qos also requires --reservaiton debug,
# which polaris doesn't currently support
qos = standard


# Config options related to creating a job script
[job]
Expand Down
2 changes: 1 addition & 1 deletion polaris/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.0-alpha.2'
__version__ = '0.4.0-alpha.1'
24 changes: 16 additions & 8 deletions utils/omega/ctest/omega_ctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

def make_build_script(machine, compiler, branch, build_only, mesh_filename,
planar_mesh_filename, sphere_mesh_filename,
debug, clean, cmake_flags):
debug, clean, cmake_flags, account):
"""
Make a shell script for checking out Omega and its submodules, building
Omega and its ctests, linking to testing data files, and running ctests.
Expand Down Expand Up @@ -45,6 +45,9 @@ def make_build_script(machine, compiler, branch, build_only, mesh_filename,
if cmake_flags is None:
cmake_flags = ''

if account is not None:
cmake_flags = f'{cmake_flags} -DOMEGA_CIME_PROJECT={account}'

script = template.render(update_omega_submodule=update_omega_submodule,
polaris_source_dir=polaris_source_dir,
omega_base_dir=branch,
Expand Down Expand Up @@ -108,15 +111,16 @@ def download_meshes(config):
return download_targets


def write_job_script(config, machine, compiler, submit):
def write_job_script(config, machine, compiler, account, submit):
"""
Write a job script for running the build script
"""

if config.has_option('parallel', 'account'):
account = config.get('parallel', 'account')
else:
account = ''
if account is None:
if config.has_option('parallel', 'account'):
account = config.get('parallel', 'account')
else:
account = ''

nodes = 1

Expand Down Expand Up @@ -190,6 +194,8 @@ def main():
help='Whether to only build Omega in debug mode')
parser.add_argument('--cmake_flags', dest='cmake_flags',
help='Quoted string with additional cmake flags')
parser.add_argument('--account', dest='account',
help='slurm account to submit the job to')

args = parser.parse_args()

Expand All @@ -206,6 +212,7 @@ def main():
debug = args.debug
clean = args.clean
cmake_flags = args.cmake_flags
account = args.account

if 'SLURM_JOB_ID' in os.environ:
# already on a comptue node so we will just run ctests directly
Expand All @@ -221,15 +228,16 @@ def main():
build_only=build_only, mesh_filename=mesh_filename,
planar_mesh_filename=planar_mesh_filename,
sphere_mesh_filename=sphere_mesh_filename,
debug=debug, clean=clean, cmake_flags=cmake_flags)
debug=debug, clean=clean, cmake_flags=cmake_flags,
account=account)

# clear environment variables and start fresh with those from login
# so spack doesn't get confused by conda
subprocess.check_call(f'env -i HOME="$HOME" bash -l {script_filename}',
shell=True)

write_job_script(config=config, machine=machine, compiler=compiler,
submit=submit)
account=account, submit=submit)


if __name__ == '__main__':
Expand Down

0 comments on commit d468fbd

Please sign in to comment.