Skip to content
Merged
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
12 changes: 11 additions & 1 deletion easybuild/easyblocks/i/impi.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
@author: Alex Domingo (Vrije Universiteit Brussel)
"""
import os
import tempfile
from easybuild.tools import LooseVersion

import easybuild.tools.toolchain as toolchain
Expand Down Expand Up @@ -244,6 +245,16 @@ def sanity_check_step(self):
if build_option('mpi_tests'):
if impi_ver >= LooseVersion('2017'):
# Add minimal test program to sanity checks
if build_option('sanity_check_only'):
# When only running the sanity check we need to manually make sure that
# variables for compilers and parallelism have been set
self.set_parallel()
self.prepare_step(start_dir=False)

impi_testexe = os.path.join(tempfile.mkdtemp(), 'mpi_test')
else:
impi_testexe = os.path.join(self.builddir, 'mpi_test')

if impi_ver >= LooseVersion('2021'):
impi_testsrc = os.path.join(self.installdir, self.get_versioned_subdir('mpi'))
if impi_ver >= LooseVersion('2021.11'):
Expand All @@ -252,7 +263,6 @@ def sanity_check_step(self):
else:
impi_testsrc = os.path.join(self.installdir, 'test', 'test.c')

impi_testexe = os.path.join(self.builddir, 'mpi_test')
self.log.info("Adding minimal MPI test program to sanity checks: %s", impi_testsrc)

# Build test program with appropriate compiler from current toolchain
Expand Down