Skip to content
Merged
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
21 changes: 6 additions & 15 deletions easybuild/easyblocks/n/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_libs_for_mkl(varname):
lapack = ', '.join([lapack, "cblas"])
cblaslib = os.path.join(cblasroot, 'lib')
# with numpy as extension, CBLAS might not be included in LDFLAGS because it's not part of a toolchain
if not cblaslib in libs:
if cblaslib not in libs:
libs = ':'.join([libs, cblaslib])
else:
raise EasyBuildError("CBLAS is required next to ACML to provide a C interface to BLAS, "
Expand Down Expand Up @@ -297,13 +297,8 @@ def run(self):
def sanity_check_step(self, *args, **kwargs):
"""Custom sanity check for numpy."""

custom_paths = {
'files': [],
'dirs': [self.pylibdir],
}
custom_commands = [
('python', '-c "import numpy"'),
]
custom_commands = []

if LooseVersion(self.version) >= LooseVersion("1.10"):
# generic check to see whether numpy v1.10.x and up was built against a CBLAS-enabled library
# cfr. https://github.com/numpy/numpy/issues/6675#issuecomment-162601149
Expand All @@ -313,16 +308,12 @@ def sanity_check_step(self, *args, **kwargs):
"blas_ok = 'HAVE_CBLAS' in dict(numpy.__config__.blas_opt_info['define_macros'])",
"sys.exit((1, 0)[blas_ok])",
])
custom_commands.append(('python', '-c "%s"' % blas_check_pytxt))
custom_commands.append('python -c "%s"' % blas_check_pytxt)
else:
# _dotblas is required for decent performance of numpy.dot(), but only there in numpy 1.9.x and older
custom_commands.append (('python', '-c "import numpy.core._dotblas"'))

# make sure the installation path is in $PYTHONPATH so the sanity check commands can work
pythonpath = os.environ.get('PYTHONPATH', '')
os.environ['PYTHONPATH'] = ':'.join([self.pylibdir, pythonpath])
custom_commands.append("python -c 'import numpy.core._dotblas'")

return super(EB_numpy, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)
return super(EB_numpy, self).sanity_check_step(custom_commands=custom_commands)

def make_module_extra_numpy_include(self):
"""
Expand Down
10 changes: 0 additions & 10 deletions easybuild/easyblocks/s/scipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
@author: Pieter De Baets (Ghent University)
@author: Jens Timmerman (Ghent University)
"""
import os
from distutils.version import LooseVersion

from easybuild.easyblocks.generic.fortranpythonpackage import FortranPythonPackage
Expand All @@ -57,12 +56,3 @@ def configure_step(self):
# which requires unsetting $LDFLAGS
if self.toolchain.comp_family() in [toolchain.GCC, toolchain.CLANGGCC]: # @UndefinedVariable
self.cfg.update('preinstallopts', "unset LDFLAGS && ")

def sanity_check_step(self, *args, **kwargs):
"""Custom sanity check for scipy."""
custom_paths = {
'files': [],
'dirs': [self.pylibdir],
}
custom_commands = [(self.python_cmd, '-c "import scipy"')]
return super(EB_scipy, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)