From e355ed81cb1ffafa52a5f128d9fb9c5bae6fb5b4 Mon Sep 17 00:00:00 2001 From: George Bismpas Date: Mon, 5 Jun 2023 17:49:43 +0100 Subject: [PATCH] compiler: Refactor mpi distro check --- devito/arch/compiler.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/devito/arch/compiler.py b/devito/arch/compiler.py index 4591ecaf8b..452084bc91 100644 --- a/devito/arch/compiler.py +++ b/devito/arch/compiler.py @@ -683,9 +683,9 @@ class IntelCompiler(Compiler): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.cflags.append("-xHost") platform = kwargs.pop('platform', configuration['platform']) language = kwargs.pop('language', configuration['language']) + self.cflags.append("-xHost") if configuration['safe-math']: self.cflags.append("-fp-model=strict") @@ -703,8 +703,8 @@ def __init__(self, *args, **kwargs): if kwargs.get('mpi'): mpi_distro = sniff_mpi_distro('mpiexec') if mpi_distro != 'IntelMPI': - warning("The MPI compiler `%s` doesn't use the Intel " - "C/C++ compiler underneath" % self.MPICC) + warning("Expected Intel MPI distribution with `%s`, but found `%s`" + % (self.__class__.__name__, mpi_distro)) def __lookup_cmds__(self): self.CC = 'icc' @@ -768,13 +768,6 @@ def __init__(self, *args, **kwargs): self.cflags.append('-gline-tables-only') self.cflags.append('-fdebug-info-for-profiling') - # Make sure the MPI compiler uses `icx` underneath -- whatever the MPI distro is - if kwargs.get('mpi'): - mpi_distro = sniff_mpi_distro('mpiexec') - if mpi_distro != 'IntelMPI': - warning("The MPI compiler `%s` doesn't use the Intel(R) oneAPI " - "`%s` compiler underneath" % self.MPICC, self.CXX) - def __lookup_cmds__(self): # OneAPI HPC ToolKit comes with icpx, which is clang++, # and icx, which is clang