def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): mklfiles = None mkldirs = None if LooseVersion(self.version()) >= LooseVersion('10.3'): if self.getcfg('m32'): self.log.error("Sanity check for 32-bit not implemented yet for IMKL v%s (>= 10.3)" % self.version()) else: mklfiles = ["mkl/lib/intel64/libmkl.so", "mkl/include/mkl.h"] mkldirs = ["bin", "mkl/bin", "mkl/bin/intel64", "compiler/lib/intel64", "mkl/lib/intel64", "mkl/include"] else: if self.getcfg('m32'): mklfiles = ["lib/32/libmkl.so", "include/mkl.h"] mkldirs = ["lib/32", "include/32", "interfaces"] else: mklfiles = ["lib/em64t/libmkl.so", "include/mkl.h"] mkldirs = ["lib/em64t", "include/em64t", "interfaces"] self.setcfg('sanityCheckPaths', { 'files': mklfiles, 'dirs': mkldirs }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) IntelBase.sanitycheck(self)
def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', { 'files':[], 'dirs':["tbb/bin", "tbb/lib/", "tbb/libs/"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) IntelBase.sanitycheck(self)
def make_install(self): """ Actual installation - create silent cfg file - execute command """ if LooseVersion(self.version()) >= LooseVersion('4.0.1'): #impi starting from version 4.0.1.x uses standard installation procedure. IntelBase.make_install(self) return None else: #impi up until version 4.0.0.x uses custom installation procedure. silent = \ """ [mpi] INSTALLDIR=%(ins)s LICENSEPATH=%(lic)s INSTALLMODE=NONRPM INSTALLUSER=NONROOT UPDATE_LD_SO_CONF=NO PROCEED_WITHOUT_PYTHON=yes AUTOMOUNTED_CLUSTER=yes EULA=accept [mpi-rt] INSTALLDIR=%(ins)s LICENSEPATH=%(lic)s INSTALLMODE=NONRPM INSTALLUSER=NONROOT UPDATE_LD_SO_CONF=NO PROCEED_WITHOUT_PYTHON=yes AUTOMOUNTED_CLUSTER=yes EULA=accept """ % {'lic':self.license, 'ins':self.installdir} # already in correct directory silentcfg = os.path.join(os.getcwd(), "silent.cfg") try: f = open(silentcfg, 'w') f.write(silent) f.close() except: self.log.exception("Writing silent cfg file %s failed." % silent) tmpdir = os.path.join(os.getcwd(), self.version(), 'mytmpdir') try: os.makedirs(tmpdir) except: self.log.exception("Directory %s can't be created" % (tmpdir)) cmd = "./install.sh --tmp-dir=%s --silent=%s" % (tmpdir, silentcfg) run_cmd(cmd, log_all=True, simple=True)
def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): self.setcfg('sanityCheckPaths', { 'files': ["ipp/lib/intel64/libipp%s" % y for x in ["ac", "cc", "ch", "core", "cv", "dc", "di", "i", "j", "m", "r", "s", "sc", "vc", "vm"] for y in ["%s.a" % x, "%s.so" % x]], 'dirs': ["compiler/lib/intel64", "ipp/bin", "ipp/include", "ipp/interfaces/data-compression", "ipp/tools/intel64"] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) IntelBase.sanitycheck(self)
def make_module_extra(self): """Overwritten from Application to add extra txt""" txt = IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) txt += "setenv\t%s\t\t$root\n" % ('I_MPI_ROOT') return txt
def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" txt = IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('LD_LIBRARY_PATH', self.libpath) return txt
def make_module_extra(self): """Add extra environment variables for icc, for license file and NLS path.""" txt = IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/intel64/locale/%l_%t/%N') return txt
def make_module_extra(self): """Overwritten from IntelBase to add extra txt""" txt = IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) txt += "setenv\t%s\t\t$root\n" % 'VT_ROOT' txt += "setenv\t%s\t\t%s\n" % ('VT_MPI', self.getcfg('preferredmpi')) txt += "setenv\t%s\t\t%s\n" % ('VT_ADD_LIBS', '"-ldwarf -lelf -lvtunwind -lnsl -lm -ldl -lpthread"') return txt
def sanitycheck(self): if not self.getcfg('sanityCheckPaths'): libprefix = "" if LooseVersion(self.version()) >= LooseVersion("2011"): libprefix = "compiler/lib/intel64/lib" else: libprefix = "lib/intel64/lib" self.setcfg('sanityCheckPaths', { 'files': ["bin/intel64/%s" % x for x in ["icc", "icpc", "idb"]] + ["%s%s" % (libprefix, x) for x in ["iomp5.a", "iomp5.so"]], 'dirs': [] }) self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths')) IntelBase.sanitycheck(self)
def make_module_extra(self): """Overwritten from Application to add extra txt""" txt = IntelBase.make_module_extra(self) txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license) if self.getcfg('m32'): txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/32/locale/%l_%t/%N') else: txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/intel64/locale/%l_%t/%N') txt += "setenv\t%s\t\t$root\n" % 'MKLROOT' return txt
def make_install(self): """overwrite make_install to add extra symlinks""" IntelBase.make_install(self) # save libdir os.chdir(self.installdir) libglob = 'tbb/libs/intel64/cc*libc*_kernel*' libs = glob.glob(libglob) if len(libs): libdir = libs[-1] # take the last one, should be ordered by cc version. else: self.log.error("No libs found using %s in %s" % (libglob, self.installdir)) self.libdir = libdir self.libpath = "%s/tbb/libs/intel64/%s/" % (self.installdir, libdir) # 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(self.libpath, install_libpath)
def extra_options(): extra_vars = {'preferredmpi': ['impi3', "Preferred MPI type (default: 'impi3')"]} return IntelBase.extra_options(extra_vars)
def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" IntelBase.__init__(self, *args, **kwargs)
def configure(self): IntelBase.configure(self) if os.getenv('MKLROOT'): self.log.error("Found MKLROOT in current environment, which may cause problems...")
def extra_options(): extra_vars = {'interfaces': [True, "Indicates whether interfaces should be built (default: True)"]} return IntelBase.extra_options(extra_vars)