Problem with SMP build in the Windows system

Hi, when i try to build the mfixsolver in the windows system in the mfix-23.3.2, there is an error i can not figure out, could anyone help me out? thank you~ below is the error log

(mfix-23.3.2) D:\ZYXGeldart B-23.3.2\Actual Bed\Vg_025_eps_015>python -m mfixgui.build_mfixsolver -j --smp -DCMAKE_Fortran_COMPILER=gfortran
Building custom solver for tfm_2d_ug_0.25_solid_0.15.mfx
Running cmake command:
cmake -DCMAKE_Fortran_COMPILER=gfortran -DENABLE_PYMFIX=ON -DENABLE_OpenMP=ON -G “MinGW Makefiles” “-DCMAKE_INSTALL_PREFIX=D:\ZYX\Geldart B-23.3.2\Actual Bed\Vg_025_eps_015” “-DUDF_DIR=D:\ZYX\Geldart B-23.3.2\Actual Bed\Vg_025_eps_015” D:\Anaconda\envs\mfix-23.3.2\share\mfix\src

– Found Python3: D:/Anaconda/envs/mfix-23.3.2/python.exe (found version “3.10.13”) found components: Interpreter
– Setting build type to ‘RelWithDebInfo’ as none was specified.
– MFIX build settings summary:
– Build type = RelWithDebInfo
– CMake version = 3.27.6
– Fortran compiler = gfortran
– Fortran flags =
– ENABLE_MPI = OFF
– ENABLE_OpenMP = ON
– ENABLE_CTEST = OFF
– ENABLE_COVERAGE = OFF
– The Fortran compiler identification is GNU 5.3.0
– The C compiler identification is GNU 5.3.0
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - done
– Check for working Fortran compiler: D:/Anaconda/envs/mfix-23.3.2/Library/mingw-w64/bin/gfortran.exe - skipped
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: D:/Anaconda/envs/mfix-23.3.2/Library/mingw-w64/bin/cc.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Performing Test ffpe_trap
– Performing Test ffpe_trap - Failed
– Performing Test ffpe_summary
– Performing Test ffpe_summary - Failed
CMake Error at D:/Anaconda/envs/mfix-23.3.2/Library/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
** Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)**
Call Stack (most recent call first):
** D:/Anaconda/envs/mfix-23.3.2/Library/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)**
** D:/Anaconda/envs/mfix-23.3.2/Library/share/cmake-3.27/Modules/FindOpenMP.cmake:577 (find_package_handle_standard_args)**
** model/CMakeLists.txt:676 (find_package)**

– Configuring incomplete, errors occurred!
==========================================================================
** BUILD FAILED**
==========================================================================

the error is:
– Performing Test ffpe_trap - Failed
– Performing Test ffpe_summary
– Performing Test ffpe_summary - Failed
CMake Error at D:/Anaconda/envs/mfix-23.3.2/Library/share/cmake-

I have not seen this error before. OpenMPI should have gotten installed along with mfix-23.3.2.

Can you please attach the output of conda list (with the MFiX 23.3.2 env active) or else go to the main menu and select “Submit bug report” and upload the resulting .zip file. Thanks!

sorry for late, the output of conda list is shown below:

(mfix-23.3.2) C:\Users\DELL>conda list

packages in environment at D:\ANACONDA\envs\mfix-23.3.2:

Name Version Build Channel

aiohttp 3.8.6 py310h8d17308_1 conda-forge
aiosignal 1.3.1 pyhd8ed1ab_0 conda-forge
aom 3.6.1 h63175ca_0 conda-forge
async-timeout 4.0.3 pyhd8ed1ab_0 conda-forge
attrs 23.1.0 pyh71513ae_1 conda-forge
blinker 1.7.0 pyhd8ed1ab_0 conda-forge
blosc 1.21.5 hdccc3a2_0 conda-forge
brotli 1.1.0 hcfcfb64_1 conda-forge
brotli-bin 1.1.0 hcfcfb64_1 conda-forge
brotli-python 1.1.0 py310h00ffb61_1 conda-forge
bzip2 1.0.8 hcfcfb64_5 conda-forge
ca-certificates 2023.7.22 h56e8100_0 conda-forge
certifi 2023.7.22 pyhd8ed1ab_0 conda-forge
charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge
click 8.1.7 win_pyh7428d3b_0 conda-forge
cmake 3.27.6 hf0feee3_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
contourpy 1.2.0 py310h232114e_0 conda-forge
cycler 0.12.1 pyhd8ed1ab_0 conda-forge
dav1d 1.2.1 hcfcfb64_0 conda-forge
double-conversion 3.3.0 h63175ca_0 conda-forge
eigen 3.4.0 h91493d7_0 conda-forge
expat 2.5.0 h63175ca_1 conda-forge
ffmpeg 6.1.0 gpl_h1627b0f_100 conda-forge
ffmpeg-python 0.2.0 py_0 conda-forge
flask 3.0.0 pyhd8ed1ab_0 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 3.000 h77eed37_0 conda-forge
font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge
font-ttf-ubuntu 0.83 hab24e00_0 conda-forge
fontconfig 2.14.2 hbde0cde_0 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
fonttools 4.44.0 py310h8d17308_0 conda-forge
freetype 2.12.1 hdaf720e_2 conda-forge
frozenlist 1.4.0 py310h8d17308_1 conda-forge
future 0.18.3 pyhd8ed1ab_0 conda-forge
gettext 0.21.1 h5728263_0 conda-forge
git 2.42.0 h57928b3_0 conda-forge
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gl2ps 1.4.2 h0597ee9_0 conda-forge
glew 2.1.0 h39d44d4_2 conda-forge
glib 2.78.1 h12be248_0 conda-forge
glib-tools 2.78.1 h12be248_0 conda-forge
gst-plugins-base 1.22.6 h001b923_2 conda-forge
gstreamer 1.22.6 hb4038d2_2 conda-forge
hdf4 4.2.15 h5557f11_7 conda-forge
hdf5 1.14.2 nompi_h73e8ff5_100 conda-forge
icu 73.2 h63175ca_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
importlib-metadata 6.8.0 pyha770c72_0 conda-forge
intel-openmp 2023.2.0 h57928b3_50497 conda-forge
itsdangerous 2.1.2 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
jsoncpp 1.9.5 h2d74725_1 conda-forge
kiwisolver 1.4.5 py310h232114e_1 conda-forge
krb5 1.21.2 heb0366b_0 conda-forge
lcms2 2.15 h67d730c_3 conda-forge
lerc 4.0.0 h63175ca_0 conda-forge
libaec 1.1.2 h63175ca_1 conda-forge
libblas 3.9.0 19_win64_mkl conda-forge
libbrotlicommon 1.1.0 hcfcfb64_1 conda-forge
libbrotlidec 1.1.0 hcfcfb64_1 conda-forge
libbrotlienc 1.1.0 hcfcfb64_1 conda-forge
libcblas 3.9.0 19_win64_mkl conda-forge
libclang 15.0.7 default_h77d9078_3 conda-forge
libclang13 15.0.7 default_h77d9078_3 conda-forge
libcurl 8.4.0 hd5e4a3a_0 conda-forge
libdeflate 1.19 hcfcfb64_0 conda-forge
libexpat 2.5.0 h63175ca_1 conda-forge
libffi 3.4.2 h8ffe710_5 conda-forge
libglib 2.78.1 he8f3873_0 conda-forge
libhwloc 2.9.3 default_haede6df_1009 conda-forge
libiconv 1.17 h8ffe710_0 conda-forge
libjpeg-turbo 3.0.0 hcfcfb64_1 conda-forge
liblapack 3.9.0 19_win64_mkl conda-forge
libnetcdf 4.9.2 nompi_h8284064_112 conda-forge
libogg 1.3.4 h8ffe710_1 conda-forge
libopus 1.3.1 h8ffe710_1 conda-forge
libpng 1.6.39 h19919ed_0 conda-forge
libsqlite 3.44.0 hcfcfb64_0 conda-forge
libssh2 1.11.0 h7dfc565_0 conda-forge
libtheora 1.1.1 h8d14728_1005 conda-forge
libtiff 4.6.0 h6e2ebb7_2 conda-forge
libuv 1.44.2 hcfcfb64_1 conda-forge
libvorbis 1.3.7 h0e60522_0 conda-forge
libwebp-base 1.3.2 hcfcfb64_0 conda-forge
libxcb 1.15 hcd874cb_0 conda-forge
libxml2 2.11.5 hc3477c8_1 conda-forge
libzip 1.10.1 h1d365fa_3 conda-forge
libzlib 1.2.13 hcfcfb64_5 conda-forge
loguru 0.7.2 py310h5588dad_1 conda-forge
lz4-c 1.9.4 hcfcfb64_0 conda-forge
m2w64-binutils 2.25.1 5 conda-forge
m2w64-bzip2 1.0.6 6 conda-forge
m2w64-crt-git 5.0.0.4636.2595836 2 conda-forge
m2w64-gcc 5.3.0 6 conda-forge
m2w64-gcc-ada 5.3.0 6 conda-forge
m2w64-gcc-fortran 5.3.0 6 conda-forge
m2w64-gcc-libgfortran 5.3.0 6 conda-forge
m2w64-gcc-libs 5.3.0 7 conda-forge
m2w64-gcc-libs-core 5.3.0 7 conda-forge
m2w64-gcc-objc 5.3.0 6 conda-forge
m2w64-gmp 6.1.0 2 conda-forge
m2w64-headers-git 5.0.0.4636.c0ad18a 2 conda-forge
m2w64-isl 0.16.1 2 conda-forge
m2w64-libiconv 1.14 6 conda-forge
m2w64-libmangle-git 5.0.0.4509.2e5a9a2 2 conda-forge
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge
m2w64-make 4.1.2351.a80a8b8 2 conda-forge
m2w64-mpc 1.0.3 3 conda-forge
m2w64-mpfr 3.1.4 4 conda-forge
m2w64-pkg-config 0.29.1 2 conda-forge
m2w64-toolchain 5.3.0 7 conda-forge
m2w64-tools-git 5.0.0.4592.90b8472 2 conda-forge
m2w64-windows-default-manifest 6.4 3 conda-forge
m2w64-winpthreads-git 5.0.0.4634.697f757 2 conda-forge
m2w64-zlib 1.2.8 10 conda-forge
make 4.3 h3d2af85_1 conda-forge
markupsafe 2.1.3 py310h8d17308_1 conda-forge
matplotlib 3.8.1 py310h5588dad_0 conda-forge
matplotlib-base 3.8.1 py310hc9baf74_0 conda-forge
mfix 23.3.2 0 https://mfix.netl.doe.gov/s3/f8085dfa/49ccbc47a1aee4e4cf77d4e86d148585//conda/dist
mfix-doc 23.3.2 0 https://mfix.netl.doe.gov/s3/f8085dfa/49ccbc47a1aee4e4cf77d4e86d148585//conda/dist
mfix-gui 23.3.2 py_0 https://mfix.netl.doe.gov/s3/f8085dfa/49ccbc47a1aee4e4cf77d4e86d148585//conda/dist
mfix-solver 23.3.2 py310_0 https://mfix.netl.doe.gov/s3/f8085dfa/49ccbc47a1aee4e4cf77d4e86d148585//conda/dist
mfix-src 23.3.2 0 https://mfix.netl.doe.gov/s3/f8085dfa/49ccbc47a1aee4e4cf77d4e86d148585//conda/dist
mkl 2023.2.0 h6a75c08_50496 conda-forge
mscorefonts 0.0.1 3 conda-forge
msys2-conda-epoch 20160418 1 conda-forge
multidict 6.0.4 py310h8d17308_1 conda-forge
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
nlohmann_json 3.11.2 h39d44d4_0 conda-forge
numpy 1.26.0 py310hf667824_0 conda-forge
openh264 2.3.1 h63175ca_2 conda-forge
openjpeg 2.5.0 h3d672ee_3 conda-forge
openssl 3.1.4 hcfcfb64_0 conda-forge
packaging 23.2 pyhd8ed1ab_0 conda-forge
pcre2 10.40 h17e33f8_0 conda-forge
pillow 10.1.0 py310h1e6a543_0 conda-forge
pip 23.3.1 pyhd8ed1ab_0 conda-forge
ply 3.11 py_1 conda-forge
proj 9.3.0 he13c7e8_2 conda-forge
psutil 5.9.5 py310h8d17308_1 conda-forge
pthread-stubs 0.4 hcd874cb_1001 conda-forge
pthreads-win32 2.9.1 hfa6e2cd_3 conda-forge
pugixml 1.14 h63175ca_0 conda-forge
pyparsing 3.1.1 pyhd8ed1ab_0 conda-forge
pyqt 5.15.9 py310h1fd54f2_5 conda-forge
pyqt5-sip 12.12.2 py310h00ffb61_5 conda-forge
pyqtgraph 0.13.3 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyh0701188_6 conda-forge
python 3.10.13 h4de0772_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python_abi 3.10 4_cp310 conda-forge
pyyaml 6.0.1 py310h8d17308_1 conda-forge
qt-main 5.15.8 h9e85ed6_17 conda-forge
qtpy 2.4.1 pyhd8ed1ab_0 conda-forge
requests 2.31.0 pyhd8ed1ab_0 conda-forge
setproctitle 1.3.3 py310h8d17308_0 conda-forge
setuptools 68.2.2 pyhd8ed1ab_0 conda-forge
simplejson 3.19.2 py310h8d17308_0 conda-forge
sip 6.7.12 py310h00ffb61_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.0 pyhd8ed1ab_0 conda-forge
snappy 1.1.10 hfb803bf_0 conda-forge
sqlite 3.44.0 hcfcfb64_0 conda-forge
svt-av1 1.7.0 h63175ca_0 conda-forge
tbb 2021.10.0 h91493d7_2 conda-forge
tbb-devel 2021.10.0 h91493d7_2 conda-forge
tk 8.6.13 h5226925_1 conda-forge
toml 0.10.2 pyhd8ed1ab_0 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
tornado 6.3.3 py310h8d17308_1 conda-forge
typing-extensions 4.8.0 hd8ed1ab_0 conda-forge
typing_extensions 4.8.0 pyha770c72_0 conda-forge
tzdata 2023c h71feb2d_0 conda-forge
ucrt 10.0.22621.0 h57928b3_0 conda-forge
unicodedata2 15.1.0 py310h8d17308_0 conda-forge
urllib3 2.0.7 pyhd8ed1ab_0 conda-forge
utfcpp 4.0.1 h57928b3_0 conda-forge
vc 14.3 h64f974e_17 conda-forge
vc14_runtime 14.36.32532 hdcecf7f_17 conda-forge
vs2015_runtime 14.36.32532 h05e6639_17 conda-forge
vtk 9.2.6 qt_py310h1234567_219 conda-forge
vtk-base 9.2.6 qt_py310h1234567_219 conda-forge
werkzeug 3.0.1 pyhd8ed1ab_0 conda-forge
wheel 0.41.3 pyhd8ed1ab_0 conda-forge
win32_setctime 1.1.0 pyhd8ed1ab_0 conda-forge
win_inet_pton 1.1.0 pyhd8ed1ab_6 conda-forge
wslink 1.12.4 pyhd8ed1ab_0 conda-forge
x264 1!164.3095 h8ffe710_2 conda-forge
x265 3.5 h2d74725_3 conda-forge
xorg-libxau 1.0.11 hcd874cb_0 conda-forge
xorg-libxdmcp 1.1.3 hcd874cb_0 conda-forge
xz 5.2.6 h8d14728_0 conda-forge
yaml 0.2.5 h8ffe710_2 conda-forge
yarl 1.9.2 py310h8d17308_1 conda-forge
zipp 3.17.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 hcfcfb64_5 conda-forge
zstd 1.5.5 h12be248_0 conda-forge

Sorry, I got confused between OpenMPI (which is a DMP library and is not available on Windows) and the -fopenmp compiler flag (used for SMP).

With mfix-23.3.2 on Windows, running the same compile command, I see

(mfix-23.3.2) C:\tmp\foo>python -m mfixgui.build_mfixsolver -j --smp -DCMAKE_Fortran_COMPILER=gfortran
Building generic solver
Running cmake command:
cmake -DCMAKE_Fortran_COMPILER=gfortran -DENABLE_PYMFIX=ON -DENABLE_OpenMP=ON -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\tmp\foo -DUDF_DIR=C:\tmp\foo C:\Users\cgw\mambaforge\envs\mfix-23.3.2\share\mfix\src

-- Found Python3: C:/Users/cgw/mambaforge/envs/mfix-23.3.2/python.exe (found version "3.10.13") found components: Interpreter
-- Setting build type to 'RelWithDebInfo' as none was specified.
-- MFIX build settings summary:
--    Build type        = RelWithDebInfo
--    CMake version     = 3.27.6
--    Fortran compiler  = gfortran
--    Fortran flags     =
--    ENABLE_MPI        = OFF
--    ENABLE_OpenMP     = ON
--    ENABLE_CTEST      = OFF
--    ENABLE_COVERAGE   = OFF
-- The Fortran compiler identification is GNU 5.3.0
-- The C compiler identification is GNU 5.3.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: C:/Users/cgw/mambaforge/envs/mfix-23.3.2/Library/mingw-w64/bin/gfortran.exe - skipped
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/cgw/mambaforge/envs/mfix-23.3.2/Library/mingw-w64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test ffpe_trap
-- Performing Test ffpe_trap - Success
-- Performing Test ffpe_summary
-- Performing Test ffpe_summary - Success
-- Found OpenMP_C: -fopenmp (found version "4.0")
-- Found OpenMP_Fortran: -fopenmp (found version "4.0")
-- Found OpenMP: TRUE (found version "4.0")

So the question is why OpenMP is not being found:

Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)

Since I cannot reproduce the problem, it’s a bit difficult to suggest a fix. Looking at your conda list output, you are running the same versions of packages that I am.

All I can think is to try a different cmake version, as there have been some issues with cmake on Windows lately. However, I see that you are using cmake 3.27.6 which is the same version that works for me, so I’m not sure if that will help.