Fail to build dmp

OS: ubuntu16 (Virtual Machine)
mfix: 19.3.1 post0

The main issue is " Could NOT find MPI (missing: MPI_C_FOUND) (found version “3.0”)"

erro:

cmake -DENABLE_PYMFIX=ON -DENABLE_MPI=1 -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/home/cl/MFiX_Cases/git_sync/Yin_0413_git_sync_case -DPython3_ROOT_DIR=/home/cl/anaconda3/envs/mfix-19.3.1 -DUDF_DIR=/home/cl/MFiX_Cases/git_sync/Yin_0413_git_sync_case -DVERSION=19.3.1.post0 /home/cl/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.16.4
– Fortran compiler =
– Fortran flags =
– ENABLE_MPI = 1
– ENABLE_OpenMP = OFF
– ENABLE_NETCDF = OFF
– ENABLE_CTEST = OFF
– ENABLE_COVERAGE = OFF
– The C compiler identification is GNU 5.4.0
– The Fortran compiler identification is GNU 5.4.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – 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: /usr/bin/gfortran
– Check for working Fortran compiler: /usr/bin/gfortran – works
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - done
– Checking whether /usr/bin/gfortran supports Fortran 90
– Checking whether /usr/bin/gfortran supports Fortran 90 – yes
– Could NOT find MPI_C (missing: MPI_C_WORKS)
– Found MPI_Fortran: /usr/lib/openmpi/lib/libmpi_usempif08.so (found version “3.0”)
CMake Error at /home/cl/anaconda3/envs/mfix-19.3.1/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find MPI (missing: MPI_C_FOUND) (found version “3.0”)
Call Stack (most recent call first):
/home/cl/anaconda3/envs/mfix-19.3.1/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/home/cl/anaconda3/envs/mfix-19.3.1/share/cmake-3.16/Modules/FindMPI.cmake:1700 (find_package_handle_standard_args)
model/CMakeLists.txt:619 (find_package)
– Configuring incomplete, errors occurred!
See also “/home/cl/MFiX_Cases/git_sync/Yin_0413_git_sync_case/build/CMakeFiles/CMakeOutput.log”.
See also “/home/cl/MFiX_Cases/git_sync/Yin_0413_git_sync_case/build/CMakeFiles/CMakeError.log”.
==============================================================
BUILD UNSUCCESSFUL
==============================================================

case:
tutorial/dem/fluid_bed_dem_2d

description:
building SMP suceed, but DMP failed.

Hopefully someone more experienced than me can jump in on this, but it seems like your system is still identifying the GNU compilers rather than the Intel compilers, and I don’t think the GNU compilers are compatible with MPI. Did you export mpifort as an environmental variable before running your build? Might not be necessary for your system, but I don’t think it would hurt. My successful builds for DMP look like this:

(mfix-19.3.1) [juha2097@shas0137 3dpseudo_vibratingslice_flucG]$ env FC=mpif90 build_mfixsolver --batch --dmp -j
Building custom solver for 3dslice_test_flucG.mfx
Running cmake command:

cmake -DENABLE_MPI=1 -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/gpfs/summit/scratch/juha2097/3dpseudo_vibratingslice_flucG
-DPython3_ROOT_DIR=/projects/juha2097/software/anaconda/envs/mfix-19.3.1 -DUDF_DIR=/gpfs/summit/scratch/juha2097/3dpseudo_vibratingslice_flucG
-DVERSION=19.3.1.post0 /projects/juha2097/software/anaconda/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 Intel 17.0.4.20170411
– Check for working Fortran compiler: /curc/sw/intel/17.4/impi/2017.3.196/bin64/mpif90
– Check for working Fortran compiler: /curc/sw/intel/17.4/impi/2017.3.196/bin64/mpif90 – works
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - done
– Checking whether /curc/sw/intel/17.4/impi/2017.3.196/bin64/mpif90 supports Fortran 90
– Checking whether /curc/sw/intel/17.4/impi/2017.3.196/bin64/mpif90 supports Fortran 90 – yes
– Found MPI_Fortran: /curc/sw/intel/17.4/impi/2017.3.196/bin64/mpif90 (found version “3.1”)
– Found MPI: TRUE (found version “3.1”)
– Found Git: /usr/bin/git (found version “1.8.3.1”)

I also had to reinstall mpi4py with pip after declaring my environmental variables to ensure that the Intel MPI was used, I made a shell script for this that I can share with you if you’re interested.