Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions easybuild/easyblocks/g/gromacs.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def configure_step(self):
# build a release build
self.cfg.update('configopts', "-DCMAKE_BUILD_TYPE=Release")

# prefer static libraries, if available
self.cfg.update('configopts', "-DGMX_PREFER_STATIC_LIBS=ON")
# # prefer static libraries, if available
# self.cfg.update('configopts', "-DGMX_PREFER_STATIC_LIBS=ON")

# always specify to use external BLAS/LAPACK
self.cfg.update('configopts', "-DGMX_EXTERNAL_BLAS=ON -DGMX_EXTERNAL_LAPACK=ON")
Expand All @@ -76,7 +76,7 @@ def configure_step(self):

# enable MPI support if desired
if self.toolchain.options.get('usempi', None):
self.cfg.update('configopts', "-DGMX_MPI=ON -DGMX_THREAD_MPI=OFF")
self.cfg.update('configopts', "-DGMX_MPI=ON -DGMX_THREAD_MPI=ON")
else:
self.cfg.update('configopts', "-DGMX_MPI=OFF")

Expand Down Expand Up @@ -147,11 +147,11 @@ def install_step(self):
# rather than trying to replicate the logic, we just figure out where the library was placed

if LooseVersion(self.version) < LooseVersion('5.0'):
# libgmx.a or libgmx_mpi.a
libname = 'libgmx*.a'
# libgmx.[a|so] or libgmx_mpi.[a|so]
libname = 'libgmx*.*'
else:
# libgromacs.a or libgromacs_mpi.a
libname = 'libgromacs*.a'
# libgromacs.[a|so] or libgromacs_mpi.[a|so]
libname = 'libgromacs*.*'

for libdir in ['lib', 'lib64']:
if os.path.exists(os.path.join(self.installdir, libdir)):
Expand Down Expand Up @@ -190,13 +190,34 @@ def sanity_check_step(self):
if LooseVersion(self.version) >= LooseVersion('5.0'):
binaries.append('gmx')

if LooseVersion(self.version) < LooseVersion('5.0'):
# libgmx.[a|so] or libgmx_mpi.[a|so]
libname = 'libgmx*.*'
else:
# libgromacs.[a|so] or libgromacs_mpi.[a|so]
libname = 'libgromacs*.*'

for libdir in ['lib', 'lib64']:
if os.path.exists(os.path.join(self.installdir, libdir)):
for subdir in [libdir, os.path.join(libdir, '*')]:
libpaths = glob.glob(os.path.join(self.installdir, subdir, libname))
if libpaths:
self.lib_subdir = os.path.dirname(libpaths[0])[len(self.installdir)+1:]
self.log.info("Found lib subdirectory that contains %s: %s", libname, self.lib_subdir)
break

if not self.lib_subdir:
raise EasyBuildError("Failed to determine lib subdirectory in %s", self.installdir)

# check for a handful of binaries/libraries that should be there
if LooseVersion(self.version) < LooseVersion('5.0'):
libnames = ['gmxana', 'gmx', 'gmxpreprocess', 'md']
else:
libnames = ['gromacs']

libs = ['lib%s%s.a' % (libname, suff) for libname in libnames]
libs = ['lib%s%s.so' % (libname, suff) for libname in libnames]
print "libdir: %s" % self.lib_subdir
print libs

custom_paths = {
'files': ['bin/%s%s' % (binary, suff) for binary in binaries] +
Expand Down
95 changes: 65 additions & 30 deletions easybuild/easyblocks/i/icc.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,36 @@ def install_step(self):
'license_file_name': LICENSE_FILE_NAME_2012,
}

super(EB_icc, self).install_step(silent_cfg_names_map=silent_cfg_names_map)
if LooseVersion(self.version) >= LooseVersion('2016'):
cfg_extras_map = {
'COMPONENTS': 'ALL',
}
super(EB_icc, self).install_step(silent_cfg_names_map=silent_cfg_names_map, silent_cfg_extras=cfg_extras_map)

def sanity_check_step(self):
"""Custom sanity check paths for icc."""

binprefix = "bin/intel64"
libprefix = "lib/intel64/lib"
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"):
elif LooseVersion(self.version) >= LooseVersion("2013_sp1") and LooseVersion(self.version) < LooseVersion("2016"):
binprefix = "bin"
libprefix = "lib/intel64"
elif LooseVersion(self.version) >= LooseVersion("2016"):
binprefix = "bin"
libprefix = "lib/intel64/lib"
libprefix = "lib/intel64_lin"
else:
libprefix = "compiler/lib/intel64/lib"
libprefix = "compiler/lib/intel64"

binfiles = ["icc", "icpc"]
if LooseVersion(self.version) < LooseVersion("2014"):
binfiles += ["idb"]

custom_paths = {
'files': ["%s/%s" % (binprefix, x) for x in binfiles] +
["%s%s" % (libprefix, x) for x in ["iomp5.a", "iomp5.so"]],
["%s/lib%s" % (libprefix, x) for x in ["iomp5.a", "iomp5.so"]],
'dirs': [],
}

Expand All @@ -105,53 +112,81 @@ def sanity_check_step(self):
def make_module_req_guess(self):
"""Customize paths to check and add in environment.
"""
# New Directory Layout for Intel Parallel Studio XE 2016
# https://software.intel.com/en-us/articles/new-directory-layout-for-intel-parallel-studio-xe-2016
debuggerpath = 'debugger_%s' % self.version.split('.')[0]
if self.cfg['m32']:
# 32-bit toolchain
libpaths = ['lib', 'lib/ia32'],
dirmap = {
'PATH': ['bin', 'bin/ia32', 'tbb/bin/ia32'],
'LD_LIBRARY_PATH': ['lib', 'lib/ia32'],
'LIBRARY_PATH': ['lib', 'lib/ia32'],
'LD_LIBRARY_PATH': libpaths,
'LIBRARY_PATH': libpaths,
'MANPATH': ['man', 'share/man', 'man/en_US'],
'IDB_HOME': ['bin/intel64']
}
else:
# 64-bit toolit
dirmap = {
'PATH': ['bin', 'bin/intel64', 'tbb/bin/emt64'],
'LD_LIBRARY_PATH': ['lib', 'lib/intel64'],
'LIBRARY_PATH': ['lib', 'lib/intel64'],
'MANPATH': ['man', 'share/man', 'man/en_US'],
'IDB_HOME': ['bin/intel64']
}
if LooseVersion(self.version) < LooseVersion("2016"):
# 64-bit toolkit
libpaths = ['compiler/lib/intel64', 'lib/intel64', 'debugger/ipt/intel64/lib', 'ipp/lib/intel64', 'tbb/lib/intel64']
dirmap = {
'PATH': ['bin/intel64', 'tbb/bin/intel64', 'ipp/bin/intel64', 'debugger/gdb/intel64/bin'],
'LD_LIBRARY_PATH': libpaths,
'LIBRARY_PATH': libpaths,
'MANPATH': ['man', 'share/man', 'man/en_US', 'debugger/gdb/intel64/share/man'],
'CPATH': ['ipp/include', 'tbb/include'],
'INTEL_PYTHONHOME': ['debugger/python/intel64']
}
else:
# 64-bit toolkit
libpaths = ['daal/../compiler/lib/intel64_lin', 'daal/../tbb/lib/intel64_lin/gcc4.4', 'daal/lib/intel64_lin', '%s/libipt/intel64/lib' % debuggerpath,'tbb/lib/intel64/gcc4.4', 'mkl/lib/intel64', 'ipp/lib/intel64', 'ipp/../compiler/lib/intel64', 'compiler/lib/intel64']
dirmap = {
'PATH': ['mpi/intel64/bin', 'ipp/bin/intel64', '%s/gdb/intel64/bin' % debuggerpath, 'bin/intel64'],
'LD_LIBRARY_PATH': libpaths,
'LIBRARY_PATH': libpaths,
'MANPATH': ['man/common', 'man/en_US', 'debugger/gdb/intel64/share/man'],
'CPATH': ['daal/include', 'tbb/include', 'mkl/include', 'ipp/include'],
'INTEL_PYTHONHOME': ['%s/python/intel64' % debuggerpath],
'DAALROOT': ['daal'],
'TBBROOT': ['tbb'],
'IPPROOT': ['ipp'],
'CLASSPATH': ['daal/lib/daal.jar'],
}


# in recent Intel compiler distributions, the actual binaries are
# in deeper directories, and symlinked in top-level directories
# however, not all binaries are symlinked (e.g. mcpcom is not)
if os.path.isdir("%s/composerxe-%s" % (self.installdir, self.version)):
prefix = "composerxe-%s" % self.version
# more recent versions of the Intel Compiler (2013.sp1 and newer)
if os.path.isdir("%s/composer_xe_%s" % (self.installdir, self.version)):
prefix = "composer_xe_%s" % self.version
oldmap = dirmap
dirmap = {}
for k, vs in oldmap.items():
dirmap[k] = []
if k == "LD_LIBRARY_PATH":
prefix = "composerxe-%s/compiler" % self.version
else:
prefix = "composerxe-%s" % self.version
prefix = "composer_xe_%s" % self.version
for v in vs:
v2 = "%s/%s" % (prefix, v)
dirmap[k].append(v2)
if os.path.isdir("%s/%s" % (self.installdir, v2)):
dirmap[k].append(v2)

elif os.path.isdir("%s/compiler" % (self.installdir)):
prefix = "compiler"
if os.path.isdir("%s/compilers_and_libraries_%s/linux" % (self.installdir, self.version)):
prefix = "compilers_and_libraries_%s/linux" % self.version
oldmap = dirmap
dirmap = {}
for k, vs in oldmap.items():
dirmap[k] = []
prefix = ''
if k == "LD_LIBRARY_PATH":
prefix = "compiler/"
for v in vs:
v2 = "%s%s" % (prefix, v)
dirmap[k].append(v2)
v2 = "%s/%s" % (prefix, v)
if os.path.exists("%s/%s" % (self.installdir, v2)):
dirmap[k].append(v2)

return dirmap

def make_module_extra(self):
"""Add extra environment variables for icc, for license file and NLS path."""
txt = super(EB_icc, self).make_module_extra()
txt += self.module_generator.prepend_paths(self.license_env_var, self.cfg['license_file'], allow_abs=True)
txt += self.module_generator.prepend_paths('NLSPATH', '$root/idb/intel64/locale/%l_%t/%N')
return txt

4 changes: 4 additions & 0 deletions easybuild/easyblocks/l/lapack.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ def configure_step(self):
self.log.info('No BLAS library provided, so only building LAPACK library (no testing).')
self.cfg.update('buildopts', 'lib')


if os.path.exists(os.path.join(self.cfg['start_dir'], 'lapacke')):
self.cfg.update('buildopts', 'lapackelib')

# don't create a module if we're only testing
def build_step(self):
"""
Expand Down
13 changes: 13 additions & 0 deletions easybuild/easyblocks/q/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def configure_step(self):
"Project MESSAGE:.*",
"rm -f .*",
'Creating qmake...',
'Running configuration tests...',
]
run_cmd_qa(cmd, qa, no_qa=no_qa, log_all=True, simple=True)

Expand All @@ -85,3 +86,15 @@ def sanity_check_step(self):
}

super(EB_Qt, self).sanity_check_step(custom_paths=custom_paths)

def make_module_extra(self):
"""Set correct QT* environment variables."""

txt = super(EB_Qt, self).make_module_extra()

txt += self.module_generator.set_environment('QTDIR', "$root" )
txt += self.module_generator.set_environment('QTLIB', "$root/lib" )
txt += self.module_generator.set_environment('QTINC', "$root/include" )

return txt

73 changes: 73 additions & 0 deletions easybuild/easyblocks/q/qtcreator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
##
# Copyright 2015 Fokko Masselink
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (http://www.herculesstichting.be/in_English)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# http://github.com/hpcugent/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
EasyBuild support for building and installing QtCreator, implemented as an easyblock

@author: Fokko Masselink
"""
import os
import re
import sys
import fileinput
from easybuild.framework.easyblock import EasyBlock
from easybuild.tools.run import run_cmd
from easybuild.tools.filetools import mkdir
import easybuild.tools.environment as env
import easybuild.tools.toolchain as toolchain


from easybuild.easyblocks.generic.configuremake import ConfigureMake
class EB_QTCREATOR(ConfigureMake):
"""Support for building/installing QtCreator."""

def configure_step(self):
"""Adjust configure step"""

# create separate build directory
sep_builddir = 'qt-creator-build'
try:
os.mkdir(sep_builddir)
os.chdir(sep_builddir)
except OSError, err:
self.log.error("Failed to create separate build dir %s in %s: %s" % (objdir, os.getcwd(), err))

cmd = "qmake -r ../qtcreator.pro"
run_cmd(cmd, log_all=True, simple=True)

# update installopts
self.cfg.update('installopts', 'INSTALL_ROOT=%s' % ( self.installdir ))

def sanity_check_step(self):
custom_paths = {
'files': ["bin/qtcreator", "bin/qbs"],
'dirs': ["lib"],
}
super(EB_QTCREATOR, self).sanity_check_step(custom_paths=custom_paths)

def make_module_extra(self):
txt = super(EB_QTCREATOR, self).make_module_extra()
txt += self.module_generator.prepend_paths("PATH", ['bin'])
txt += self.module_generator.prepend_paths("LD_LIBRARY_PATH", ['lib'])
return txt
Loading