Build MFIX-19.3.1 in DMP on cluster - compiler not detected

Hello,

We tried to install on our cluster the latest mfix and compile in dmp using the command that worked for 18.1.5, however it did not work this time. It seems that the FC flag is not recognized?
Please see below:

build_mfixsolver --batch --dmp FC=mpiifort -DMPI_Fortran_COMPILER=mpiifort
Building custom solver for vortex_shedding_fld_2d.mfx
Running cmake command:

cmake -DMPI_Fortran_COMPILER=mpiifort -DMPI_Fortran_COMPILER=mpiifort -DENABLE_MPI=1 -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/gpfs/projects/dufeklab/dufek/vortex_shedding_fld_2d -DPython3_ROOT_DIR=/home/dufek/anaconda3/envs/mfix-19.3.1 -DUDF_DIR=/gpfs/projects/dufeklab/dufek/vortex_shedding_fld_2d -DVERSION=19.3.1.post0 /home/dufek/anaconda3/envs/mfix-19.3.1/share/mfix/src

– Setting build type to ‘RelWithDebInfo’ as none was specified.
– MFIX build settings summary:
– Build type = RelWithDebInfo
– CMake version = 3.14.0
– Fortran compiler =
– Fortran flags =
– ENABLE_MPI = 1
– ENABLE_OpenMP = OFF
– ENABLE_NETCDF = OFF
– ENABLE_CTEST = OFF
– ENABLE_COVERAGE = OFF
– The Fortran compiler identification is GNU 4.8.5
– Check for working Fortran compiler: /usr/bin/f95
– Check for working Fortran compiler: /usr/bin/f95 – works
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - done
– Checking whether /usr/bin/f95 supports Fortran 90
– Checking whether /usr/bin/f95 supports Fortran 90 – yes
– Found MPI_Fortran: /gpfs/packages/intel/compilers_and_libraries_2017.8.262/linux/mpi/intel64/lib/libmpifort.so (found version “3.1”)
– Found MPI: TRUE (found version “3.1”)
– Found Git: /usr/bin/git (found version “1.8.3.1”)
– Configuring done
– Generating done
CMake Warning:
Manually-specified variables were not used by the project:

Python3_ROOT_DIR

– Build files have been written to: /gpfs/projects/dufeklab/dufek/vortex_shedding_fld_2d/build
Running make command:

make install

Scanning dependencies of target mfixcore
[ 0%] Building Fortran object model/CMakeFiles/mfixcore.dir/dmp_modules/compar_mod.f.o
/home/dufek/anaconda3/envs/mfix-19.3.1/share/mfix/src/model/dmp_modules/compar_mod.f:18.12:

    USE mpi
        1

Fatal Error: File ‘mpi.mod’ opened at (1) is not a GNU Fortran module file
make[2]: *** [model/CMakeFiles/mfixcore.dir/dmp_modules/compar_mod.f.o] Error 1
make[1]: *** [model/CMakeFiles/mfixcore.dir/all] Error 2
make: *** [all] Error 2

                  BUILD UNSUCCESSFUL

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

We tried to put the flag through the GUI, and we end up with the same issue.

ps: we have loaded intel/17 and intel-mpi modules as we did with MFIX-18.1.5 (which works nicely on our cluster)

Thank you for the help,

Eric

1 Like

The MPI_Fortran_COMPILER option is no longer required (I should have added a CMake warning to warn the user when it’s used! I’ll add that in the next release).

CMake does not look at the FC option, instead set it as an environment variable:

> env FC=mpiifort build_mfixsolver --batch --dmp

If your intel/17 module sets the environment variable FC=mpiifort for you, then the following ought to work:

> build_mfixsolver --batch --dmp

(The Python3_ROOT_DIR is unrelated but should be removed. I will also remove from the next release, thanks!)

1 Like

Hi Mark,

Following your suggestion it worked this way:

  1. conda activate mfix-19.3.1
  2. module load intel/17
  3. module load intel-mpi
  4. env FC=mpiifort build_mfixsolver --batch --dmp

With 2018.1.5 the activation of the conda after loading the modules was fine but not for this version.

Thanks a lot,

Eric

2 Likes

Hi, Mark

I met the same problem when using the newest version of MFIX. Could you give me some advice? Following is the message output by build solver.

Command: [‘build_mfixsolver’, ‘-j’, ‘–dmp’, ‘-DMPI_Fortran_COMPILER=’]
Building custom solver for spink74.mfx
Running cmake command:

cmake -DMPI_Fortran_COMPILER= -DENABLE_PYMFIX=ON -DPython3_EXECUTABLE=C:\ProgramData\Anaconda3\envs\mfix-20.2.1\python.exe -DPython3_ROOT_DIR=C:\ProgramData\Anaconda3\envs\mfix-20.2.1 -DENABLE_MPI=1 -G MinGW Makefiles -DCMAKE_INSTALL_PREFIX=D:\mfix_file\spink74_test -DUDF_DIR=D:\mfix_file\spink74_test -DVERSION=20.2.1 C:\ProgramData\Anaconda3\envs\mfix-20.2.1\share\mfix\src

– Setting build type to ‘RelWithDebInfo’ as none was specified.
– MFIX build settings summary:
– Build type = RelWithDebInfo
– CMake version = 3.17.2
– Fortran compiler =
– Fortran flags =
– ENABLE_MPI = 1
– ENABLE_OpenMP = OFF
– ENABLE_CTEST = OFF
– ENABLE_COVERAGE = OFF
– The C compiler identification is GNU 5.3.0
– The Fortran compiler identification is GNU 5.3.0
– Check for working C compiler: C:/ProgramData/Anaconda3/envs/mfix-20.2.1/Library/mingw-w64/bin/gcc.exe
– Check for working C compiler: C:/ProgramData/Anaconda3/envs/mfix-20.2.1/Library/mingw-w64/bin/gcc.exe - works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working Fortran compiler: C:/ProgramData/Anaconda3/envs/mfix-20.2.1/Library/mingw-w64/bin/gfortran.exe
– Check for working Fortran compiler: C:/ProgramData/Anaconda3/envs/mfix-20.2.1/Library/mingw-w64/bin/gfortran.exe - works
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - done
– Checking whether C:/ProgramData/Anaconda3/envs/mfix-20.2.1/Library/mingw-w64/bin/gfortran.exe supports Fortran 90
– Checking whether C:/ProgramData/Anaconda3/envs/mfix-20.2.1/Library/mingw-w64/bin/gfortran.exe supports Fortran 90 - yes
– Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS)
– Could NOT find MPI_Fortran (missing: MPI_Fortran_LIB_NAMES MPI_Fortran_F77_HEADER_DIR MPI_Fortran_MODULE_DIR MPI_Fortran_WORKS)
CMake Error at C:/ProgramData/Anaconda3/envs/mfix-20.2.1/Library/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find MPI (missing: MPI_C_FOUND MPI_Fortran_FOUND)

  Reason given by package: MPI component 'CXX' was requested, but language CXX is not enabled.  

Call Stack (most recent call first):
C:/ProgramData/Anaconda3/envs/mfix-20.2.1/Library/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
C:/ProgramData/Anaconda3/envs/mfix-20.2.1/Library/share/cmake-3.17/Modules/FindMPI.cmake:1717 (find_package_handle_standard_args)
model/CMakeLists.txt:627 (find_package)

– Configuring incomplete, errors occurred!
See also “D:/mfix_file/spink74_test/build/CMakeFiles/CMakeOutput.log”.
See also “D:/mfix_file/spink74_test/build/CMakeFiles/CMakeError.log”.

                  BUILD FAILED

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

In fact, I have tried ebreard6’s way to fix it. But it failed.

CMAKE can’t find a mpi library… do you have one? Also, GNU 5.3.0 is old, can you use a newer version?

Thank you, onlyjus. Could you give some steps directly to fix this problem? Honestly, i lack knowledge about this.

You are on Windows, and trying to build with DMP (OpenMPI) enabled, which is not supported.

(Version GCC 5.3.0 is ok; it is usual Anaconda package used to build the solver on Windows.)

Try running “build_mfixsolver” at the Windows command prompt with no arguments, to build in serial:

C:\path\to\your\directory> build_mfixsolver --clean
C:\path\to\your\directory> build_mfixsolver
1 Like

Hi, Mark

Thank you for your reply.

It is a fact that it succeeds to build solver for tutorials cases of MFIX, but it fails to do the same thing for my simulation. It is quite strange.