def det_modpath_extensions(self, ec): """ Determine module path extensions, if any. Examples: Compiler/GCC/4.8.3 (for GCC/4.8.3 module), MPI/GCC/4.8.3/OpenMPI/1.6.5 (for OpenMPI/1.6.5 module) """ modclass = ec['moduleclass'] tc_comps = det_toolchain_compilers(ec) tc_comp_info = self.det_toolchain_compilers_name_version(tc_comps) paths = [] if modclass == MODULECLASS_COMPILER or ec['name'] in ['CUDA']: # obtain list of compilers based on that extend $MODULEPATH in some way other than <name>/<version> extend_comps = [] # exclude GCC for which <name>/<version> is used as $MODULEPATH extension excluded_comps = ['GCC'] for comps in COMP_NAME_VERSION_TEMPLATES.keys(): extend_comps.extend([ comp for comp in comps.split(',') if comp not in excluded_comps ]) comp_name_ver = None if ec['name'] in extend_comps: for key in COMP_NAME_VERSION_TEMPLATES: if ec['name'] in key.split(','): comp_name, comp_ver_tmpl = COMP_NAME_VERSION_TEMPLATES[ key] comp_versions = {ec['name']: self.det_full_version(ec)} if ec['name'] == 'ifort': # 'icc' key should be provided since it's the only one used in the template comp_versions.update( {'icc': self.det_full_version(ec)}) if tc_comp_info is not None: # also provide toolchain version for non-dummy toolchains comp_versions.update( {tc_comp_info[0]: tc_comp_info[1]}) comp_name_ver = [ comp_name, comp_ver_tmpl % comp_versions ] break else: comp_name_ver = [ec['name'], self.det_full_version(ec)] paths.append(os.path.join(COMPILER, *comp_name_ver)) elif modclass == MODULECLASS_MPI: if tc_comp_info is None: raise EasyBuildError( "No compiler available in toolchain %s used to install MPI library %s v%s, " "which is required by the active module naming scheme.", ec['toolchain'], ec['name'], ec['version']) else: tc_comp_name, tc_comp_ver = tc_comp_info fullver = self.det_full_version(ec) paths.append( os.path.join(MPI, tc_comp_name, tc_comp_ver, ec['name'], fullver)) return paths
def det_module_subdir(self, ec): """ Determine module subdirectory, relative to the top of the module path. This determines the separation between module names exposed to users, and what's part of the $MODULEPATH. Examples: Core, Compiler/GCC/4.8.3, MPI/GCC/4.8.3/OpenMPI/1.6.5 """ tc_comps = det_toolchain_compilers(ec) # determine prefix based on type of toolchain used if tc_comps is None: # no compiler in toolchain, dummy toolchain => Core module subdir = CORE else: tc_comp_name, tc_comp_ver = self.det_toolchain_compilers_name_version( tc_comps) tc_mpi = det_toolchain_mpi(ec) if tc_mpi is None: # compiler-only toolchain => Compiler/<compiler_name>/<compiler_version> namespace subdir = os.path.join(COMPILER, tc_comp_name, tc_comp_ver) else: # compiler-MPI toolchain => MPI/<comp_name>/<comp_version>/<MPI_name>/<MPI_version> namespace tc_mpi_fullver = self.det_full_version(tc_mpi) subdir = os.path.join(MPI, tc_comp_name, tc_comp_ver, tc_mpi['name'], tc_mpi_fullver) return subdir
def det_module_subdir(self, ec): """ Determine module subdirectory, relative to the top of the module path. This determines the separation between module names exposed to users, and what's part of the $MODULEPATH. Examples: Core, avx2/Compiler/gcc4.8, avx/MPI/gcc4.8/openmpi1.6 """ tc_comp_info = None tc_comp_name = "" if ec.toolchain.name != CUDACORE: tc_comps = det_toolchain_compilers(ec) tc_comp_info = self.det_toolchain_compilers_name_version(tc_comps) # determine prefix based on type of toolchain used if tc_comp_info is None: # no compiler in toolchain, dummy toolchain => Core module if ec.toolchain.name == CUDACORE: tc_cuda = det_toolchain_cuda(ec) tc_cuda_name = CUDA.lower() tc_cuda_fullver = self.det_twodigit_version(tc_cuda) subdir = os.path.join(CUDA, tc_cuda_name+tc_cuda_fullver) else: subdir = CORE else: tc_comp_name, tc_comp_ver = tc_comp_info tc_comp_name = tc_comp_name.lower().split('-')[0] tc_comp_ver = self.det_twodigit_version({'name': tc_comp_name, 'version': tc_comp_ver}) tc_mpi = det_toolchain_mpi(ec) tc_cuda = det_toolchain_cuda(ec) if tc_cuda is not None: # compiler-CUDA toolchain => CUDA/<comp_name>/<comp_version>/<CUDA_name>/<CUDA_version> namespace tc_cuda_name = CUDA.lower() tc_cuda_fullver = self.det_twodigit_version(tc_cuda) subdir = tc_cuda_name+tc_cuda_fullver if tc_comp_name != GCCCORE.lower(): subdir = os.path.join(tc_comp_name+tc_comp_ver, subdir) if tc_mpi is None: subdir = os.path.join(CUDA, subdir) else: tc_mpi_name = tc_mpi['name'].lower() tc_mpi_fullver = self.det_twodigit_version(tc_mpi) subdir = os.path.join(MPI, subdir, tc_mpi_name+tc_mpi_fullver) elif tc_mpi is None: # compiler-only toolchain => Compiler/<compiler_name><compiler_version> namespace if tc_comp_ver == 'system' or tc_comp_name == GCCCORE.lower(): subdir = CORE else: subdir = os.path.join(COMPILER, tc_comp_name+tc_comp_ver) else: # compiler-MPI toolchain => MPI/<comp_name><comp_version>/<MPI_name><MPI_version> namespace tc_mpi_name = tc_mpi['name'].lower() tc_mpi_fullver = self.det_twodigit_version(tc_mpi) subdir = os.path.join(MPI, tc_comp_name+tc_comp_ver, tc_mpi_name+tc_mpi_fullver) if os.getenv('RSNT_ARCH') is None: raise EasyBuildError("Need to set architecture to determine module path in $RSNT_ARCH") if subdir != CORE and not subdir.startswith(os.path.join(CUDA, CUDA.lower())): subdir = os.path.join(os.getenv('RSNT_ARCH'), subdir) elif tc_comp_name == GCCCORE.lower() and 'EBROOTGENTOO' in os.environ: subdir = os.path.join(os.getenv('RSNT_ARCH'), subdir) return subdir
def test_toolchain_inspection(self): """Test whether available toolchain inspection functionality is working.""" build_options = { 'robot_path': os.path.join(os.path.dirname(os.path.abspath(__file__)), 'easyconfigs'), 'valid_module_classes': module_classes(), } init_config(build_options=build_options) ec = EasyConfig(os.path.join(os.path.dirname(__file__), 'easyconfigs', 'gzip-1.5-goolf-1.4.10.eb')) self.assertEqual(['/'.join([x['name'], x['version']]) for x in det_toolchain_compilers(ec)], ['GCC/4.7.2']) self.assertEqual(det_toolchain_mpi(ec)['name'], 'OpenMPI') ec = EasyConfig(os.path.join(os.path.dirname(__file__), 'easyconfigs', 'hwloc-1.6.2-GCC-4.6.4.eb')) tc_comps = det_toolchain_compilers(ec) self.assertEqual(['/'.join([x['name'], x['version']]) for x in tc_comps], ['GCC/4.6.4']) self.assertEqual(det_toolchain_mpi(ec), None) ec = EasyConfig(os.path.join(os.path.dirname(__file__), 'easyconfigs', 'toy-0.0.eb')) self.assertEqual(det_toolchain_compilers(ec), None) self.assertEqual(det_toolchain_mpi(ec), None)
def det_modpath_extensions(self, ec): """ Determine module path extensions, if any. Examples: Compiler/GCC/4.8.3 (for GCC/4.8.3 module), MPI/GCC/4.8.3/OpenMPI/1.6.5 (for OpenMPI/1.6.5 module) """ modclass = ec['moduleclass'] tc_comps = det_toolchain_compilers(ec) tc_comp_info = self.det_toolchain_compilers_name_version(tc_comps) paths = [] if modclass == MODULECLASS_COMPILER or ec['name'] in ['CUDA']: # obtain list of compilers based on that extend $MODULEPATH in some way other than <name>/<version> extend_comps = [] # exclude GCC for which <name>/<version> is used as $MODULEPATH extension excluded_comps = ['GCC'] for comps in COMP_NAME_VERSION_TEMPLATES.keys(): extend_comps.extend([comp for comp in comps.split(',') if comp not in excluded_comps]) comp_name_ver = None if ec['name'] in extend_comps: for key in COMP_NAME_VERSION_TEMPLATES: if ec['name'] in key.split(','): comp_name, comp_ver_tmpl = COMP_NAME_VERSION_TEMPLATES[key] comp_versions = {ec['name']: self.det_full_version(ec)} if ec['name'] == 'ifort': # 'icc' key should be provided since it's the only one used in the template comp_versions.update({'icc': self.det_full_version(ec)}) if tc_comp_info is not None: # also provide toolchain version for non-dummy toolchains comp_versions.update({tc_comp_info[0]: tc_comp_info[1]}) comp_name_ver = [comp_name, comp_ver_tmpl % comp_versions] break else: comp_name_ver = [ec['name'], self.det_full_version(ec)] paths.append(os.path.join(COMPILER, *comp_name_ver)) elif modclass == MODULECLASS_MPI: if tc_comp_info is None: tup = (ec['toolchain'], ec['name'], ec['version']) error_msg = ("No compiler available in toolchain %s used to install MPI library %s v%s, " "which is required by the active module naming scheme.") % tup self.log.error(error_msg) else: tc_comp_name, tc_comp_ver = tc_comp_info fullver = self.det_full_version(ec) paths.append(os.path.join(MPI, tc_comp_name, tc_comp_ver, ec['name'], fullver)) return paths
def det_modpath_extensions(self, ec): """ Determine module path extensions, if any. Examples: Compiler/GCC/4.8.3 (for GCC/4.8.3 module), MPI/GCC/4.8.3/OpenMPI/1.6.5 (for OpenMPI/1.6.5 module) """ modclass = ec["moduleclass"] paths = [] if modclass == "compiler": paths.append(os.path.join(COMPILER, ec["name"], ec["version"])) elif modclass == "mpi": tc_comps = det_toolchain_compilers(ec) tc_comp_name, tc_comp_ver = self.det_toolchain_compilers_name_version(tc_comps) fullver = ec["version"] + ec["versionsuffix"] paths.append(os.path.join(MPI, tc_comp_name, tc_comp_ver, ec["name"], fullver)) return paths
def det_module_subdir(self, ec): """ Determine module subdirectory, relative to the top of the module path. This determines the separation between module names exposed to users, and what's part of the $MODULEPATH. Examples: Core, Compiler/GCC/4.8.3, MPI/GCC/4.8.3/OpenMPI/1.6.5 """ # determine prefix based on type of toolchain used tc_comps = det_toolchain_compilers(ec) if tc_comps is None: # no compiler in toolchain, dummy toolchain => Core module subdir = CORE else: tc_comp_name, tc_comp_ver = self.det_toolchain_compilers_name_version(tc_comps) tc_mpi = det_toolchain_mpi(ec) if tc_mpi is None: # compiler-only toolchain => Compiler/<compiler_name>/<compiler_version> namespace subdir = os.path.join(COMPILER, tc_comp_name, tc_comp_ver) else: # compiler-MPI toolchain => MPI/<comp_name>/<comp_version>/<MPI_name>/<MPI_version> namespace tc_mpi_fullver = tc_mpi["version"] + tc_mpi["versionsuffix"] subdir = os.path.join(MPI, tc_comp_name, tc_comp_ver, tc_mpi["name"], tc_mpi_fullver) return subdir
def det_module_subdir(self, ec): """ Determine module subdirectory, relative to the top of the module path. This determines the separation between module names exposed to users, and what's part of the $MODULEPATH. Examples: Core, Compiler/GCC/4.8.3, MPI/GCC/4.8.3/OpenMPI/1.6.5 """ tc_comps = det_toolchain_compilers(ec) tc_comp_info = self.det_toolchain_compilers_name_version(tc_comps) # determine prefix based on type of toolchain used if tc_comp_info is None: # no compiler in toolchain, dummy toolchain => Core module subdir = CORE # except if the module is a MPI settings module stripped_name = re.sub('-settings$', '', ec['name']) if stripped_name in mpi_with_settings: subdir = os.path.join(MPI_SETTINGS, stripped_name, ec['version']) else: tc_comp_name, tc_comp_ver = self._find_relevant_compiler_info( tc_comp_info) tc_mpi = det_toolchain_mpi(ec) if tc_mpi is None: # compiler-only toolchain => Compiler/<compiler_name>/<compiler_version> namespace # but we want the mpi module class to stand alone if ec['moduleclass'] == MODULECLASS_MPI: subdir = os.path.join(COMPILER, MODULECLASS_MPI, tc_comp_name, tc_comp_ver) else: subdir = os.path.join(COMPILER, tc_comp_name, tc_comp_ver) else: tc_mpi_name, tc_mpi_ver = self._find_relevant_mpi_info(tc_mpi) # compiler-MPI toolchain => MPI/<comp_name>/<comp_version>/<MPI_name>/<MPI_version> namespace subdir = os.path.join(MPI, tc_comp_name, tc_comp_ver, tc_mpi_name, tc_mpi_ver) return subdir
def det_modpath_extensions(self, ec): """ Determine module path extensions, if any. Examples: Compiler/GCC/4.8.3 (for GCC/4.8.3 module), MPI/GCC/4.8.3/OpenMPI/1.6.5 (for OpenMPI/1.6.5 module) """ modclass = ec['moduleclass'] tc_comps = det_toolchain_compilers(ec) tc_comp_info = self.det_toolchain_compilers_name_version(tc_comps) # we consider the following to be compilers: # * has 'compiler' specified as moduleclass is_compiler = modclass == MODULECLASS_COMPILER # * CUDA, but only when not installed with 'dummy' toolchain (i.e. one or more toolchain compilers found) non_dummy_tc = tc_comps is not None non_dummy_cuda = ec['name'] == 'CUDA' and non_dummy_tc paths = [] if is_compiler or non_dummy_cuda: # obtain list of compilers based on that extend $MODULEPATH in some way other than <name>/<version> extend_comps = [] # exclude GCC for which <name>/<version> is used as $MODULEPATH extension excluded_comps = ['GCC'] for comps in COMP_NAME_VERSION_TEMPLATES.keys(): extend_comps.extend([ comp for comp in comps.split(',') if comp not in excluded_comps ]) comp_name_ver = None if ec['name'] in extend_comps: for key in COMP_NAME_VERSION_TEMPLATES: comp_names = key.split(',') if ec['name'] in comp_names: comp_name, comp_ver_tmpl = COMP_NAME_VERSION_TEMPLATES[ key] comp_versions = {ec['name']: self.det_full_version(ec)} if ec['name'] == 'ifort': # 'icc' key should be provided since it's the only one used in the template comp_versions.update( {'icc': self.det_full_version(ec)}) if non_dummy_tc: tc_comp_name, tc_comp_ver = tc_comp_info if tc_comp_name in comp_names: # also provide toolchain version for non-dummy toolchains comp_versions.update( {tc_comp_name: tc_comp_ver}) comp_ver_keys = re.findall(r'%\((\w+)\)s', comp_ver_tmpl) if all(comp_ver_key in comp_versions for comp_ver_key in comp_ver_keys): comp_name_ver = [ comp_name, comp_ver_tmpl % comp_versions ] break else: comp_name_ver = [ec['name'], self.det_full_version(ec)] if comp_name_ver is None: raise EasyBuildError( "Required compilers not available in toolchain %s for %s v%s", ec['toolchain'], ec['name'], ec['version']) paths.append(os.path.join(COMPILER, *comp_name_ver)) elif modclass == MODULECLASS_MPI: if tc_comp_info is None: raise EasyBuildError( "No compiler available in toolchain %s used to install MPI library %s v%s, " "which is required by the active module naming scheme.", ec['toolchain'], ec['name'], ec['version']) else: tc_comp_name, tc_comp_ver = tc_comp_info fullver = self.det_full_version(ec) paths.append( os.path.join(MPI, tc_comp_name, tc_comp_ver, ec['name'], fullver)) return paths
def det_modpath_extensions(self, ec): """ Determine module path extensions, if any. Examples: Compiler/GCC/4.8.3 (for GCC/4.8.3 module), MPI/GCC/4.8.3/OpenMPI/1.6.5 (for OpenMPI/1.6.5 module) """ modclass = ec['moduleclass'] tc_comps = det_toolchain_compilers(ec) tc_comp_info = self.det_toolchain_compilers_name_version(tc_comps) paths = [] if modclass == MODULECLASS_COMPILER or ec['name'] in ['iccifort']: # obtain list of compilers based on that extend $MODULEPATH in some way other than <name>/<version> extend_comps = [] # exclude GCC for which <name>/<version> is used as $MODULEPATH extension excluded_comps = ['GCC'] for comps in COMP_NAME_VERSION_TEMPLATES.keys(): extend_comps.extend([ comp for comp in comps.split(',') if comp not in excluded_comps ]) comp_name_ver = None if ec['name'] in extend_comps: for key in COMP_NAME_VERSION_TEMPLATES: if ec['name'] in key.split(','): comp_name, comp_ver_tmpl = COMP_NAME_VERSION_TEMPLATES[ key] comp_versions = {ec['name']: self.det_full_version(ec)} if ec['name'] == 'ifort': # 'icc' key should be provided since it's the only one used in the template comp_versions.update( {'icc': self.det_full_version(ec)}) if tc_comp_info is not None: # also provide toolchain version for non-dummy toolchains comp_versions.update( {tc_comp_info[0]: tc_comp_info[1]}) comp_name_ver = [ comp_name, comp_ver_tmpl % comp_versions ] break else: comp_name_ver = [ec['name'], self.det_full_version(ec)] # Handle the case where someone only wants iccifort to extend the path # This means icc/ifort are not of the moduleclass compiler but iccifort is if ec['name'] == 'iccifort': comp_name_ver = ['intel', self.det_full_version(ec)] # Exclude extending the path for icc/ifort, the iccifort special case is handled above if ec['name'] not in ['icc', 'ifort']: # Overwrite version if necessary comp_name_ver = self._find_relevant_compiler_info( comp_name_ver) paths.append(os.path.join(COMPILER, *comp_name_ver)) # Always extend to capture the MPI implementations too (which are in a separate directory) if ec['name'] not in [GCCCORE]: paths.append( os.path.join(COMPILER, MODULECLASS_MPI, *comp_name_ver)) elif modclass == MODULECLASS_MPI: if tc_comp_info is None: raise EasyBuildError( "No compiler available in toolchain %s used to install MPI library %s v%s, " "which is required by the active module naming scheme.", ec['toolchain'], ec['name'], ec['version']) else: tc_comp_name, tc_comp_ver = self._find_relevant_compiler_info( tc_comp_info) mpi_name, mpi_ver = self._find_relevant_mpi_info(ec) paths.append( os.path.join(MPI, tc_comp_name, tc_comp_ver, mpi_name, mpi_ver)) if ec['name'] in mpi_with_settings: paths.append(os.path.join(MPI_SETTINGS, mpi_name, mpi_ver)) return paths
def det_modpath_extensions(self, ec): """ Determine module path extensions, if any. Examples: Compiler/GCC/4.8.3 (for GCC/4.8.3 module), MPI/GCC/4.8.3/OpenMPI/1.6.5 (for OpenMPI/1.6.5 module) """ modclass = ec['moduleclass'] tc_comps = det_toolchain_compilers(ec) tc_comp_info = self.det_toolchain_compilers_name_version(tc_comps) # we consider the following to be compilers: # * has 'compiler' specified as moduleclass is_compiler = modclass == MODULECLASS_COMPILER # * CUDA, but only when not installed with 'dummy' toolchain (i.e. one or more toolchain compilers found) non_dummy_tc = tc_comps is not None non_dummy_cuda = ec['name'] == 'CUDA' and non_dummy_tc paths = [] if is_compiler or non_dummy_cuda: # obtain list of compilers based on that extend $MODULEPATH in some way other than <name>/<version> extend_comps = [] # exclude GCC for which <name>/<version> is used as $MODULEPATH extension excluded_comps = ['GCC'] for comps in COMP_NAME_VERSION_TEMPLATES.keys(): extend_comps.extend([comp for comp in comps.split(',') if comp not in excluded_comps]) comp_name_ver = None if ec['name'] in extend_comps: for key in COMP_NAME_VERSION_TEMPLATES: comp_names = key.split(',') if ec['name'] in comp_names: comp_name, comp_ver_tmpl = COMP_NAME_VERSION_TEMPLATES[key] comp_versions = {ec['name']: self.det_full_version(ec)} if ec['name'] == 'ifort': # 'icc' key should be provided since it's the only one used in the template comp_versions.update({'icc': self.det_full_version(ec)}) if non_dummy_tc: tc_comp_name, tc_comp_ver = tc_comp_info if tc_comp_name in comp_names: # also provide toolchain version for non-dummy toolchains comp_versions.update({tc_comp_name: tc_comp_ver}) comp_ver_keys = re.findall(r'%\((\w+)\)s', comp_ver_tmpl) if all(comp_ver_key in comp_versions for comp_ver_key in comp_ver_keys): comp_name_ver = [comp_name, comp_ver_tmpl % comp_versions] break else: comp_name_ver = [ec['name'], self.det_full_version(ec)] if comp_name_ver is None: raise EasyBuildError("Required compilers not available in toolchain %s for %s v%s", ec['toolchain'], ec['name'], ec['version']) paths.append(os.path.join(COMPILER, *comp_name_ver)) elif modclass == MODULECLASS_MPI: if tc_comp_info is None: raise EasyBuildError("No compiler available in toolchain %s used to install MPI library %s v%s, " "which is required by the active module naming scheme.", ec['toolchain'], ec['name'], ec['version']) else: tc_comp_name, tc_comp_ver = tc_comp_info fullver = self.det_full_version(ec) paths.append(os.path.join(MPI, tc_comp_name, tc_comp_ver, ec['name'], fullver)) return paths
def det_modpath_extensions(self, ec): """ Determine module path extensions, if any. Examples: avx2/Compiler/gcc4.8 (for GCC/4.8.5 module), avx/MPI/intel2016.4/openmpi2.0 (for OpenMPI/2.0.2 module) """ modclass = ec['moduleclass'] tc_comp_info = None if ec.toolchain.name != CUDACORE: tc_comps = det_toolchain_compilers(ec) tc_comp_info = self.det_toolchain_compilers_name_version(tc_comps) paths = [] if modclass == MODULECLASS_COMPILER or ec['name'] in ['iccifort']: # obtain list of compilers based on that extend $MODULEPATH in some way other than <name>/<version> extend_comps = [] # exclude GCC, PGI, and NVHPC for which <name>/<version> is used as $MODULEPATH extension excluded_comps = ['GCC', 'PGI', 'NVHPC'] for comps in COMP_NAME_VERSION_TEMPLATES.keys(): extend_comps.extend([comp for comp in comps.split(',') if comp not in excluded_comps]) comp_name_ver = None if ec['name'] in extend_comps: for key in COMP_NAME_VERSION_TEMPLATES: if ec['name'] in key.split(','): comp_name, comp_ver_tmpl = COMP_NAME_VERSION_TEMPLATES[key] comp_versions = {ec['name']: self.det_twodigit_version(ec)} if ec['name'] == 'ifort': # 'icc' key should be provided since it's the only one used in the template comp_versions.update({'icc': self.det_twodigit_version(ec)}) if tc_comp_info is not None: # also provide toolchain version for non-dummy toolchains comp_versions.update({tc_comp_info[0]: tc_comp_info[1]}) try: comp_name_ver = [comp_name.lower() + comp_ver_tmpl % comp_versions] except KeyError: continue break else: comp_name_ver = [ec['name'].lower() + self.det_twodigit_version(ec)] # Handle the case where someone only wants iccifort to extend the path # This means icc/ifort are not of the moduleclass compiler but iccifort is if ec['name'] in ['iccifort', 'intel-compilers']: comp_name_ver = ['intel' + self.det_twodigit_version(ec)] # Exclude extending the path for icc/ifort, the iccifort special case is handled above # XXX use custom code for MODULEPATH for compilers via modluafooter #if ec['name'] not in ['icc', 'ifort']: # paths.append(os.path.join(COMPILER, *comp_name_ver)) elif ec['name'] == CUDACORE: paths.append(os.path.join(CUDA, CUDA.lower()+self.det_twodigit_version(ec))) elif modclass == MODULECLASS_MPI or ec['name'] == CUDA: if modclass == MODULECLASS_MPI: prefix = MPI else: prefix = CUDA if tc_comp_info is None: raise EasyBuildError("No compiler available in toolchain %s used to install %s library %s v%s, " "which is required by the active module naming scheme.", ec['toolchain'], prefix, ec['name'].lower(), ec['version']) else: tc_comp_name, tc_comp_ver = tc_comp_info tc_comp_name = tc_comp_name.lower().split('-')[0] tc_comp_ver = self.det_twodigit_version({'name': tc_comp_name, 'version': tc_comp_ver}) fullver = self.det_twodigit_version(ec) tc_cuda = det_toolchain_cuda(ec) subdir = tc_comp_name+tc_comp_ver if prefix == MPI and tc_cuda is not None: tc_cuda_name = tc_cuda['name'].lower() tc_cuda_fullver = self.det_twodigit_version(tc_cuda) subdir = os.path.join(subdir, tc_cuda_name+tc_cuda_fullver) paths.append(os.path.join(prefix, subdir, ec['name'].lower()+fullver)) if os.getenv('RSNT_ARCH') is None: raise EasyBuildError("Need to set architecture for MODULEPATH extension in $RSNT_ARCH") if ec['name'] != CUDACORE: for i, path in enumerate(paths): paths[i] = os.path.join(os.getenv('RSNT_ARCH'), path) return paths