From a6e61167f74bd029fc4ce2ef9abef2fb90850d6d Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Thu, 14 Mar 2024 03:08:38 -0500 Subject: [PATCH 01/20] Update to compass v1.3.0-alpha.1 --- compass/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compass/version.py b/compass/version.py index 7c2b0c7b44..864ac90c1a 100644 --- a/compass/version.py +++ b/compass/version.py @@ -1 +1 @@ -__version__ = '1.2.0-alpha.9' +__version__ = '1.3.0-alpha.1' From 2fe6255c1c9b9bb2dd557a456b4c658cb2b5b7d8 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Thu, 14 Mar 2024 03:28:38 -0500 Subject: [PATCH 02/20] Update mache to v1.20.0 --- conda/compass_env/spec-file.template | 2 +- conda/configure_compass_env.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/compass_env/spec-file.template b/conda/compass_env/spec-file.template index fdeddcf110..58b833a9c2 100644 --- a/conda/compass_env/spec-file.template +++ b/conda/compass_env/spec-file.template @@ -16,7 +16,7 @@ ipython jupyter lxml {% if include_mache %} -mache=1.17.0 +mache=1.20.0 {% endif %} matplotlib-base metis diff --git a/conda/configure_compass_env.py b/conda/configure_compass_env.py index 3a7906170a..5f43bfe663 100755 --- a/conda/configure_compass_env.py +++ b/conda/configure_compass_env.py @@ -100,7 +100,7 @@ def main(): if local_mache: mache = '' else: - mache = '"mache=1.17.0"' + mache = '"mache=1.20.0"' setup_install_env(env_name, activate_base, args.use_local, logger, args.recreate, conda_base, mache) From 1641d02d2a3dffac003e68c792dd57dc7daf9366 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Thu, 14 Mar 2024 03:28:55 -0500 Subject: [PATCH 03/20] Update albany to compass-2024-03-13 --- conda/default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/default.cfg b/conda/default.cfg index 2bfba1d0a4..5614daa907 100644 --- a/conda/default.cfg +++ b/conda/default.cfg @@ -20,7 +20,7 @@ python = 3.10 mpi = nompi # the version of various packages to include if using spack -albany = compass-2023-08-03 +albany = compass-2024-03-13 # cmake newer than 3.23.0 needed for Trilinos cmake = 3.23.0: esmf = 8.4.2 From 9b2b85b1f42825e1025f2e5f6516ef70438b7262 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Thu, 14 Mar 2024 03:37:00 -0500 Subject: [PATCH 04/20] Update spack library versions --- conda/default.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conda/default.cfg b/conda/default.cfg index 5614daa907..6ab7a528ea 100644 --- a/conda/default.cfg +++ b/conda/default.cfg @@ -14,7 +14,7 @@ recreate = False suffix = # the python version -python = 3.10 +python = 3.11 # the MPI version (nompi, mpich or openmpi) mpi = nompi @@ -23,13 +23,13 @@ mpi = nompi albany = compass-2024-03-13 # cmake newer than 3.23.0 needed for Trilinos cmake = 3.23.0: -esmf = 8.4.2 -hdf5 = 1.14.1 +esmf = 8.6.0 +hdf5 = 1.14.3 lapack = 3.9.1 netcdf_c = 4.9.2 netcdf_fortran = 4.6.0 petsc = 3.19.1 pnetcdf = 1.12.3 -scorpio = 1.4.1 -# parallelio = 2.5.10 +scorpio = 1.6.0 +# parallelio = 2.6.2 parallelio = None From 7333324f8ba812fc990bbb53f374634987a697e9 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Thu, 14 Mar 2024 03:47:14 -0500 Subject: [PATCH 05/20] Remove pnetcdf conda recipe --- conda/pnetcdf/ci/linux_mpi_mpich.yaml | 32 --------- conda/pnetcdf/ci/linux_mpi_openmpi.yaml | 32 --------- conda/pnetcdf/ci/osx_mpi_mpich.yaml | 32 --------- conda/pnetcdf/ci/osx_mpi_openmpi.yaml | 33 ---------- conda/pnetcdf/recipe/build.sh | 21 ------ conda/pnetcdf/recipe/conda_build_config.yaml | 4 -- conda/pnetcdf/recipe/meta.yaml | 68 -------------------- conda/pnetcdf/recipe/run_test.sh | 3 - 8 files changed, 225 deletions(-) delete mode 100644 conda/pnetcdf/ci/linux_mpi_mpich.yaml delete mode 100644 conda/pnetcdf/ci/linux_mpi_openmpi.yaml delete mode 100644 conda/pnetcdf/ci/osx_mpi_mpich.yaml delete mode 100644 conda/pnetcdf/ci/osx_mpi_openmpi.yaml delete mode 100644 conda/pnetcdf/recipe/build.sh delete mode 100644 conda/pnetcdf/recipe/conda_build_config.yaml delete mode 100644 conda/pnetcdf/recipe/meta.yaml delete mode 100644 conda/pnetcdf/recipe/run_test.sh diff --git a/conda/pnetcdf/ci/linux_mpi_mpich.yaml b/conda/pnetcdf/ci/linux_mpi_mpich.yaml deleted file mode 100644 index 6ab74005ed..0000000000 --- a/conda/pnetcdf/ci/linux_mpi_mpich.yaml +++ /dev/null @@ -1,32 +0,0 @@ -c_compiler: -- gcc -c_compiler_version: -- '11' -channel_sources: -- conda-forge -channel_targets: -- e3sm main -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -fortran_compiler: -- gfortran -fortran_compiler_version: -- '11' -hdf5: -- 1.12.2 -libnetcdf: -- 4.8.1 -mpi: -- mpich -mpich: -- '4' -netcdf_fortran: -- '4.6' -target_platform: -- linux-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version - - fortran_compiler_version diff --git a/conda/pnetcdf/ci/linux_mpi_openmpi.yaml b/conda/pnetcdf/ci/linux_mpi_openmpi.yaml deleted file mode 100644 index 66a9dc7cef..0000000000 --- a/conda/pnetcdf/ci/linux_mpi_openmpi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -c_compiler: -- gcc -c_compiler_version: -- '11' -channel_sources: -- conda-forge -channel_targets: -- e3sm main -cxx_compiler: -- gxx -cxx_compiler_version: -- '11' -fortran_compiler: -- gfortran -fortran_compiler_version: -- '11' -hdf5: -- 1.12.2 -libnetcdf: -- 4.8.1 -mpi: -- openmpi -netcdf_fortran: -- '4.6' -openmpi: -- '4' -target_platform: -- linux-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version - - fortran_compiler_version diff --git a/conda/pnetcdf/ci/osx_mpi_mpich.yaml b/conda/pnetcdf/ci/osx_mpi_mpich.yaml deleted file mode 100644 index 932c91fc52..0000000000 --- a/conda/pnetcdf/ci/osx_mpi_mpich.yaml +++ /dev/null @@ -1,32 +0,0 @@ -c_compiler: -- clang -c_compiler_version: -- '11' -channel_sources: -- conda-forge,defaults -channel_targets: -- e3sm main -cxx_compiler: -- clangxx -cxx_compiler_version: -- '11' -fortran_compiler: -- gfortran -fortran_compiler_version: -- '11' -hdf5: -- 1.12.2 -libnetcdf: -- 4.8.1 -mpi: -- mpich -mpich: -- '4' -netcdf_fortran: -- '4.6' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version - - fortran_compiler_version diff --git a/conda/pnetcdf/ci/osx_mpi_openmpi.yaml b/conda/pnetcdf/ci/osx_mpi_openmpi.yaml deleted file mode 100644 index 967a9e07fc..0000000000 --- a/conda/pnetcdf/ci/osx_mpi_openmpi.yaml +++ /dev/null @@ -1,33 +0,0 @@ -c_compiler: -- clang -c_compiler_version: -- '11' -channel_sources: -- conda-forge,defaults -channel_targets: -- e3sm main -cxx_compiler: -- clangxx -cxx_compiler_version: -- '11' -fortran_compiler: -- gfortran -fortran_compiler_version: -- '11' -hdf5: -- 1.12.2 -libnetcdf: -- 4.8.1 -mpi: -- openmpi -netcdf_fortran: -- '4.6' -openmpi: -- '4' -target_platform: -- osx-64 -zip_keys: -- - c_compiler_version - - cxx_compiler_version - - fortran_compiler_version - diff --git a/conda/pnetcdf/recipe/build.sh b/conda/pnetcdf/recipe/build.sh deleted file mode 100644 index 58a83e7902..0000000000 --- a/conda/pnetcdf/recipe/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -xe - -export MPICC=mpicc -export MPICXX=mpicxx -export MPIF77=mpifort -export MPIF90=mpifort - -./configure --prefix=${PREFIX} \ - --with-netcdf4=${PREFIX} \ - --enable-shared=yes \ - --enable-static=no - -make -# serial tests -make check -# lighter weight parallel tests (4 MPI tasks) -make ptest - -make install diff --git a/conda/pnetcdf/recipe/conda_build_config.yaml b/conda/pnetcdf/recipe/conda_build_config.yaml deleted file mode 100644 index 77e22bcaa2..0000000000 --- a/conda/pnetcdf/recipe/conda_build_config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -mpi: - - openmpi - - mpich - diff --git a/conda/pnetcdf/recipe/meta.yaml b/conda/pnetcdf/recipe/meta.yaml deleted file mode 100644 index 02996ba07b..0000000000 --- a/conda/pnetcdf/recipe/meta.yaml +++ /dev/null @@ -1,68 +0,0 @@ -{% set version = "1.12.3" %} -{% set build = 0 %} - -# recipe-lint fails if mpi is undefined -{% set mpi = mpi or 'mpich' %} -{% if mpi == "mpich" %} -# prioritize mpich via build number -{% set build = build + 100 %} -{% endif %} - -package: - name: libpnetcdf - version: {{ version }} - -source: - url: https://parallel-netcdf.github.io/Release/pnetcdf-{{ version }}.tar.gz - sha256: 439e359d09bb93d0e58a6e3f928f39c2eae965b6c97f64e67cd42220d6034f77 - -build: - number: {{ build }} - skip: True # [win] - {% set mpi_prefix = "mpi_" + mpi %} - # add build string so packages can depend on mpi variants dependencies: - # `PKG_NAME * mpi_mpich_*` for mpich - # `PKG_NAME * mpi_*` for any mpi - string: {{ mpi_prefix }}_h{{ PKG_HASH }}_{{ build }} - - run_exports: - - {{ pin_subpackage('libpnetcdf', max_pin='x.x.x') }} {{ mpi_prefix }}_* - ignore_run_exports_from: - - netcdf-fortran - -requirements: - build: - - {{ compiler('c') }} - - {{ compiler('cxx') }} - - {{ compiler('fortran') }} - - m4 - - make - host: - - {{ mpi }} - # these need to be listed twice so conda build picks up the pins - - hdf5 - - hdf5 * {{ mpi_prefix }}_* - - libnetcdf - - libnetcdf * {{ mpi_prefix }}_* - - netcdf-fortran - - netcdf-fortran * {{ mpi_prefix }}_* - -test: - commands: - - pnetcdf-config --all - - test ! -f ${PREFIX}/lib/libpnetcdf.a - - test -f ${PREFIX}/lib/libpnetcdf${SHLIB_EXT} - -about: - home: https://parallel-netcdf.github.io/ - license: custom - license_file: COPYRIGHT - summary: | - PnetCDF is a high-performance parallel I/O library for accessing Unidata's - NetCDF, files in classic formats, specifically the formats of CDF-1, 2, and - 5. - dev_url: https://github.com/Parallel-NetCDF/PnetCDF - -extra: - recipe-maintainers: - - xylar diff --git a/conda/pnetcdf/recipe/run_test.sh b/conda/pnetcdf/recipe/run_test.sh deleted file mode 100644 index f3a1a28018..0000000000 --- a/conda/pnetcdf/recipe/run_test.sh +++ /dev/null @@ -1,3 +0,0 @@ -pnetcdf-config --has-c++ | grep -q yes -pnetcdf-config --has-fortran | grep -q yes -pnetcdf-config --netcdf4 | grep -q enabled From b7293f495ba406498e02f6ada6f7bbc82e9dc1ca Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Thu, 14 Mar 2024 03:48:08 -0500 Subject: [PATCH 06/20] Update mpas_tools to v0.32.0 --- conda/compass_env/spec-file.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/compass_env/spec-file.template b/conda/compass_env/spec-file.template index 58b833a9c2..655aebe64a 100644 --- a/conda/compass_env/spec-file.template +++ b/conda/compass_env/spec-file.template @@ -20,7 +20,7 @@ mache=1.20.0 {% endif %} matplotlib-base metis -mpas_tools=0.29.0 +mpas_tools=0.32.0 nco netcdf4=*=nompi_* numpy From 5bfd64ef0dc98289ca60d13df3e6ef4dc0603ded Mon Sep 17 00:00:00 2001 From: mcarlson801 Date: Mon, 11 Mar 2024 09:15:41 -0700 Subject: [PATCH 07/20] Remove Build Type: Tpetra from Landice tests --- compass/landice/tests/circular_shelf/albany_input.yaml | 2 -- compass/landice/tests/dome/albany_input.yaml | 2 -- compass/landice/tests/ensemble_generator/albany_input.yaml | 2 -- compass/landice/tests/greenland/albany_input.yaml | 2 -- compass/landice/tests/humboldt/albany_input.yaml | 2 -- compass/landice/tests/humboldt/albany_input_depthInt.yaml | 2 -- .../tests/ismip6_run/ismip6_ais_proj2300/albany_input.yaml | 4 ---- compass/landice/tests/mismipplus/albany_input.yaml | 2 -- compass/landice/tests/thwaites/albany_input.yaml | 2 -- compass/landice/tests/thwaites/albany_input_depthInt.yaml | 2 -- 10 files changed, 22 deletions(-) diff --git a/compass/landice/tests/circular_shelf/albany_input.yaml b/compass/landice/tests/circular_shelf/albany_input.yaml index 2618967bef..6354b4ae15 100644 --- a/compass/landice/tests/circular_shelf/albany_input.yaml +++ b/compass/landice/tests/circular_shelf/albany_input.yaml @@ -1,8 +1,6 @@ %YAML 1.1 --- ANONYMOUS: - Build Type: Tpetra - Problem: LandIce Viscosity: Type: 'Glen''s Law' diff --git a/compass/landice/tests/dome/albany_input.yaml b/compass/landice/tests/dome/albany_input.yaml index d2d4522adb..2ca45d2470 100644 --- a/compass/landice/tests/dome/albany_input.yaml +++ b/compass/landice/tests/dome/albany_input.yaml @@ -1,8 +1,6 @@ %YAML 1.1 --- ANONYMOUS: - Build Type: Tpetra - Problem: LandIce Viscosity: Type: 'Glen''s Law' diff --git a/compass/landice/tests/ensemble_generator/albany_input.yaml b/compass/landice/tests/ensemble_generator/albany_input.yaml index a4fbcb470e..8c70870f77 100644 --- a/compass/landice/tests/ensemble_generator/albany_input.yaml +++ b/compass/landice/tests/ensemble_generator/albany_input.yaml @@ -1,8 +1,6 @@ %YAML 1.1 --- ANONYMOUS: - Build Type: Tpetra - Problem: LandIce Field Norm: sliding_velocity_basalside: diff --git a/compass/landice/tests/greenland/albany_input.yaml b/compass/landice/tests/greenland/albany_input.yaml index b87d234d5f..4c2f498dc6 100644 --- a/compass/landice/tests/greenland/albany_input.yaml +++ b/compass/landice/tests/greenland/albany_input.yaml @@ -1,8 +1,6 @@ %YAML 1.1 --- ANONYMOUS: - Build Type: Tpetra - # Discretization Description Discretization: Exodus Output File Name: albany_output.exo diff --git a/compass/landice/tests/humboldt/albany_input.yaml b/compass/landice/tests/humboldt/albany_input.yaml index 236141a5c3..a675d3963a 100644 --- a/compass/landice/tests/humboldt/albany_input.yaml +++ b/compass/landice/tests/humboldt/albany_input.yaml @@ -1,8 +1,6 @@ %YAML 1.1 --- ANONYMOUS: - Build Type: Tpetra - Problem: LandIce Field Norm: sliding_velocity_basalside: diff --git a/compass/landice/tests/humboldt/albany_input_depthInt.yaml b/compass/landice/tests/humboldt/albany_input_depthInt.yaml index 0420dfe1e1..faa273b96d 100644 --- a/compass/landice/tests/humboldt/albany_input_depthInt.yaml +++ b/compass/landice/tests/humboldt/albany_input_depthInt.yaml @@ -1,8 +1,6 @@ %YAML 1.1 --- ANONYMOUS: - Build Type: Tpetra - Problem: LandIce Field Norm: sliding_velocity_basalside: diff --git a/compass/landice/tests/ismip6_run/ismip6_ais_proj2300/albany_input.yaml b/compass/landice/tests/ismip6_run/ismip6_ais_proj2300/albany_input.yaml index 0f6fbb0aaa..5903833a18 100644 --- a/compass/landice/tests/ismip6_run/ismip6_ais_proj2300/albany_input.yaml +++ b/compass/landice/tests/ismip6_run/ismip6_ais_proj2300/albany_input.yaml @@ -1,10 +1,6 @@ %YAML 1.1 --- ANONYMOUS: -# In order to use ML, change Tpetra to Epetra in the following line, -# and "Preconditioner Type: MueLu" to " Preconditioner Type: ML" several lines below - Build Type: Tpetra - Problem: LandIce Field Norm: sliding_velocity_basalside: diff --git a/compass/landice/tests/mismipplus/albany_input.yaml b/compass/landice/tests/mismipplus/albany_input.yaml index b81e12a91b..6930883712 100644 --- a/compass/landice/tests/mismipplus/albany_input.yaml +++ b/compass/landice/tests/mismipplus/albany_input.yaml @@ -1,8 +1,6 @@ %YAML 1.1 --- ANONYMOUS: - Build Type: Tpetra - Problem: Dirichlet BCs: SDBC on NS dirichlet for DOF U1 prescribe Field: dirichlet_field diff --git a/compass/landice/tests/thwaites/albany_input.yaml b/compass/landice/tests/thwaites/albany_input.yaml index d7d684edcd..91d7c7ccd8 100644 --- a/compass/landice/tests/thwaites/albany_input.yaml +++ b/compass/landice/tests/thwaites/albany_input.yaml @@ -1,8 +1,6 @@ %YAML 1.1 --- ANONYMOUS: - Build Type: Tpetra - # Problem Description Problem: Cubature Degree: 4 diff --git a/compass/landice/tests/thwaites/albany_input_depthInt.yaml b/compass/landice/tests/thwaites/albany_input_depthInt.yaml index 27a5eeea53..f3834def85 100644 --- a/compass/landice/tests/thwaites/albany_input_depthInt.yaml +++ b/compass/landice/tests/thwaites/albany_input_depthInt.yaml @@ -1,8 +1,6 @@ %YAML 1.1 --- ANONYMOUS: - Build Type: Tpetra - Problem: Depth Integrated Model: true From 29e4e12c46ac2d4d5782561fd7f19f223dcd6acb Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Thu, 14 Mar 2024 09:56:11 -0500 Subject: [PATCH 08/20] Constrain ESMF from conda-forge --- conda/compass_env/spec-file.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/compass_env/spec-file.template b/conda/compass_env/spec-file.template index 655aebe64a..389e151345 100644 --- a/conda/compass_env/spec-file.template +++ b/conda/compass_env/spec-file.template @@ -6,7 +6,7 @@ python>=3.8 cartopy cartopy_offlinedata cmocean -esmf=*={{ mpi_prefix }}_* +esmf=8.6.0={{ mpi_prefix }}_* ffmpeg geometric_features=1.3.0 git From 02153b16e1d9c1c7a9a5d958a6e11028b4c445fe Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Thu, 14 Mar 2024 10:04:48 -0500 Subject: [PATCH 09/20] Add MOAB --- conda/bootstrap.py | 4 ++++ conda/compass_env/spec-file.template | 2 ++ conda/default.cfg | 1 + 3 files changed, 7 insertions(+) diff --git a/conda/bootstrap.py b/conda/bootstrap.py index 58cc1fd99d..fc62f39bd6 100755 --- a/conda/bootstrap.py +++ b/conda/bootstrap.py @@ -449,6 +449,7 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901 cmake = config.get('deploy', 'cmake') esmf = config.get('deploy', 'esmf') lapack = config.get('deploy', 'lapack') + moab = config.get('deploy', 'moab') petsc = config.get('deploy', 'petsc') scorpio = config.get('deploy', 'scorpio') parallelio = config.get('deploy', 'parallelio') @@ -479,6 +480,9 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901 include_e3sm_lapack = False else: include_e3sm_lapack = True + if moab != 'None': + specs.append( + f'"moab@{moab}+mpi+hdf5+netcdf+pnetcdf+metis+parmetis+tempest"') if petsc != 'None': specs.append(f'"petsc@{petsc}+mpi+batch"') diff --git a/conda/compass_env/spec-file.template b/conda/compass_env/spec-file.template index 389e151345..219260e287 100644 --- a/conda/compass_env/spec-file.template +++ b/conda/compass_env/spec-file.template @@ -20,6 +20,8 @@ mache=1.20.0 {% endif %} matplotlib-base metis +moab >=5.5.1 +moab=*={{ mpi_prefix }}_tempest_* mpas_tools=0.32.0 nco netcdf4=*=nompi_* diff --git a/conda/default.cfg b/conda/default.cfg index 6ab7a528ea..0a410ac5d0 100644 --- a/conda/default.cfg +++ b/conda/default.cfg @@ -26,6 +26,7 @@ cmake = 3.23.0: esmf = 8.6.0 hdf5 = 1.14.3 lapack = 3.9.1 +moab = 5.5.1 netcdf_c = 4.9.2 netcdf_fortran = 4.6.0 petsc = 3.19.1 From 78bcbecf58c44367b1c3d656ae0a79455d72caf1 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Thu, 14 Mar 2024 10:06:22 -0500 Subject: [PATCH 10/20] Update pyremap constrain --- conda/compass_env/spec-file.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/compass_env/spec-file.template b/conda/compass_env/spec-file.template index 219260e287..7435830a3e 100644 --- a/conda/compass_env/spec-file.template +++ b/conda/compass_env/spec-file.template @@ -32,7 +32,7 @@ otps=2021.10 progressbar2 pyamg >=4.2.2 pyproj -pyremap>=1.1.0,<2.0.0 +pyremap>=1.3.0,<2.0.0 requests ruamel.yaml # having pip check problems with this version From 62a4e5c4e60b605e8ed794841a53022cd6b36063 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Fri, 15 Mar 2024 13:44:12 -0700 Subject: [PATCH 11/20] Don't install any dependencies from pip --- conda/bootstrap.py | 8 ++++---- conda/configure_compass_env.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conda/bootstrap.py b/conda/bootstrap.py index fc62f39bd6..12f0807522 100755 --- a/conda/bootstrap.py +++ b/conda/bootstrap.py @@ -383,7 +383,7 @@ def build_conda_env(env_type, recreate, mpi, conda_mpi, version, f'{activate_env} && ' \ f'cd {source_path} && ' \ f'rm -rf compass.egg-info && ' \ - f'python -m pip install -e .' + f'python -m pip install --no-deps -e .' check_call(commands, logger=logger) print('Installing pre-commit\n') @@ -649,11 +649,11 @@ def write_load_compass(template_path, activ_path, conda_base, env_type, mkdir -p conda/logs echo Reinstalling compass package in edit mode... rm -rf compass.egg-info - python -m pip install -e . &> conda/logs/install_compass.log + python -m pip install --no-deps -e . &> conda/logs/install_compass.log echo Done. echo fi - """ + """ # noqa: E501 else: update_compass = '' @@ -1053,7 +1053,7 @@ def main(): # noqa: C901 commands = f'source {conda_base}/etc/profile.d/conda.sh && ' \ f'conda activate {conda_env_name} && ' \ 'cd ../build_mache/mache && ' \ - 'python -m pip install .' + 'python -m pip install --no-deps .' check_call(commands, logger=logger) previous_conda_env = conda_env_name diff --git a/conda/configure_compass_env.py b/conda/configure_compass_env.py index 5f43bfe663..871b43901c 100755 --- a/conda/configure_compass_env.py +++ b/conda/configure_compass_env.py @@ -114,7 +114,7 @@ def main(): f'git clone -b {args.mache_branch} ' \ f'git@github.com:{args.mache_fork}.git mache && ' \ f'cd mache && ' \ - f'python -m pip install .' + f'python -m pip install --no-deps .' check_call(commands, logger=logger) From cf788dda2090a548ed08ad44caff36031f94cc01 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Fri, 15 Mar 2024 13:44:43 -0700 Subject: [PATCH 12/20] Install Albany without Python or EPetra support Make sure to perform unit tests --- conda/bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/bootstrap.py b/conda/bootstrap.py index 12f0807522..6e0afedf28 100755 --- a/conda/bootstrap.py +++ b/conda/bootstrap.py @@ -507,7 +507,7 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901 if albany != 'None': specs.append(f'"trilinos-for-albany@{albany}"') - specs.append(f'"albany@{albany}+mpas"') + specs.append(f'"albany@{albany}+mpas~epetra~py+unit_tests"') yaml_template = f'{spack_template_path}/{machine}_{compiler}_{mpi}.yaml' if not os.path.exists(yaml_template): From d329868c7fbd91e5ea03aee9889102f2d9ceaac0 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sun, 17 Mar 2024 10:32:27 -0700 Subject: [PATCH 13/20] Add a nonhydro test suite --- compass/ocean/suites/nonhydro.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 compass/ocean/suites/nonhydro.txt diff --git a/compass/ocean/suites/nonhydro.txt b/compass/ocean/suites/nonhydro.txt new file mode 100644 index 0000000000..ba1abd7042 --- /dev/null +++ b/compass/ocean/suites/nonhydro.txt @@ -0,0 +1,2 @@ +ocean/nonhydro/solitary_wave +ocean/nonhydro/stratified_seiche From edcb7e4a4b931606662f4008a8db89a4345ca401 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 19 Mar 2024 06:28:46 -0500 Subject: [PATCH 14/20] Fix libnetcdf in jigsaw build This merge explicitly points to the libnetcdf that should be used in the Jigsaw build. It also breaks the jigsaw build into its own function. --- conda/bootstrap.py | 88 +++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 36 deletions(-) diff --git a/conda/bootstrap.py b/conda/bootstrap.py index 6e0afedf28..9c9583b56e 100755 --- a/conda/bootstrap.py +++ b/conda/bootstrap.py @@ -340,42 +340,7 @@ def build_conda_env(env_type, recreate, mpi, conda_mpi, version, check_call(commands, logger=logger) if recreate or update_jigsaw: - # remove conda jigsaw and jigsaw-python - t0 = time.time() - commands = \ - f'{activate_env} && ' \ - f'conda remove -y --force-remove jigsaw jigsawpy' - check_call(commands, logger=logger) - - commands = \ - f'{activate_env} && ' \ - f'cd {source_path} && ' \ - f'git submodule update --init jigsaw-python' - check_call(commands, logger=logger) - - print('Building JIGSAW\n') - # add build tools to deployment env, not compass env - commands = \ - f'conda install -y cmake cxx-compiler && ' \ - f'cd {source_path}/jigsaw-python && ' \ - f'python setup.py build_external' - check_call(commands, logger=logger) - - print('Installing JIGSAW and JIGSAW-Python\n') - commands = \ - f'{activate_env} && ' \ - f'cd {source_path}/jigsaw-python && ' \ - f'python -m pip install --no-deps -e . && ' \ - f'cp jigsawpy/_bin/* ${{CONDA_PREFIX}}/bin' - check_call(commands, logger=logger) - - t1 = time.time() - total = t1 - t0 - message = f'JIGSAW install took {total:.1f} s.' - if logger is None: - print(message) - else: - logger.info(message) + build_jigsaw(activate_env, source_path, env_path, logger) # install (or reinstall) compass in edit mode print('Installing compass\n') @@ -394,6 +359,57 @@ def build_conda_env(env_type, recreate, mpi, conda_mpi, version, check_call(commands, logger=logger) +def build_jigsaw(activate_env, source_path, env_path, logger): + # remove conda jigsaw and jigsaw-python + t0 = time.time() + commands = \ + f'{activate_env} && ' \ + f'conda remove -y --force-remove jigsaw jigsawpy' + check_call(commands, logger=logger) + + commands = \ + f'{activate_env} && ' \ + f'cd {source_path} && ' \ + f'git submodule update --init jigsaw-python' + check_call(commands, logger=logger) + + print('Building JIGSAW\n') + # add build tools to deployment env, not compass env + jigsaw_build_deps = 'cxx-compiler cmake' + netcdf_lib = f'{env_path}/lib/libnetcdf.so' + cmake_args = f'-DCMAKE_BUILD_TYPE=Release -DNETCDF_LIBRARY={netcdf_lib}' + + commands = \ + f'conda install -y {jigsaw_build_deps} && ' \ + f'cd {source_path}/jigsaw-python/external/jigsaw && ' \ + f'rm -rf tmp && ' \ + f'mkdir tmp && ' \ + f'cd tmp && ' \ + f'cmake .. {cmake_args} && ' \ + f'cmake --build . --config Release --target install --parallel 4 && ' \ + f'cd {source_path}/jigsaw-python && ' \ + f'rm -rf jigsawpy/_bin jigsawpy/_lib && ' \ + f'cp -r external/jigsaw/bin/ jigsawpy/_bin && ' \ + f'cp -r external/jigsaw/lib/ jigsawpy/_lib' + check_call(commands, logger=logger) + + print('Installing JIGSAW and JIGSAW-Python\n') + commands = \ + f'{activate_env} && ' \ + f'cd {source_path}/jigsaw-python && ' \ + f'python -m pip install --no-deps -e . && ' \ + f'cp jigsawpy/_bin/* ${{CONDA_PREFIX}}/bin' + check_call(commands, logger=logger) + + t1 = time.time() + total = int(t1 - t0 + 0.5) + message = f'JIGSAW install took {total:.1f} s.' + if logger is None: + print(message) + else: + logger.info(message) + + def get_env_vars(machine, compiler, mpilib): if machine is None: From a04c20f083e8670d92a6e3257b69437cabf68eed Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 20 Mar 2024 06:01:19 -0500 Subject: [PATCH 15/20] Add docs on updating the Compass spack mirror --- docs/developers_guide/deploying_spack.rst | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/docs/developers_guide/deploying_spack.rst b/docs/developers_guide/deploying_spack.rst index b3c4431873..132b1870e9 100644 --- a/docs/developers_guide/deploying_spack.rst +++ b/docs/developers_guide/deploying_spack.rst @@ -105,6 +105,56 @@ for machines that mache knows about get updated. When this happens, we update mache’s copy of ``config_machines.xml`` and that tells me which modules to update in spack, see below.dev_quick_start +Mirroring MOAB on Chicoma +------------------------- + +The firewall on LANL IC's Chicoma blocks access to the MOAB package (at least +at the moment -- Xylar has made a request to allow access). To get around +this, someone testing or deploying spack builds on Chicoma will first need to +update the local spack mirror with the desired version of MOAB (5.5.1 in this +example). + +First, you need to know the versions of the ``mache`` and ``moab`` packages +that are needed (1.20.0 and 5.5.1, respectively, in this example). These are +specified in ``conda/configure_compass_env.py`` and ``conda/default.cfg``, +respectively. On a LANL laptop *without the VPN*, run: + +.. code-block:: bash + + MACHE_VER=1.20.0 + MOAB_VER=5.5.1 + mkdir spack_mirror + cd spack_mirror + git clone git@github.com:E3SM-Project/spack.git -b spack_for_mache_${MACHE_VER} spack_for_mache_${MACHE_VER} + source spack_for_mache_${MACHE_VER}/share/spack/setup-env.sh + + # remove any cache files that might cause trouble + rm -rf ~/.spack + + # this should create spack_mirror with subdirectories moab and _source-cache + spack mirror create -d spack_mirror moab@${MOAB_VER} + + tar cvfj spack_mirror.tar.bz2 spack_mirror + +Second, you need to turn on the LANL VPN. You may find it convenient to login +on to Chicoma (e.g. ``ssh -tt wtrw 'ssh ch-fe'``) in a separate terminal if you +have configured your laptop to preserve connections. + +.. code-block:: bash + + rsync -rLpt -e 'ssh wtrw ssh' spack_mirror.tar.bz2 ch-fe:/usr/projects/e3sm/compass/chicoma-cpu/spack/ + + +Then, on Chicoma: + +.. code-block:: bash + + cd /usr/projects/e3sm/compass/chicoma-cpu/spack/ + tar xvf spack_mirror.tar.bz2 + chmod -R ug+w spack_mirror/ + chmod -R ugo+rX spack_mirror/ + rm spack_mirror.tar.bz2 + Creating spack environments --------------------------- From bc125a471ac276a03a86dc28180ba919e3caaa9d Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 20 Mar 2024 06:02:27 -0500 Subject: [PATCH 16/20] Look for spack mirror when creating a spack env --- conda/bootstrap.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conda/bootstrap.py b/conda/bootstrap.py index 9c9583b56e..3923096328 100755 --- a/conda/bootstrap.py +++ b/conda/bootstrap.py @@ -470,6 +470,11 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901 scorpio = config.get('deploy', 'scorpio') parallelio = config.get('deploy', 'parallelio') + 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() @@ -546,7 +551,7 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901 include_e3sm_lapack=include_e3sm_lapack, include_e3sm_hdf5_netcdf=e3sm_hdf5_netcdf, yaml_template=yaml_template, tmpdir=tmpdir, - custom_spack=custom_spack) + custom_spack=custom_spack, spack_mirror=spack_mirror) # remove ESMC/ESMF include files that interfere with MPAS time keeping include_path = f'{spack_branch_base}/var/spack/environments/' \ From c4053e939e62f53e109a42f979dc26f53ae4a3a6 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 20 Mar 2024 06:03:18 -0500 Subject: [PATCH 17/20] Add location of spack mirror on Chicoma --- compass/machines/chicoma-cpu.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compass/machines/chicoma-cpu.cfg b/compass/machines/chicoma-cpu.cfg index 70a2256f6d..34211cf53f 100644 --- a/compass/machines/chicoma-cpu.cfg +++ b/compass/machines/chicoma-cpu.cfg @@ -28,6 +28,8 @@ spack = /usr/projects/e3sm/compass/chicoma-cpu/spack # pnetcdf as E3SM (spack modules are used otherwise) use_e3sm_hdf5_netcdf = True +# location of a spack mirror for compass to use +spack_mirror = /usr/projects/e3sm/compass/chicoma-cpu/spack/spack_mirror # The parallel section describes options related to running jobs in parallel [parallel] From db709674a9213da99b22a2f87c5e96ff636b381b Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Wed, 20 Mar 2024 11:36:17 -0500 Subject: [PATCH 18/20] Remove "~epetra" from the albany spack spec --- conda/bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/bootstrap.py b/conda/bootstrap.py index 3923096328..826babd4f1 100755 --- a/conda/bootstrap.py +++ b/conda/bootstrap.py @@ -528,7 +528,7 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, # noqa: C901 if albany != 'None': specs.append(f'"trilinos-for-albany@{albany}"') - specs.append(f'"albany@{albany}+mpas~epetra~py+unit_tests"') + specs.append(f'"albany@{albany}+mpas~py+unit_tests"') yaml_template = f'{spack_template_path}/{machine}_{compiler}_{mpi}.yaml' if not os.path.exists(yaml_template): From db37615ca8379884dd73fbd3823a7d4b1ecf9e5c Mon Sep 17 00:00:00 2001 From: Andrew Nolan Date: Wed, 20 Mar 2024 15:20:57 -0600 Subject: [PATCH 19/20] Add `chgrp` cmd to documentation section about spack mirror. --- docs/developers_guide/deploying_spack.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/developers_guide/deploying_spack.rst b/docs/developers_guide/deploying_spack.rst index 132b1870e9..95454da3e0 100644 --- a/docs/developers_guide/deploying_spack.rst +++ b/docs/developers_guide/deploying_spack.rst @@ -117,7 +117,8 @@ example). First, you need to know the versions of the ``mache`` and ``moab`` packages that are needed (1.20.0 and 5.5.1, respectively, in this example). These are specified in ``conda/configure_compass_env.py`` and ``conda/default.cfg``, -respectively. On a LANL laptop *without the VPN*, run: +respectively. On a LANL laptop with either (1) the VPN turned off and the +proxies unset or (2) the VPN turned on and the proxies set, run: .. code-block:: bash @@ -136,9 +137,10 @@ respectively. On a LANL laptop *without the VPN*, run: tar cvfj spack_mirror.tar.bz2 spack_mirror -Second, you need to turn on the LANL VPN. You may find it convenient to login -on to Chicoma (e.g. ``ssh -tt wtrw 'ssh ch-fe'``) in a separate terminal if you -have configured your laptop to preserve connections. +Then, if you used option (1) above turn on the LANL VPN (and set the proxies). +You may find it convenient to login on to Chicoma +(e.g. ``ssh -tt wtrw 'ssh ch-fe'``) in a separate terminal if you have +configured your laptop to preserve connections. .. code-block:: bash @@ -151,6 +153,7 @@ Then, on Chicoma: cd /usr/projects/e3sm/compass/chicoma-cpu/spack/ tar xvf spack_mirror.tar.bz2 + chgrp -R climate spack_mirror/ chmod -R ug+w spack_mirror/ chmod -R ugo+rX spack_mirror/ rm spack_mirror.tar.bz2 From 45c054053c0b2e7a368ce2ad47a86086b3e42059 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Fri, 22 Mar 2024 06:43:19 -0500 Subject: [PATCH 20/20] Remove gnu with mvapich from Anvil This configuration can't be used to build MOAB. --- conda/unsupported.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conda/unsupported.txt b/conda/unsupported.txt index 9103260d04..5014d526ea 100644 --- a/conda/unsupported.txt +++ b/conda/unsupported.txt @@ -24,3 +24,6 @@ anvil, intel, mvapich # can't build ESMF chrysalis, intel, impi + +# can't build MOAB +anvil, gnu, mvapich