Skip to content

Commit

Permalink
compiler: Refactor mpi distro check
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Jun 5, 2023
1 parent efe26d4 commit 8a6af9f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8a6af9f

Please sign in to comment.