Skip to content

Commit f36183f

Browse files
authored
Merge pull request #1904 from ComputeCanada/icc-no-library-cpath
iccifort: remove LIBRARY_PATH entries already known to icc et al
2 parents fcb636b + 24aaab9 commit f36183f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

easybuild/easyblocks/i/iccifort.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
@author: Bart Oldeman (McGill University, Compute Canada)
3232
"""
3333

34+
import os
3435
from easybuild.easyblocks.icc import EB_icc
3536
from easybuild.easyblocks.ifort import EB_ifort
3637

@@ -61,4 +62,13 @@ def make_module_req_guess(self):
6162
# including it causes problems, e.g. with complex.h and std::complex
6263
# cfr. https://software.intel.com/en-us/forums/intel-c-compiler/topic/338378
6364
# whereas EB_ifort adds 'include' but that's only needed if icc and ifort are separate
64-
return EB_icc.make_module_req_guess(self)
65+
guesses = EB_icc.make_module_req_guess(self)
66+
67+
# remove entries from LIBRARY_PATH that icc and co already know about at compile time
68+
# only do this for iccifort merged installations so that icc can still find ifort
69+
# libraries and vice versa for split installations
70+
if self.comp_libs_subdir is not None:
71+
compiler_library_paths = [os.path.join(self.comp_libs_subdir, p)
72+
for p in ('lib', 'compiler/lib/intel64', 'lib/ia32', 'lib/intel64')]
73+
guesses['LIBRARY_PATH'] = [p for p in guesses['LIBRARY_PATH'] if p not in compiler_library_paths]
74+
return guesses

0 commit comments

Comments
 (0)