def make_module_req_guess(self): """ A dictionary of possible directories to look for. Return known dict for the system compiler, or empty dict if generate_standalone_module parameter is False """ guesses = {} if self.cfg['generate_standalone_module']: if self.compiler_prefix in ['/usr', '/usr/local']: # Force off adding paths to module since unloading such a module would be a potential shell killer print_warning("Ignoring option 'generate_standalone_module' since installation prefix is %s", self.compiler_prefix) else: if self.cfg['name'] in ['GCC','GCCcore']: guesses = EB_GCC.make_module_req_guess(self) elif self.cfg['name'] in ['icc']: guesses = EB_icc.make_module_req_guess(self) elif self.cfg['name'] in ['ifort']: guesses = EB_ifort.make_module_req_guess(self) else: raise EasyBuildError("I don't know how to generate module var guesses for %s", self.cfg['name']) return guesses
def make_module_req_guess(self): # Use EB_icc because its make_module_req_guess deliberately omits 'include' for CPATH: # including it causes problems, e.g. with complex.h and std::complex # cfr. https://software.intel.com/en-us/forums/intel-c-compiler/topic/338378 # whereas EB_ifort adds 'include' but that's only needed if icc and ifort are separate guesses = EB_icc.make_module_req_guess(self) # remove entries from LIBRARY_PATH that icc and co already know about at compile time # only do this for iccifort merged installations so that icc can still find ifort # libraries and vice versa for split installations if self.comp_libs_subdir is not None: compiler_library_paths = [ os.path.join(self.comp_libs_subdir, p) for p in ('lib', 'compiler/lib/intel64', 'lib/ia32', 'lib/intel64') ] guesses['LIBRARY_PATH'] = [ p for p in guesses['LIBRARY_PATH'] if p not in compiler_library_paths ] return guesses