diff --git a/singularity/Singularity.intel_mkl b/singularity/Singularity.intel_mkl index 16710f53..a14e9f13 100644 --- a/singularity/Singularity.intel_mkl +++ b/singularity/Singularity.intel_mkl @@ -210,7 +210,27 @@ EOF rm -rf datashape-0.5.2/ pip install --upgrade pip wheel Cython - pip install "numpy<2" + if [ $HAS_MKL = true ]; then + wget https://github.com/numpy/numpy/releases/download/v1.26.4/numpy-1.26.4.tar.gz + tar xvzf numpy-1.26.4.tar.gz + rm numpy-1.26.4.tar.gz + cd numpy-1.26.4/ + python -m pip install . -Csetup-args=-Dblas-order=mkl,openblas,blis -Csetup-args=-Dlapack-order=mkl,openblas,lapack + cd .. + rm -rf numpy-1.26.4/ + + wget https://github.com/scipy/scipy/releases/download/v1.15.1/scipy-1.15.1.tar.gz + tar xvzf scipy-1.15.1.tar.gz + rm scipy-1.15.1.tar.gz + cd scipy-1.15.1/ + export PKG_CONFIG_PATH=$MKLROOT/lib/pkgconfig/ + ls $PKG_CONFIG_PATH + python -m pip install . -Csetup-args=-Dblas=mkl-dynamic-lp64-iomp -Csetup-args=-Dlapack=mkl-dynamic-lp64-iomp + cd .. + rm -rf scipy-1.15.1/ + else + pip install "numpy<2" + fi pip install --no-binary pandas pandas pip install --no-binary h5py h5py pip install -r $INSTALLDIR/requirements.txt @@ -741,6 +761,7 @@ EOF echo export MKLROOT=$MKLROOT >> $INSTALLDIR/init.sh echo export PATH=\$MKLROOT/bin:\$PATH >> $INSTALLDIR/init.sh echo export LD_LIBRARY_PATH=\$MKLROOT/lib:\$LD_LIBRARY_PATH >> $INSTALLDIR/init.sh + echo export PKG_CONFIG_PATH=\$PKG_CONFIG_PATH >> $INSTALLDIR/init.sh fi diff --git a/site.cfg b/site.cfg deleted file mode 100644 index e8171f76..00000000 --- a/site.cfg +++ /dev/null @@ -1,264 +0,0 @@ -# This file provides configuration information about non-Python dependencies for -# numpy.distutils-using packages. Create a file like this called "site.cfg" next -# to your package's setup.py file and fill in the appropriate sections. Not all -# packages will use all sections so you should leave out sections that your -# package does not use. - -# To assist automatic installation like pip, the user's home directory -# will also be checked for the file ~/.numpy-site.cfg . - -# The format of the file is that of the standard library's ConfigParser module. -# No interpolation is allowed; the RawConfigParser class is being used to load it. -# -# https://docs.python.org/library/configparser.html -# -# Each section defines settings that apply to one particular dependency. Some of -# the settings are general and apply to nearly any section and are defined here. -# Settings specific to a particular section will be defined near their section. -# -# libraries -# Comma-separated list of library names to add to compile the extension -# with. Note that these should be just the names, not the filenames. For -# example, the file "libfoo.so" would become simply "foo". -# libraries = lapack,f77blas,cblas,atlas -# This setting is available for *all* sections. -# -# library_dirs -# List of directories to add to the library search path when compiling -# extensions with this dependency. Use the character given by os.pathsep -# to separate the items in the list. Note that this character is known to -# vary on some unix-like systems; if a colon does not work, try a comma. -# This also applies to include_dirs. -# On UN*X-type systems (OS X, most BSD and Linux systems): -# library_dirs = /usr/lib:/usr/local/lib -# On Windows: -# library_dirs = c:\mingw\lib,c:\atlas\lib -# On some BSD and Linux systems: -# library_dirs = /usr/lib,/usr/local/lib -# -# include_dirs -# List of directories to add to the header file search path. -# include_dirs = /usr/include:/usr/local/include -# -# search_static_first -# Boolean (one of (0, false, no, off) for False or (1, true, yes, on) for -# True) to tell numpy.distutils to prefer static libraries (.a) over -# shared libraries (.so). It is turned off by default. -# search_static_first = false -# -# runtime_library_dirs/rpath -# List of directories that contains the libraries that should be -# used at runtime, thereby disregarding the LD_LIBRARY_PATH variable. -# See 'library_dirs' for formatting on different platforms. -# runtime_library_dirs = /opt/blas/lib:/opt/lapack/lib -# or equivalently -# rpath = /opt/blas/lib:/opt/lapack/lib -# -# extra_compile_args -# Add additional arguments to the compilation of sources. -# Split into arguments in a platform-appropriate way. -# Provide a single line with all complete flags. -# extra_compile_args = -g -ftree-vectorize -# -# extra_link_args -# Add additional arguments when libraries/executables -# are linked. -# Split into arguments in a platform-appropriate way. -# Provide a single line with all complete flags. -# extra_link_args = -lgfortran -# - -# Defaults -# ======== -# The settings here will apply to all sections as general defaults -# This is a good place to add general library and include directories like -# /usr/local/{lib,include} -# These settings apply when they are not overridden in the sections below. -# Note that the standard paths (e.g. `/usr/lib`) are not searched if you -# override these settings, unless they are explicitly included. -# The ``:`` is os.pathsep, which is ``;`` on windows -#[DEFAULT] -#library_dirs = /usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib -#include_dirs = /usr/local/include:/usr/include - - -# ATLAS -# ----- -# ATLAS is an open source optimized implementation of the BLAS and LAPACK -# routines. NumPy will try to build against ATLAS when available in -# the system library dirs (and OpenBLAS, MKL and BLIS are not installed). To -# build NumPy against a custom installation of ATLAS you can add an explicit -# section such as the following. Here we assume that ATLAS was configured with -# ``prefix=/opt/atlas``. -# -# [atlas] -# library_dirs = /opt/atlas/lib -# include_dirs = /opt/atlas/include - -# OpenBLAS -# -------- -# OpenBLAS is an open source optimized implementation of BLAS and LAPACK -# and is the default choice for NumPy itself (CI, wheels). OpenBLAS will be -# selected above ATLAS and Netlib BLAS/LAPACK. OpenBLAS is generically -# installed as a shared library, to force the OpenBLAS library linked to also -# be used at runtime you can utilize the runtime_library_dirs variable. -# -[openblas] -libraries = openblas -library_dirs = /opt/OpenBLAS/lib64 -include_dirs = /opt/OpenBLAS/include -runtime_library_dirs = /opt/OpenBLAS/lib - -# OpenBLAS (64-bit with suffix) -# ----------------------------- -# OpenBLAS can be compiled with 64-bit integer size and symbol suffix '64_' -# (INTERFACE64=1 SYMBOLSUFFIX=64_). OpenBLAS built with this setting are also -# provided by some Linux distributions (e.g. Fedora's 64-bit openblas packages). -# This is an emerging "standard" for 64-bit BLAS/LAPACK, avoiding symbol clashes -# with 32-bit BLAS/LAPACK. -# -# To build Numpy with such 64-bit BLAS/LAPACK, set environment -# variables NPY_USE_BLAS_ILP64=1, NPY_BLAS_ILP64_ORDER=openblas64_, -# NPY_LAPACK_ILP64_ORDER=openblas64_ at build time. -# -# See: -# https://github.com/xianyi/OpenBLAS/issues/646 -# -[openblas64_] -libraries = openblas64_ -library_dirs = /opt/OpenBLAS/lib64 -include_dirs = /opt/OpenBLAS/include -runtime_library_dirs = /opt/OpenBLAS/lib - -# OpenBLAS (64-bit ILP64) -# ----------------------- -# It is possible to also use OpenBLAS compiled with 64-bit integer -# size (ILP64) but no symbol name changes. To do that, set the -# environment variables NPY_USE_BLAS_ILP64=1, -# NPY_BLAS_ILP64_ORDER=openblas_ilp64, -# NPY_LAPACK_ILP64_ORDER=openblas_ilp64 at build time. -# -# Note that mixing both 64-bit and 32-bit BLAS without symbol suffixes -# in the same application may cause problems due to symbol name -# clashes, especially with embedded Python interpreters. -# -# The name of the library file may vary on different systems, so you -# may need to check your specific OpenBLAS installation and -# uncomment and e.g. set ``libraries = openblas`` below. -# -# [openblas_ilp64] -# libraries = openblas64 -# library_dirs = /opt/OpenBLAS/lib -# include_dirs = /opt/OpenBLAS/include -# runtime_library_dirs = /opt/OpenBLAS/lib -# symbol_prefix = -# symbol_suffix = - -# BLIS -# ---- -# BLIS (https://github.com/flame/blis) also provides a BLAS interface. It's a -# relatively new library, its performance in some cases seems to match that of -# MKL and OpenBLAS, but it hasn't been benchmarked with NumPy or SciPy yet. -# -# Notes on compiling BLIS itself: -# - the CBLAS interface (needed by NumPy) isn't built by default; define -# BLIS_ENABLE_CBLAS to build it. -# - ``./configure auto`` doesn't support 32-bit builds, see gh-7294 for -# details. -# Notes on compiling NumPy against BLIS: -# - ``include_dirs`` below should be the directory where the BLIS cblas.h -# header is installed. -# -# [blis] -# libraries = blis -# library_dirs = /home/username/blis/lib -# include_dirs = /home/username/blis/include/blis -# runtime_library_dirs = /home/username/blis/lib - -# libFLAME -# -------- -# libFLAME (https://www.cs.utexas.edu/~flame/web/libFLAME.html) provides a -# LAPACK interface. It's a relatively new library, its performance in some -# cases seems to match that of MKL and OpenBLAS. -# It hasn't been benchmarked with NumPy or SciPy yet. -# -# Notes on compiling libFLAME itself: -# - the LAPACK interface (needed by NumPy) isn't built by default; please -# configure with ``./configure --enable-lapack2flame``. -# -# [flame] -# libraries = flame -# library_dirs = /home/username/flame/lib -# runtime_library_dirs = /home/username/flame/lib - -# MKL -#---- -# Intel MKL is Intel's very optimized yet proprietary implementation of BLAS and -# LAPACK. Find the latest info on building NumPy with Intel MKL in this article: -# https://www.intel.com/content/www/us/en/developer/articles/technical/numpyscipy-with-intel-mkl.html -# Assuming you installed the mkl in /opt/intel/oneapi/mkl/latest, -# for 64 bits code at Linux: -# [mkl] -# library_dirs = /opt/intel/oneapi/mkl/latest/lib -# include_dirs = /opt/intel/oneapi/mkl/latest/include -# libraries = mkl_rt -# -# For 32 bit code at Linux: -# [mkl] -# library_dirs = /opt/intel/compilers_and_libraries_2018/linux/mkl/lib/ia32 -# include_dirs = /opt/intel/compilers_and_libraries_2018/linux/mkl/include -# libraries = mkl_rt -# -# On win-64, the following options compiles NumPy with the MKL library -# dynamically linked. -# [mkl] -# include_dirs = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\mkl\include -# library_dirs = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\mkl\lib\intel64 -# libraries = mkl_rt - -# UMFPACK -# ------- -# The UMFPACK library is used in scikits.umfpack to factor large sparse matrices. -# It, in turn, depends on the AMD library for reordering the matrices for -# better performance. Note that the AMD library has nothing to do with AMD -# (Advanced Micro Devices), the CPU company. -# -# UMFPACK is not used by NumPy. -# -# https://www.cise.ufl.edu/research/sparse/umfpack/ -# https://www.cise.ufl.edu/research/sparse/amd/ -# https://scikit-umfpack.github.io/scikit-umfpack/ -# -#[amd] -#libraries = amd -# -#[umfpack] -#libraries = umfpack - -# FFT libraries -# ------------- -# There are two FFT libraries that we can configure here: FFTW (2 and 3) and djbfft. -# Note that these libraries are not used by NumPy or SciPy. -# -# http://fftw.org/ -# https://cr.yp.to/djbfft.html -# -# Given only this section, numpy.distutils will try to figure out which version -# of FFTW you are using. -#[fftw] -#libraries = fftw3 -# -# For djbfft, numpy.distutils will look for either djbfft.a or libdjbfft.a . -#[djbfft] -#include_dirs = /usr/local/djbfft/include -#library_dirs = /usr/local/djbfft/lib - -# Fujitsu SSL2 -# ---- -#[ssl2] -#library_dirs = /opt/FJSVstclanga/v1.1.0/lib64 -#include_dirs = /opt/FJSVstclanga/v1.1.0/clang-comp/include -# Single-threaded version. -#libraies = fjlapacksve -# Multi-threaded version. Python itself must be built by Fujitsu compiler. -#libraies = fjlapackexsve