diff --git a/configs/common/modules_lmod.yaml b/configs/common/modules_lmod.yaml index d5a605872..db13851d0 100644 --- a/configs/common/modules_lmod.yaml +++ b/configs/common/modules_lmod.yaml @@ -142,6 +142,8 @@ modules: ^esmf@8.8.0+debug snapshot=none: 'esmf-8.8.0-debug' ^esmf@8.9.0~debug snapshot=none: 'esmf-8.9.0' ^esmf@8.9.0+debug snapshot=none: 'esmf-8.9.0-debug' + ^esmf@8.9.1~debug snapshot=none: 'esmf-8.9.1' + ^esmf@8.9.1+debug snapshot=none: 'esmf-8.9.1-debug' fms: suffixes: constants=GFS: 'gfs-constants' diff --git a/configs/common/modules_tcl.yaml b/configs/common/modules_tcl.yaml index 1cf5cd4d5..344a22ca2 100644 --- a/configs/common/modules_tcl.yaml +++ b/configs/common/modules_tcl.yaml @@ -161,6 +161,8 @@ modules: ^esmf@8.8.0+debug snapshot=none: 'esmf-8.8.0-debug' ^esmf@8.9.0~debug snapshot=none: 'esmf-8.9.0' ^esmf@8.9.0+debug snapshot=none: 'esmf-8.9.0-debug' + ^esmf@8.9.1~debug snapshot=none: 'esmf-8.9.1' + ^esmf@8.9.1+debug snapshot=none: 'esmf-8.9.1-debug' fms: suffixes: constants=GFS: 'gfs-constants' diff --git a/configs/common/packages.yaml b/configs/common/packages.yaml index c184c8eda..ccdfd3fb9 100644 --- a/configs/common/packages.yaml +++ b/configs/common/packages.yaml @@ -84,7 +84,7 @@ packages: esmf: require: - ~xerces ~pnetcdf +shared +external-parallelio - - any_of: ['@=8.6.1 snapshot=none', '@=8.8.0 snapshot=none', '@=8.9.0 snapshot=none'] + - any_of: ['@=8.6.1 snapshot=none', '@=8.8.0 snapshot=none', '@=8.9.0 snapshot=none', '@=8.9.1 snapshot=none'] - any_of: ['fflags="-fp-model precise" cxxflags="-fp-model precise"'] when: '%intel' message: Extra ESMF compile options for Intel @@ -305,6 +305,10 @@ packages: py-cartopy: require: - +plotting + # Pin py-colorama to avoid duplicate packages, hopefully can be removed soon + py-colorama: + require: + - '@0.4.6' # Pin to version 42 to avoid maturin dependency that breaks Intel oneAPI builds py-cryptography: require: diff --git a/configs/sites/tier1/nautilus/packages_gcc-13.3.1.yaml b/configs/sites/tier1/nautilus/packages_gcc-13.3.1.yaml index 81b45bf60..552589cce 100644 --- a/configs/sites/tier1/nautilus/packages_gcc-13.3.1.yaml +++ b/configs/sites/tier1/nautilus/packages_gcc-13.3.1.yaml @@ -2,7 +2,7 @@ packages: mpi: buildable: False require: - - openmpi@4.1.8 + - openmpi@5.0.8 gcc-runtime: buildable: False externals: @@ -23,8 +23,14 @@ packages: openmpi: buildable: False externals: - - spec: openmpi@4.1.8 - prefix: /p/app/penguin/openmpi/4.1.8/gcc-13.3.1 + - spec: openmpi@5.0.8 + prefix: /p/app/penguin/openmpi/5.0.8/gcc-13.3.1 modules: - - penguin/openmpi/4.1.8/gcc-13.3.1 + - penguin/openmpi/5.0.8/gcc-13.3.1 - slurm + extra_attributes: + environment: + set: + OMPI_MCA_coll: "^hcoll,cuda" + OMPI_MCA_pml: "ucx" + diff --git a/configs/templates/neptune-dev/spack.yaml b/configs/templates/neptune-dev/spack.yaml index b1dd6b481..b7e419ba5 100644 --- a/configs/templates/neptune-dev/spack.yaml +++ b/configs/templates/neptune-dev/spack.yaml @@ -8,10 +8,10 @@ spack: include: [] specs: - - neptune-env ~debug +espc ^esmf@=8.9.0 - - neptune-env +debug +espc ^esmf@=8.9.0 - - neptune-python-env ^neptune-env ~debug +espc ^esmf@=8.9.0 - - jedi-neptune-env +adp ^neptune-env ~debug +espc ^esmf@=8.9.0 + - neptune-env ~debug +espc ^esmf@=8.9.1 + - neptune-env +debug +espc ^esmf@=8.9.1 + - neptune-python-env ^neptune-env ~debug +espc ^esmf@=8.9.1 + - jedi-neptune-env +adp ^neptune-env ~debug +espc ^esmf@=8.9.1 - crtm@3.1.2 - crtm@v2.4.1-jedi.2 diff --git a/configs/templates/neptune-ops/spack.yaml b/configs/templates/neptune-ops/spack.yaml index 4313ec690..b775abd30 100644 --- a/configs/templates/neptune-ops/spack.yaml +++ b/configs/templates/neptune-ops/spack.yaml @@ -8,7 +8,7 @@ spack: include: [] specs: - - neptune-env ~debug +espc ^esmf@=8.9.0 + - neptune-env ~debug +espc ^esmf@=8.9.1 packages: # Turn off python variant for esmf diff --git a/configs/templates/skylab-dev/spack.yaml b/configs/templates/skylab-dev/spack.yaml index 17f04e95c..7d319f59a 100644 --- a/configs/templates/skylab-dev/spack.yaml +++ b/configs/templates/skylab-dev/spack.yaml @@ -10,16 +10,16 @@ spack: specs: - ewok-env #- ai-env - - geos-gcm-env ^esmf@=8.6.1 + - geos-gcm-env ^esmf@=8.9.1 - jedi-fv3-env - - jedi-geos-env ^esmf@=8.6.1 + - jedi-geos-env ^esmf@=8.9.1 - jedi-mpas-env - - jedi-neptune-env ^esmf@=8.9.0 + - jedi-neptune-env ^esmf@=8.9.1 - jedi-tools-env - jedi-ufs-env ^esmf@=8.8.0 #- jedi-um-env - - neptune-env ^esmf@=8.9.0 - - neptune-python-env ^esmf@=8.9.0 + - neptune-env ^esmf@=8.9.1 + - neptune-python-env ^esmf@=8.9.1 - soca-env # Various crtm tags (list all to avoid duplicate packages) @@ -33,7 +33,7 @@ spack: # Various esmf tags (list all to avoid duplicate packages) - esmf@=8.6.1 - esmf@=8.8.0 - - esmf@=8.9.0 + - esmf@=8.9.1 packages: # Turn on python variant for esmf diff --git a/configs/templates/unified-dev/spack.yaml b/configs/templates/unified-dev/spack.yaml index e51d9a6ca..cce229330 100644 --- a/configs/templates/unified-dev/spack.yaml +++ b/configs/templates/unified-dev/spack.yaml @@ -10,19 +10,19 @@ spack: specs: - ewok-env #- ai-env - - geos-gcm-env ^esmf@=8.9.0 + - geos-gcm-env ^esmf@=8.9.1 - global-workflow-env ^esmf@=8.6.1 ^crtm@=3.1.2 - gmao-swell-env ^crtm@=v2.4.1-jedi.2 - gsi-env ^crtm@=3.1.2 - jedi-fv3-env - - jedi-geos-env ^esmf@=8.9.0 + - jedi-geos-env ^esmf@=8.9.1 - jedi-mpas-env - - jedi-neptune-env ^esmf@=8.9.0 + - jedi-neptune-env ^esmf@=8.9.1 #- jedi-tools-env - jedi-ufs-env ^esmf@=8.8.0 #- jedi-um-env - - neptune-env ^esmf@=8.9.0 - - neptune-python-env ^esmf@=8.9.0 + - neptune-env ^esmf@=8.9.1 + - neptune-python-env ^esmf@=8.9.1 - soca-env - ufs-srw-app-env ^esmf@=8.8.0 ^crtm@=3.1.2 - ufs-weather-model-env ^esmf@=8.8.0 ^crtm@=3.1.2 @@ -38,7 +38,7 @@ spack: # Various esmf tags (list all to avoid duplicate packages) - esmf@=8.6.1 - esmf@=8.8.0 - - esmf@=8.9.0 + - esmf@=8.9.1 # Various fms builds - fms +gfs_phys constants=GFS diff --git a/repos/builtin b/repos/builtin index bfc55569e..971b6d6f6 160000 --- a/repos/builtin +++ b/repos/builtin @@ -1 +1 @@ -Subproject commit bfc55569ef288de441a42131f58579e8b7fe64a0 +Subproject commit 971b6d6f6bbf3dbd44a89a71f29ba7bdc159f0ac diff --git a/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py b/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py index 2d99c9463..d0a5dfdfe 100755 --- a/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py +++ b/spack-ext/lib/jcsda-emc/spack-stack/stack/meta_modules.py @@ -373,6 +373,12 @@ def custom_sort_key(entry): raise Exception(f"Expected no or one MPI provider, but got {mpi_providers}") logging.info(f" ... mpi_providers: {mpi_providers}") + # To catch errors (invalid compilers, etc) we check that the number of written + # stack-* meta modules matches what we expect: One module for the preferred + # compiler, and (if applicable) one for each (currently one) MPI provider. + number_of_meta_modules_expected = 1 + len(mpi_providers) + number_of_meta_modules_written = 0 + # Prepare meta module directory logging.info("Preparing meta module directory ...") meta_module_dir = os.path.join(module_dir, "Core") @@ -508,6 +514,7 @@ def custom_sort_key(entry): with open(compiler_module_file, "w") as f: f.write(module_content) logging.info(" ... writing {}".format(compiler_module_file)) + number_of_meta_modules_written += 1 # If this is the last compiler in the list (i.e. the preferred compiler), # then save the substitutes for later when building the MPI meta module @@ -520,13 +527,15 @@ def custom_sort_key(entry): # Create mpi modules - currently, only one mpi provider is allowed for mpi_provider in mpi_providers: + if module_choice == "lmod": + mpi_alias = mpi_provider.name + else: + mpi_alias = ALIASES[mpi_provider.name] + # For tcl, append modulepath for external specs and for specs without # compiler dependencies; remove the compiler/mpi prefices from the moduless if module_choice == "tcl": - # Module paths are short names for tcl modules - mpi_alias = ALIASES[mpi_provider.name] - modulepath_save = os.path.join(module_dir, mpi_alias, str(mpi_provider.version), "none", "none") if not os.path.isdir(modulepath_save): os.makedirs(modulepath_save) @@ -548,7 +557,7 @@ def custom_sort_key(entry): # Module paths are short names for tcl modules if module_choice == "lmod": - mpi_alias = compiler.name + compiler_alias = compiler.name else: compiler_alias = ALIASES[compiler.name] @@ -654,10 +663,10 @@ def custom_sort_key(entry): substitutes["FC"] = COMPILER_SUBSTITUTES_SAVE["FC"] # Environment variables - if "environment" in compiler.extra_attributes.keys(): - for action in compiler.extra_attributes["environment"].keys(): - for env_name in compiler.extra_attributes["environment"][action]: - env_values = compiler.extra_attributes["environment"][action][env_name] + if "environment" in mpi_provider.extra_attributes.keys(): + for action in mpi_provider.extra_attributes["environment"].keys(): + for env_name in mpi_provider.extra_attributes["environment"][action]: + env_values = mpi_provider.extra_attributes["environment"][action][env_name] substitutes["ENVVARS"] += envmod_command( module_choice, action, @@ -689,5 +698,10 @@ def custom_sort_key(entry): with open(mpi_module_file, "w") as f: f.write(module_content) logging.info(" ... writing {}".format(mpi_module_file)) + number_of_meta_modules_written += 1 - logging.info("Metamodule generation completed successfully in {}".format(meta_module_dir)) + + if number_of_meta_modules_written == number_of_meta_modules_expected: + logging.info("Metamodule generation completed successfully in {}".format(meta_module_dir)) + else: + raise Exception("Metamodule generation NOT successful, check output (invalid compiler?)")