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
– 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)**
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, 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.