Compilation failure in serial/smp/dmp with MFIX-21.3

Hi,
I was trying the new MFIX on our cluster, and noticed that I cannot compile in serial, smp or dmp.

Here is an example:

(mfix-21.3) [ebreard@talapas-ln2 fluid_bed_tfm_2d]$ module load intel/17
(mfix-21.3) [ebreard@talapas-ln2 fluid_bed_tfm_2d]$ module load intel-mpi
(mfix-21.3) [ebreard@talapas-ln2 fluid_bed_tfm_2d]$ export FC=mpif90
(mfix-21.3) [ebreard@talapas-ln2 fluid_bed_tfm_2d]$ build_mfixsolver --batch -j --dmp
Building custom solver for fluid_bed_tfm_2d.mfx
Running cmake command:

cmake -DENABLE_MPI=1 -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/gpfs/projects/dufeklab/ebreard/MFIX-21.3/fluid_bed_tfm_2d -DUDF_DIR=/gpfs/projects/dufeklab/ebreard/MFIX-21.3/fluid_bed_tfm_2d -DVERSION=21.3 /projects/dufeklab/ebreard/anaconda3/envs/mfix-21.3/share/mfix/src

– Setting build type to ‘RelWithDebInfo’ as none was specified.
– MFIX build settings summary:
– Build type = RelWithDebInfo
– CMake version = 3.19.6
– Fortran compiler =
– Fortran flags =
– ENABLE_MPI = 1
– ENABLE_OpenMP = OFF
– ENABLE_CTEST = OFF
– ENABLE_COVERAGE = OFF
– The Fortran compiler identification is GNU 4.8.5
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - done
– Check for working Fortran compiler: /packages/intel/17/linux/mpi/intel64/bin/mpif90 - skipped
– Checking whether /packages/intel/17/linux/mpi/intel64/bin/mpif90 supports Fortran 90
– Checking whether /packages/intel/17/linux/mpi/intel64/bin/mpif90 supports Fortran 90 - yes
– Found MPI_Fortran: /packages/intel/17/linux/mpi/intel64/bin/mpif90 (found version “3.1”)
– Found MPI: TRUE (found version “3.1”)
– Found Git: /projects/dufeklab/ebreard/anaconda3/envs/mfix-21.3/bin/git (found version “2.33.0”)
– Configuring done
– Generating done
– Build files have been written to: /gpfs/projects/dufeklab/ebreard/MFIX-21.3/fluid_bed_tfm_2d/build
Build command:

cmake --build . --target install -j 4

Scanning dependencies of target mfixcore
[ 1%] Building Fortran object model/CMakeFiles/mfixcore.dir/param_mod.f.o
[ 1%] Building Fortran object model/CMakeFiles/mfixcore.dir/funits_mod.f.o
[ 1%] Building Fortran object model/CMakeFiles/mfixcore.dir/dmp_modules/compar_mod.f.o
[ 2%] Building Fortran object model/CMakeFiles/mfixcore.dir/param1_mod.f.o
gfortran: error: unrecognized command line option ‘-ffpe-summary=none’
gmake[2]: *** [model/CMakeFiles/mfixcore.dir/param_mod.f.o] Error 1
gmake[2]: *** Waiting for unfinished jobs…
gfortran: error: unrecognized command line option ‘-ffpe-summary=none’
gfortran: error: unrecognized command line option ‘-ffpe-summary=none’
gfortran: error: unrecognized command line option ‘-ffpe-summary=none’
gmake[2]: *** [model/CMakeFiles/mfixcore.dir/funits_mod.f.o] Error 1
gmake[2]: *** [model/CMakeFiles/mfixcore.dir/dmp_modules/compar_mod.f.o] Error 1
gmake[2]: *** [model/CMakeFiles/mfixcore.dir/param1_mod.f.o] Error 1
gmake[1]: *** [model/CMakeFiles/mfixcore.dir/all] Error 2
gmake: *** [all] Error 2

                 BUILD FAILED

==========================================================================

I tried in serial & smp through the GUI (with and without the parallel option) and I see the same error:
gfortran: error: unrecognized command line option ‘-ffpe-summary=none’.

I can run and compile MFIX-21.1.4 without issue with the same step (DMP as shown above).

Thanks for the help!

E

1 Like

Hi Eric

I see that you are using a fairly old version of the GNU Fortran compiler - 4.8.5 is over seven years old, the current version is 11.1.0. Of course the older compilers should work, but we do not test extensively on versions older than 5. We have seen that newer compiler versions produce faster executables, especially if you enable SSE/SIMD CPU instructions via a flag like -march=native.

If you need to use GFortran 4.8, which apparently does not know about the -ffpe-summary flag, the easiest thing will be to edit the file model/CMakeLists.txt and simply delete line 590:

590	target_compile_options(mfixcore PUBLIC $<$<STREQUAL:${CMAKE_Fortran_COMPILER_ID},GNU>:-ffpe-summary=none>)

Let me know if this works -

– Charles

Thanks a lot @cgw , it fixed it!

Hi!I have the same problem as you. However, I deleted line 590 and this error still occurs after recompilation. How do you edit this CMakeLists.txt? GUI–Editor–copy CMakeLists.txt in the MFIX source–edit CMakeLists.txt in project file, deleted line 590–build solver. Just like this? Thanks a lot !

Hi @Zishuo_Wang -

I think you need to edit the main copy of CMakeLists.txt, not a copy in the project directory. It will be somewhere like
anaconda3/envs/mfix-21.3.2/share/mfix/src

Selecting “About MFiX” in the file menu will show you the solver source code location.

You can edit CMakeLists.txt using any plain-text editor. But the editor in the GUI will only let you work on a copy, so you have to use something else.

– Charles

Hi @cgw
As you say, I found it and worked. Thanks a lot !!! :laughing:

1 Like

Hi @cgw
May I ask where to download the latest version of GNU and how to install it?

If you are on the Windows platform, the GNU Fortran compiler that we use comes from conda-forge. Unfortunately there seems to be no version newer than 5.3.0 that has been ported to Windows.

If you are on Linux/Unix the platform Fortran compiler is used, so this is distribution-specific and is not really an MFiX question.

If you have further questions, please start a new thread.

– Charles