Skip to content

Commit

Permalink
Move mpi workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
dominichofer committed Nov 13, 2024
1 parent e4d3aac commit 7b68f2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions repos/c2sm/packages/icon-mch/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ class IconMch(SpackIcon):
depends_on('netcdf-fortran %nvhpc', when='%nvhpc')
depends_on('netcdf-fortran %gcc', when='%gcc')

# WORKAROUND: A build and link dependency should imply that the same compiler is used. This enforces it.
with when('+mpi'):
depends_on('mpi %nvhpc', when='%nvhpc')
depends_on('mpi %gcc', when='%gcc')

def configure_args(self):
args = super().configure_args()
super_libs = args.pop()
Expand Down
4 changes: 2 additions & 2 deletions test/system_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_install_icon_c2sm(compiler):

@pytest.mark.parametrize("compiler", ['gcc', 'nvhpc'])
def test_install_icon_mch(compiler):
spack_install(f'icon-mch %{compiler}')
spack_install(f'icon-mch %{compiler} ^cray-mpich%{compiler}')


def test_install_icon_mch_conditional_dependencies():
Expand All @@ -52,7 +52,7 @@ def test_install_icon_mch_conditional_dependencies():
# gpu=nvidia-80 triggers cuda

spack_install(
'icon-mch %nvhpc +coupling serialization=create +emvorado +mpi gpu=nvidia-80'
'icon-mch %nvhpc +coupling serialization=create +emvorado +mpi gpu=nvidia-80 ^cray-mpich%nvhpc'
)


Expand Down

0 comments on commit 7b68f2e

Please sign in to comment.