MFIX run error numpy.ufunc

Hi,
I tried to install MFIX using conda environment, copy pasted the cmd from the webpage, this worked fine. However when I try to run mfix I get an error with numpy. I have found that this might be caused by updated numpy version 1.20.2 (but downgrade to version 16 was not possible due to conflicts). On the other hand someone suggested to use python 3.8 or newer instead of 3.7, however I had same problems with conflicts. Any idea how to solve it? Thank you very much.

Traceback (most recent call last):
  File "/home/jiri/.conda/envs/mfix-21.1.4/bin/mfix", line 6, in <module>
    from mfixgui.gui import main
  File "/home/jiri/.conda/envs/mfix-21.1.4/lib/python3.7/site-packages/mfixgui/gui.py", line 68, in <module>
    from .file_menu import FileMenu
  File "/home/jiri/.conda/envs/mfix-21.1.4/lib/python3.7/site-packages/mfixgui/file_menu/__init__.py", line 24, in <module>
    from mfixgui.widgets.nodeworks import NODEWORKS_AVAILABLE
  File "/home/jiri/.conda/envs/mfix-21.1.4/lib/python3.7/site-packages/mfixgui/widgets/nodeworks.py", line 42, in <module>
    from mfixgui.vtk_widgets.geometry_engine import GeometryEngine
  File "/home/jiri/.conda/envs/mfix-21.1.4/lib/python3.7/site-packages/mfixgui/vtk_widgets/geometry_engine.py", line 39, in <module>
    from mfixgui.tools import procedural_stl
  File "/home/jiri/.conda/envs/mfix-21.1.4/lib/python3.7/site-packages/mfixgui/tools/procedural_stl.py", line 7, in <module>
    import splipy as sp
  File "/home/jiri/.conda/envs/mfix-21.1.4/lib/python3.7/site-packages/splipy/__init__.py", line 3, in <module>
    from splipy.BSplineBasis import BSplineBasis
  File "/home/jiri/.conda/envs/mfix-21.1.4/lib/python3.7/site-packages/splipy/BSplineBasis.py", line 8, in <module>
    from splipy import basis_eval
  File "splipy/basis_eval.pyx", line 1, in init splipy.basis_eval
ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject

Conda packages

# packages in environment at /home/jiri/.conda/envs/mfix-21.1.4:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             4.5                       1_gnu  
blas                      1.0                         mkl  
brotlipy                  0.7.0           py37h27cfd23_1003  
bzip2                     1.0.8                h7b6447c_0  
ca-certificates           2021.5.25            h06a4308_1  
certifi                   2021.5.30        py37h06a4308_0  
cffi                      1.14.5           py37h261ae71_0  
chardet                   4.0.0           py37h06a4308_1003  
click                     8.0.1              pyhd3eb1b0_0  
cmake                     3.14.0               h52cb24c_0  
cryptography              3.4.7            py37hd23ed53_0  
curl                      7.71.1               hbc83047_1  
cycler                    0.10.0                   py37_0  
dbus                      1.13.18              hb2f20db_0  
expat                     2.4.1                h2531618_2  
flask                     1.1.2              pyhd3eb1b0_0  
fontconfig                2.13.1               h6c09931_0  
freetype                  2.10.4               h5ab3b9f_0  
future                    0.18.2                   py37_1  
git                       2.23.0          pl526hacde149_0  
gitdb                     4.0.7              pyhd3eb1b0_0  
gitpython                 3.1.18             pyhd3eb1b0_1  
glib                      2.68.2               h36276a3_0  
gst-plugins-base          1.14.0               h8213a91_2  
gstreamer                 1.14.0               h28cd5cc_2  
hdf4                      4.2.13               h3ca952b_2  
hdf5                      1.10.4               hb1b8bf9_0  
icu                       58.2                 he6710b0_3  
idna                      2.10               pyhd3eb1b0_0  
importlib-metadata        3.10.0           py37h06a4308_0  
intel-openmp              2021.2.0           h06a4308_610  
itsdangerous              2.0.1              pyhd3eb1b0_0  
jinja2                    3.0.1              pyhd3eb1b0_0  
jpeg                      9b                   h024ee3a_2  
jsoncpp                   1.8.3                h3a67955_0  
kiwisolver                1.3.1            py37h2531618_0  
krb5                      1.18.2               h173b8e3_0  
lcms2                     2.12                 h3be6417_0  
ld_impl_linux-64          2.35.1               h7274673_9  
libcurl                   7.71.1               h20c2e04_1  
libedit                   3.1.20210216         h27cfd23_1  
libffi                    3.3                  he6710b0_2  
libgcc                    7.2.0                h69d50b8_2  
libgcc-ng                 9.3.0               h5101ec6_17  
libgfortran-ng            7.5.0               ha8ba4b0_17  
libgfortran4              7.5.0               ha8ba4b0_17  
libgomp                   9.3.0               h5101ec6_17  
libnetcdf                 4.6.1                h11d0813_2  
libogg                    1.3.5                h27cfd23_1  
libpng                    1.6.37               hbc83047_0  
libssh2                   1.9.0                h1ba5d50_1  
libstdcxx-ng              9.3.0               hd4cf53a_17  
libtheora                 1.1.1                h5ab3b9f_1  
libtiff                   4.1.0                h2733197_0  
libuuid                   1.0.3                h1bed415_2  
libvorbis                 1.3.7                h7b6447c_0  
libxcb                    1.14                 h7b6447c_0  
libxml2                   2.9.12               h03d6c58_0  
lz4-c                     1.8.1.2              h14c3975_0  
markupsafe                2.0.1            py37h27cfd23_0  
matplotlib                3.3.4            py37h06a4308_0  
matplotlib-base           3.3.4            py37h62a2d02_0  
mfix                      21.1.4                        0    https://mfix.netl.doe.gov/s3/03e5531d/98ca962d3d15e6abadf69ab4b99049d5/conda/dist
mfix-doc                  21.1.4                        0    https://mfix.netl.doe.gov/s3/03e5531d/98ca962d3d15e6abadf69ab4b99049d5/conda/dist
mfix-gui                  21.1.4                     py_0    https://mfix.netl.doe.gov/s3/03e5531d/98ca962d3d15e6abadf69ab4b99049d5/conda/dist
mfix-solver               21.1.4           py37h3218e01_0    https://mfix.netl.doe.gov/s3/03e5531d/98ca962d3d15e6abadf69ab4b99049d5/conda/dist
mfix-src                  21.1.4                        0    https://mfix.netl.doe.gov/s3/03e5531d/98ca962d3d15e6abadf69ab4b99049d5/conda/dist
mkl                       2021.2.0           h06a4308_296  
mkl-service               2.3.0            py37h27cfd23_1  
mkl_fft                   1.3.0            py37h42c9631_2  
mkl_random                1.2.1            py37ha9443f7_2  
ncurses                   6.2                  he6710b0_1  
numpy                     1.20.2           py37h2d18471_0  
numpy-base                1.20.2           py37hfae3a4d_0  
olefile                   0.46                     py37_0  
openssl                   1.1.1k               h27cfd23_0  
packaging                 20.9               pyhd3eb1b0_0  
pcre                      8.45                 h295c915_0  
perl                      5.26.2               h14c3975_0  
pillow                    8.2.0            py37he98fc37_0  
pip                       21.1.2           py37h06a4308_0  
psutil                    5.8.0            py37h27cfd23_1  
pycparser                 2.20                       py_2  
pyopenssl                 20.0.1             pyhd3eb1b0_1  
pyparsing                 2.4.7              pyhd3eb1b0_0  
pyqt                      5.9.2            py37h05f1152_2  
pyqtgraph                 0.11.0                     py_0  
pysocks                   1.7.1                    py37_1  
python                    3.7.10               h12debd9_4  
python-dateutil           2.8.1              pyhd3eb1b0_0  
pyyaml                    5.4.1            py37h27cfd23_1  
qt                        5.9.7                h5867ecd_1  
qtpy                      1.9.0                      py_0  
readline                  8.1                  h27cfd23_0  
requests                  2.25.1             pyhd3eb1b0_0  
rhash                     1.4.1                h3c74f83_1  
scipy                     1.6.2            py37had2a1c9_1  
setuptools                52.0.0           py37h06a4308_0  
simpleeval                0.9.8                      py_0    mfix
simplejson                3.17.2           py37h27cfd23_2  
sip                       4.19.8           py37hf484d3e_0  
six                       1.16.0             pyhd3eb1b0_0  
smmap                     4.0.0              pyhd3eb1b0_0  
splipy                    1.4.0            py37h3218e01_0    mfix
sqlite                    3.36.0               hc218d9a_0  
tbb                       2020.2               hff7bd54_0  
tk                        8.6.10               hbc83047_0  
tornado                   6.1              py37h27cfd23_0  
typing-extensions         3.7.4.3              hd3eb1b0_0  
typing_extensions         3.7.4.3            pyh06a4308_0  
urllib3                   1.26.4             pyhd3eb1b0_0  
vg                        1.9.0            py37hd844fa7_0    mfix
vtk                       8.2.0           py37haa4764d_200  
werkzeug                  1.0.1              pyhd3eb1b0_0  
wheel                     0.36.2             pyhd3eb1b0_0  
xz                        5.2.5                h7b6447c_0  
yaml                      0.2.5                h7b6447c_0  
zipp                      3.4.1              pyhd3eb1b0_0  
zlib                      1.2.11               h7b6447c_3  
zstd                      1.3.7                h0b5b093_0  

Update

Problem was caused by the PATH variable. Unfortunately, there was sourced my $HOME/.local/lib directory as well and it contained an outdated numpy package, which caused the problem. After removing, error disappeared.

However, Next I had problem with vtk. As libraries used by conda version of PyQt5 were outdated, the iris driver failed to load. This was simply solved by redirecting the /anaconda3/envs/mfix-21.1.4/lib/libstdc++.so.6 to the system version.

Now it seems that everything is ok.

1 Like