conda: Mixing libblas=*=*mkl and python-lal=*=fftw* causes FFTPlans to fail if numpy is imported before lal
Description of problem
Using this conda environment spec:
channels:
- conda-forge
dependencies:
- 'python > 3.6'
- 'python-lal=*=fftw*'
- 'libblas=*=*mkl'
- numpy
I'm getting XLAL errors with lal.CreateForwardREAL8FFTPlan
depending on the order of importing lal and numpy:
>>> lal.CreateForwardREAL8FFTPlan(512, 1)
XLAL Error - XLALCreateREAL8FFTPlan (/home/conda/feedstock_root/build_artifacts/lal-split_1633385125057/work/lib/fft/RealFFT_source.c:120): Generic failure
XLAL Error - XLALCreateForwardREAL8FFTPlan (/home/conda/feedstock_root/build_artifacts/lal-split_1633385125057/work/lib/fft/RealFFT_source.c:136): Internal function call failed: Generic failure
Expected behavior
Order of imports should not matter.
Steps to reproduce
$ python
Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:23:11)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lal
>>> import numpy
>>> lal.CreateForwardREAL8FFTPlan(512, 1)
<Swig Object of type 'tagREAL8FFTPlan *' at 0x7f2638414570>
$ python
Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:23:11)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import lal
>>> lal.CreateForwardREAL8FFTPlan(512, 1)
XLAL Error - XLALCreateREAL8FFTPlan (/home/conda/feedstock_root/build_artifacts/lal-split_1633385125057/work/lib/fft/RealFFT_source.c:120): Generic failure
XLAL Error - XLALCreateForwardREAL8FFTPlan (/home/conda/feedstock_root/build_artifacts/lal-split_1633385125057/work/lib/fft/RealFFT_source.c:136): Internal function call failed: Generic failure
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Internal function call failed: Generic failure
Context/environment
System information
Hostname: Local machine
Operating system: Fedora 34
Python version: 3.9.7
Conda info
$ conda info
active environment : gstlal-dev
active env location : /home/patrick/.conda/envs/core/envs/gstlal-dev
shell level : 1
user config file : /home/patrick/.condarc
populated config files : /home/patrick/.condarc
conda version : 4.10.3
conda-build version : not installed
python version : 3.9.7.final.0
virtual packages : __linux=5.14.9=0
__glibc=2.33=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/patrick/.conda/envs/core (writable)
conda av data dir : /home/patrick/.conda/envs/core/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/patrick/.conda/envs/core/pkgs
/home/patrick/.conda/pkgs
envs directories : /home/patrick/.conda/envs/core/envs
/home/patrick/.conda/envs
platform : linux-64
user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Linux/5.14.9-200.fc34.x86_64 fedora/34 glibc/2.33
UID:GID : 1000:1000
netrc file : None
offline mode : False
Conda list
$ conda list
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
c-ares 1.17.2 h7f98852_0 conda-forge
ca-certificates 2021.10.8 ha878542_0 conda-forge
fftw 3.3.10 nompi_h74d3f13_101 conda-forge
gsl 2.7 he838d99_0 conda-forge
hdf5 1.12.1 nompi_h7f166f4_101 conda-forge
intel-openmp 2021.3.0 h06a4308_3350
krb5 1.19.2 h48eae69_2 conda-forge
ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge
libblas 3.9.0 11_linux64_mkl conda-forge
libcblas 3.9.0 11_linux64_mkl conda-forge
libcurl 7.79.1 h494985f_1 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libffi 3.4.2 h9c3ff4c_4 conda-forge
libgcc-ng 11.2.0 h1d223b6_11 conda-forge
libgfortran-ng 11.2.0 h69a702a_11 conda-forge
libgfortran5 11.2.0 h5c6108e_11 conda-forge
libgomp 11.2.0 h1d223b6_11 conda-forge
liblal 7.1.3 fftw_hbc48cad_103 conda-forge
liblapack 3.9.0 11_linux64_mkl conda-forge
libnghttp2 1.43.0 ha19adfc_1 conda-forge
libssh2 1.10.0 ha35d2d1_2 conda-forge
libstdcxx-ng 11.2.0 he4da1e4_11 conda-forge
libzlib 1.2.11 h36c2ea0_1013 conda-forge
ligo-segments 1.3.0 py39h3811e60_2 conda-forge
mkl 2021.3.0 h06a4308_520
ncurses 6.2 h58526e2_4 conda-forge
numpy 1.21.2 py39hdbf815f_0 conda-forge
openssl 3.0.0 h7f98852_1 conda-forge
pip 21.3 pyhd8ed1ab_0 conda-forge
python 3.9.7 hf930737_3_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-lal 7.1.3 fftw_py39h4fa004c_103 conda-forge
python_abi 3.9 2_cp39 conda-forge
readline 8.1 h46c0cb4_0 conda-forge
scipy 1.7.1 py39hee8e79c_0 conda-forge
setuptools 58.2.0 py39hf3d152e_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.36.0 h9cd32fc_2 conda-forge
tk 8.6.11 h27826a3_1 conda-forge
tzdata 2021c he74cb21_0 conda-forge
wheel 0.37.0 pyhd8ed1ab_1 conda-forge
xz 5.2.5 h516909a_1 conda-forge
zlib 1.2.11 h36c2ea0_1013 conda-forge
lalapps_version
$ lalapps_version --verbose
N/A (lalapps not installed)
Suggested solutions
No idea.
Edited by Patrick Godwin