本文整理汇总了Python中easybuild.easyblocks.generic.intelbase.IntelBase类的典型用法代码示例。如果您正苦于以下问题:Python IntelBase类的具体用法?Python IntelBase怎么用?Python IntelBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IntelBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: sanity_check_step
def sanity_check_step(self):
"""Custom sanity check paths for ifort."""
binprefix = "bin/intel64"
libprefix = "lib/intel64/lib"
if LooseVersion(self.version) >= LooseVersion("2011"):
if LooseVersion(self.version) <= LooseVersion("2011.3.174"):
binprefix = "bin"
elif LooseVersion(self.version) >= LooseVersion("2013_sp1"):
binprefix = "bin"
libprefix = "lib/intel64/lib"
else:
libprefix = "compiler/lib/intel64/lib"
bins = ["ifort"]
if LooseVersion(self.version) < LooseVersion('2013'):
# idb is not shipped with ifort anymore in 2013.x versions (it is with icc though)
bins.append("idb")
custom_paths = {
'files': ["%s/%s" % (binprefix, x) for x in bins] +
["%s%s" % (libprefix, x) for x in ["ifcore.a", "ifcore.so", "iomp5.a", "iomp5.so"]],
'dirs': [],
}
IntelBase.sanity_check_step(self, custom_paths=custom_paths)
示例2: sanity_check_step
def sanity_check_step(self):
"""Custom sanity check paths for ifort."""
shlib_ext = get_shared_lib_ext()
binprefix = 'bin/intel64'
libprefix = 'lib/intel64'
if LooseVersion(self.version) >= LooseVersion('2011'):
if LooseVersion(self.version) <= LooseVersion('2011.3.174'):
binprefix = 'bin'
elif LooseVersion(self.version) >= LooseVersion('2013_sp1'):
binprefix = 'bin'
else:
libprefix = 'compiler/lib/intel64'
bins = ['ifort']
if LooseVersion(self.version) < LooseVersion('2013'):
# idb is not shipped with ifort anymore in 2013.x versions (it is with icc though)
bins.append('idb')
libs = ['ifcore.a', 'ifcore.%s' % shlib_ext, 'iomp5.a', 'iomp5.%s' % shlib_ext]
custom_paths = {
'files': [os.path.join(binprefix, x) for x in bins] + [os.path.join(libprefix, 'lib%s' % l) for l in libs],
'dirs': [],
}
custom_commands = ["which ifort"]
IntelBase.sanity_check_step(self, custom_paths=custom_paths, custom_commands=custom_commands)
示例3: configure_step
def configure_step(self):
"""Configure TBB build/installation."""
if self.toolchain.name == DUMMY_TOOLCHAIN_NAME:
IntelBase.configure_step(self)
else:
# no custom configure step when building from source
pass
示例4: sanity_check_step
def sanity_check_step(self):
"""Custom sanity check paths for ifort."""
shlib_ext = get_shared_lib_ext()
binprefix = 'bin/intel64'
libprefix = 'lib/intel64'
if LooseVersion(self.version) >= LooseVersion('2011'):
if LooseVersion(self.version) <= LooseVersion('2011.3.174'):
binprefix = 'bin'
elif LooseVersion(self.version) >= LooseVersion('2013_sp1'):
binprefix = 'bin'
else:
libprefix = 'compiler/lib/intel64'
bins = ['ifort']
if LooseVersion(self.version) < LooseVersion('2013'):
# idb is not shipped with ifort anymore in 2013.x versions (it is with icc though)
bins.append('idb')
libs = ['ifcore.a', 'ifcore.%s' % shlib_ext, 'iomp5.a', 'iomp5.%s' % shlib_ext]
custom_paths = {
'files': [os.path.join(binprefix, x) for x in bins] + [os.path.join(libprefix, 'lib%s' % l) for l in libs],
'dirs': [],
}
# make very sure that expected 'compilers_and_libraries_<VERSION>/linux' subdir is there for recent versions,
# since we rely on it being there in make_module_req_guess
if self.comp_libs_subdir:
custom_paths['dirs'].append(self.comp_libs_subdir)
custom_commands = ["which ifort"]
IntelBase.sanity_check_step(self, custom_paths=custom_paths, custom_commands=custom_commands)
示例5: sanity_check_step
def sanity_check_step(self):
"""Custom sanity check paths for ifort."""
binprefix = 'bin/intel64'
libprefix = 'lib/intel64'
if LooseVersion(self.version) >= LooseVersion('2011'):
if LooseVersion(self.version) <= LooseVersion('2011.3.174'):
binprefix = 'bin'
elif LooseVersion(self.version) >= LooseVersion('2013_sp1'):
binprefix = 'bin'
else:
libprefix = 'compiler/lib/intel64'
bins = ['ifort']
if LooseVersion(self.version) < LooseVersion('2013'):
# idb is not shipped with ifort anymore in 2013.x versions (it is with icc though)
bins.append('idb')
custom_paths = {
'files': [os.path.join(binprefix, x) for x in bins] +
[os.path.join(libprefix, 'lib%s' % x) for x in ['ifcore.a', 'ifcore.so', 'iomp5.a', 'iomp5.so']],
'dirs': [],
}
IntelBase.sanity_check_step(self, custom_paths=custom_paths)
示例6: build_step
def build_step(self):
"""Configure TBB build/installation."""
if self.toolchain.name == DUMMY_TOOLCHAIN_NAME:
IntelBase.build_step(self)
else:
# build with: make compiler={icl, icc, gcc, clang}
self.cfg.update('buildopts', 'compiler="%s"' % os.getenv('CC'))
ConfigureMake.build_step(self)
示例7: install_step
def install_step(self):
"""Custom install step, to add extra symlinks"""
if self.toolchain.name == DUMMY_TOOLCHAIN_NAME:
silent_cfg_names_map = None
silent_cfg_extras = None
if LooseVersion(self.version) < LooseVersion('4.2'):
silent_cfg_names_map = {
'activation_name': ACTIVATION_NAME_2012,
'license_file_name': LICENSE_FILE_NAME_2012,
}
elif LooseVersion(self.version) < LooseVersion('4.4'):
silent_cfg_names_map = {
'install_mode_name': INSTALL_MODE_NAME_2015,
'install_mode': INSTALL_MODE_2015,
}
# In case of TBB 4.4.x and newer we have to specify ARCH_SELECTED in silent.cfg
if LooseVersion(self.version) >= LooseVersion('4.4'):
silent_cfg_extras = {
'ARCH_SELECTED': self.arch.upper()
}
IntelBase.install_step(self, silent_cfg_names_map=silent_cfg_names_map, silent_cfg_extras=silent_cfg_extras)
# determine libdir
os.chdir(self.installdir)
if LooseVersion(self.version) < LooseVersion('4.1.0'):
libglob = 'tbb/lib/intel64/cc*libc*_kernel*'
libs = sorted(glob.glob(libglob), key=LooseVersion)
if len(libs):
# take the last one, should be ordered by cc version
# we're only interested in the last bit
libdir = libs[-1].split('/')[-1]
else:
raise EasyBuildError("No libs found using %s in %s", libglob, self.installdir)
else:
libdir = get_tbb_gccprefix()
self.libpath = os.path.join('tbb', 'libs', 'intel64', libdir)
self.log.debug("self.libpath: %s" % self.libpath)
# applications go looking into tbb/lib so we move what's in there to libs
# and symlink the right lib from /tbb/libs/intel64/... to lib
install_libpath = os.path.join(self.installdir, 'tbb', 'lib')
shutil.move(install_libpath, os.path.join(self.installdir, 'tbb', 'libs'))
os.symlink(os.path.join(self.installdir, self.libpath), install_libpath)
else:
# no custom install step when building from source (building is done in install directory)
cand_lib_paths = glob.glob(os.path.join(self.installdir, 'build', '*_release'))
if len(cand_lib_paths) == 1:
self.libpath = os.path.join('build', os.path.basename(cand_lib_paths[0]))
else:
raise EasyBuildError("Failed to isolate location of libraries: %s", cand_lib_paths)
示例8: extra_options
def extra_options():
extra_vars = {
'set_mpi_wrappers_compiler': [False, 'Override default compiler used by MPI wrapper commands', CUSTOM],
'set_mpi_wrapper_aliases_gcc': [False, 'Set compiler for mpigcc/mpigxx via aliases', CUSTOM],
'set_mpi_wrapper_aliases_intel': [False, 'Set compiler for mpiicc/mpiicpc/mpiifort via aliases', CUSTOM],
'set_mpi_wrappers_all': [False, 'Set (default) compiler for all MPI wrapper commands', CUSTOM],
}
return IntelBase.extra_options(extra_vars)
示例9: extra_options
def extra_options():
extra_vars = {
'ofi_internal': [True, 'Use internal shipped libfabric instead of external libfabric', CUSTOM],
'set_mpi_wrappers_compiler': [False, 'Override default compiler used by MPI wrapper commands', CUSTOM],
'set_mpi_wrapper_aliases_gcc': [False, 'Set compiler for mpigcc/mpigxx via aliases', CUSTOM],
'set_mpi_wrapper_aliases_intel': [False, 'Set compiler for mpiicc/mpiicpc/mpiifort via aliases', CUSTOM],
'set_mpi_wrappers_all': [False, 'Set (default) compiler for all MPI wrapper commands', CUSTOM],
}
return IntelBase.extra_options(extra_vars)
示例10: sanity_check_step
def sanity_check_step(self):
"""Custom sanity check paths for ifort."""
binprefix = "bin/intel64"
libprefix = "lib/intel64/lib"
if LooseVersion(self.version) >= LooseVersion("2011"):
if LooseVersion(self.version) <= LooseVersion("2011.3.174"):
binprefix = "bin"
else:
libprefix = "compiler/lib/intel64/lib"
custom_paths = {
'files': ["%s/%s" % (binprefix, x) for x in ["ifort", "idb"]] +
["%s%s" % (libprefix, x) for x in ["ifcore.a", "ifcore.so",
"iomp5.a", "iomp5.so"]],
'dirs': []
}
IntelBase.sanity_check_step(self, custom_paths=custom_paths)
示例11: extra_options
def extra_options():
extra_vars = {
'preferredmpi': ['impi3', "Preferred MPI type", CUSTOM],
}
return IntelBase.extra_options(extra_vars)
示例12: extra_options
def extra_options():
"""Add easyconfig parameters custom to imkl (e.g. interfaces)."""
extra_vars = {
'interfaces': [True, "Indicates whether interfaces should be built", CUSTOM],
}
return IntelBase.extra_options(extra_vars)
示例13: extra_options
def extra_options():
extra_vars = [('interfaces', [True, "Indicates whether interfaces should be built (default: True)", CUSTOM])]
return IntelBase.extra_options(extra_vars)
示例14: extra_options
def extra_options():
extra_vars = [('preferredmpi', ['impi3', "Preferred MPI type (default: 'impi3')", CUSTOM])]
return IntelBase.extra_options(extra_vars)
示例15: extra_options
def extra_options():
extra_vars = {"preferredmpi": ["impi3", "Preferred MPI type", CUSTOM]}
return IntelBase.extra_options(extra_vars)