Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MKL in NumPy and SciPy #222

Open
wants to merge 11 commits into
base: fedora-py3
Choose a base branch
from
Open
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
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ ruamel.yaml
SciencePlots
scikit-build
scikit-learn
scipy
seaborn
shapely
sharedarray
Expand Down
31 changes: 30 additions & 1 deletion singularity/Singularity.intel_mkl
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,35 @@ EOF
rm -rf datashape-0.5.2/

pip install --upgrade pip wheel Cython
pip install "numpy<2"
if [ $MARCH = 'native' ] && [ $MTUNE = 'native' ] && [ $HAS_MKL = true ]; then
wget https://github.com/numpy/numpy/releases/download/v1.26.4/numpy-1.26.4.tar.gz
tar xzf numpy-1.26.4.tar.gz
rm numpy-1.26.4.tar.gz
cd numpy-1.26.4/
pip install . -Csetup-args=-Dblas-order=mkl-dynamic-lp64-iomp -Csetup-args=-Dlapack-order=mkl-dynamic-lp64-iomp -Csetup-args=-Db_lto=true
if [ $DEBUG = true ]; then
pip install pyyaml
python -c 'import numpy; numpy.show_config()'
fi
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 xzf scipy-1.15.1.tar.gz
rm scipy-1.15.1.tar.gz
cd scipy-1.15.1/
pip install . -Csetup-args=-Dblas=mkl-dynamic-lp64-iomp -Csetup-args=-Dlapack=mkl-dynamic-lp64-iomp -Csetup-args=-Db_lto=true
if [ $DEBUG = true ]; then
pip install pyyaml
python -c 'import numpy; numpy.show_config()'
fi
cd ..
rm -rf scipy-1.15.1/

export PKG_CONFIG_PATH=$MKLROOT/lib/pkgconfig/
else
pip install "numpy<2" scipy
fi
pip install --no-binary pandas pandas
pip install --no-binary h5py h5py
pip install -r $INSTALLDIR/flocs/requirements.txt
Expand Down Expand Up @@ -739,6 +767,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


Expand Down