Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to compass v1.2.0-alpha.4 and mache v1.10.0 #496

Merged
merged 6 commits into from
Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compass/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.2.0-alpha.3'
__version__ = '1.2.0-alpha.4'
1 change: 0 additions & 1 deletion conda/albany_supported.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# a list of supported machine, compiler and mpi combinations for Albany

anvil, gnu, mvapich
anvil, gnu, openmpi
chrysalis, gnu, openmpi
compy, gnu, openmpi
Expand Down
16 changes: 13 additions & 3 deletions conda/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def get_env_vars(machine, compiler, mpilib):


def build_spack_env(config, update_spack, machine, compiler, mpi, spack_env,
spack_base, spack_template_path, env_vars, tmpdir):
spack_base, spack_template_path, env_vars, tmpdir, logger):

albany = config.get('deploy', 'albany')
esmf = config.get('deploy', 'esmf')
Expand Down Expand Up @@ -392,7 +392,7 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, spack_env,
specs.append(f'scorpio@{scorpio}+pnetcdf~timing+internal-timing~tools+malloc')

if albany != 'None':
specs.append(f'albany@{albany}+mpas')
specs.append(f'albany@{albany}+mpas+cxx17')

yaml_template = f'{spack_template_path}/{machine}_{compiler}_{mpi}.yaml'
if not os.path.exists(yaml_template):
Expand All @@ -412,6 +412,7 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, spack_env,
files = glob.glob(os.path.join(include_path, f'{prefix}*'))
for filename in files:
os.remove(filename)
set_ld_library_path(spack_branch_base, spack_env, logger)

spack_script = get_spack_script(
spack_path=spack_branch_base, env_name=spack_env, compiler=compiler,
Expand Down Expand Up @@ -460,6 +461,15 @@ def build_spack_env(config, update_spack, machine, compiler, mpi, spack_env,
return spack_branch_base, spack_script, env_vars


def set_ld_library_path(spack_branch_base, spack_env, logger):
commands = \
f'source {spack_branch_base}/share/spack/setup-env.sh; ' \
f'spack env activate {spack_env}; ' \
f'spack config add modules:prefix_inspections:lib:[LD_LIBRARY_PATH]; ' \
f'spack config add modules:prefix_inspections:lib64:[LD_LIBRARY_PATH]'
check_call(commands, logger=logger)


def write_load_compass(template_path, activ_path, conda_base, env_type,
activ_suffix, prefix, env_name, spack_script, machine,
env_vars, env_only, source_path, without_openmp):
Expand Down Expand Up @@ -863,7 +873,7 @@ def main():
spack_branch_base, spack_script, env_vars = build_spack_env(
config, args.update_spack, machine, compiler, mpi,
spack_env, spack_base, spack_template_path, env_vars,
args.tmpdir)
args.tmpdir, logger)
spack_script = f'echo Loading Spack environment...\n' \
f'{spack_script}\n' \
f'echo Done.\n' \
Expand Down
2 changes: 1 addition & 1 deletion conda/compass_env/spec-file.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jigsaw=0.9.14
jigsawpy=0.3.3
jupyter
lxml
mache=1.9.0
mache=1.10.0
matplotlib-base
metis
mpas_tools=0.17.0
Expand Down
2 changes: 1 addition & 1 deletion conda/configure_compass_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def setup_install_env(env_name, activate_base, use_local, logger, recreate,
channels = '--use-local'
else:
channels = ''
packages = 'progressbar2 jinja2 "mache=1.9.0"'
packages = 'progressbar2 jinja2 "mache=1.10.0"'
if recreate or not os.path.exists(env_path):
print('Setting up a conda environment for installing compass\n')
commands = '{}; ' \
Expand Down
4 changes: 2 additions & 2 deletions conda/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "compass" %}
{% set version = "1.2.0alpha.3" %}
{% set version = "1.2.0alpha.4" %}
{% set build = 0 %}

{% if mpi == "nompi" %}
Expand Down Expand Up @@ -52,7 +52,7 @@ requirements:
- jigsawpy 0.3.3
- jupyter
- lxml
- mache 1.9.0
- mache 1.10.0
- matplotlib-base
- metis
- mpas_tools 0.17.0
Expand Down
6 changes: 6 additions & 0 deletions conda/unsupported.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
# no spack available
anvil, gnu, impi
chrysalis, gnu, impi
chrysalis, oneapi-ifx, openmpi
chrysalis, oneapi-ifx, impi
compy, intel, mvapich2
compy, pgi, impi
compy, pgi, mvapich2
pm-cpu, nvidia, mpich
pm-cpu, aocc, mpich
pm-cpu, amdclang, mpich


# compiles but tests unreliable (errors or hanging),
# see https://github.com/MPAS-Dev/compass/issues/336
Expand Down
4 changes: 2 additions & 2 deletions docs/developers_guide/machines/cori.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Then, you can build the MPAS model with

.. code-block:: bash

make [DEBUG=true] [OPENMP=true] intel-nersc
make [DEBUG=true] [OPENMP=true] intel-cray

cori-haswell, gnu
-----------------
Expand All @@ -31,4 +31,4 @@ Then, you can build the MPAS model with

.. code-block:: bash

make [DEBUG=true] [OPENMP=true] [ALBANY=true] gnu-nersc
make [DEBUG=true] [OPENMP=true] [ALBANY=true] gnu-cray
6 changes: 3 additions & 3 deletions docs/developers_guide/machines/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ the MPAS model.
| +------------+-----------+-------------------+
| | gnu | openmpi | gfortran |
+--------------+------------+-----------+-------------------+
| cori-haswell | intel | mpt | intel-nersc |
| cori-haswell | intel | mpt | intel-cray |
| +------------+-----------+-------------------+
| | gnu | mpt | gnu-nersc |
| | gnu | mpt | gnu-cray |
+--------------+------------+-----------+-------------------+
| pm-cpu | gnu | mpich | gnu-nersc |
| pm-cpu | gnu | mpich | gnu-cray |
+--------------+------------+-----------+-------------------+

Below are specifics for each supported machine
Expand Down
2 changes: 1 addition & 1 deletion docs/developers_guide/machines/perlmutter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Then, you can build the MPAS model with

.. code-block:: bash

make [DEBUG=true] gnu-nersc
make [DEBUG=true] gnu-cray
2 changes: 1 addition & 1 deletion docs/users_guide/machines/anvil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ variables:

.. code-block:: bash

source /lcrc/soft/climate/compass/anvil/load_latest_compass_gnu_mvapich.sh
source /lcrc/soft/climate/compass/anvil/load_latest_compass_gnu_openmpi.sh

To build the MPAS model with

Expand Down
4 changes: 2 additions & 2 deletions docs/users_guide/machines/cori.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ To build the MPAS model with

.. code-block:: bash

make [DEBUG=true] [OPENMP=true] intel-nersc
make [DEBUG=true] [OPENMP=true] intel-cray


Gnu on Cori-Haswell
Expand All @@ -155,7 +155,7 @@ To build the MPAS model with

.. code-block:: bash

make [DEBUG=true] [OPENMP=true] [ALBANY=true] gnu-nersc
make [DEBUG=true] [OPENMP=true] [ALBANY=true] gnu-cray


Jupyter notebook on remote data
Expand Down
2 changes: 1 addition & 1 deletion docs/users_guide/machines/perlmutter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ To build the MPAS model with

.. code-block:: bash

make [DEBUG=true] [OPENMP=true] [ALBANY=true] gnu-nersc
make [DEBUG=true] [OPENMP=true] [ALBANY=true] gnu-cray


Jupyter notebook on remote data
Expand Down
6 changes: 3 additions & 3 deletions utils/matrix/setup_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
('intel', 'impi'): 'intel-mpi',
('gnu', 'openmpi'): 'gfortran'},
'cori-haswell': {
('intel', 'mpt'): 'intel-nersc',
('gnu', 'mpt'): 'gnu-nersc'},
('intel', 'mpt'): 'intel-cray',
('gnu', 'mpt'): 'gnu-cray'},
'pm-cpu': {
('gnu', 'mpich'): 'gnu-nersc'},
('gnu', 'mpich'): 'gnu-cray'},
'conda-linux': {
('gfortran', 'mpich'): 'gfortran',
('gfortran', 'openmpi'): 'gfortran'},
Expand Down