Jeff,thanks.
I tried your approach, but it failed when I built the solver, what else do I need to change?
Running build_mfixsolver --dmp -DMPI_Fortran_COMPILER=mpifort
Building custom solver for 0.mfx
Running cmake command:
cmake -DMPI_Fortran_COMPILER=mpifort -DENABLE_PYMFIX=ON -DPython3_EXECUTABLE=/ncsfs02/xiaodong/anaconda/conda/envs/mfix-21.1.4/bin/python3.7 -DPython3_ROOT_DIR=/ncsfs02/xiaodong/anaconda/conda/envs/mfix-21.1.4 -DENABLE_MPI=1 -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/ncsfs02/xiaodong/Example/xd/3d dem/519Liu -DUDF_DIR=/ncsfs02/xiaodong/Example/xd/3d dem/519Liu -DVERSION=21.1.4 /ncsfs02/xiaodong/anaconda/conda/envs/mfix-21.1.4/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_CTEST = OFF
-- ENABLE_COVERAGE = OFF
-- The C compiler identification is GNU 4.8.5
-- The Fortran compiler identification is GNU 4.8.5
-- 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
-- Found MPI_C: /opt/openmpi-4.1.2/lib/libmpi.so (found version "3.1")
-- Found MPI_Fortran: /opt/openmpi-4.1.2/lib/libmpi_usempi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Found Git: /ncsfs02/xiaodong/anaconda/conda/envs/mfix-21.1.4/bin/git (found version "2.34.1")
--
Found UDFs:
/ncsfs02/xiaodong/Example/xd/3d dem/519Liu/param_mod.f
-- Found Python3: /ncsfs02/xiaodong/anaconda/conda/envs/mfix-21.1.4/bin/python3.7 (found version "3.7.11") found components: Interpreter NumPy Development
-- Configuring done
-- Generating done
-- Build files have been written to: /ncsfs02/xiaodong/Example/xd/3d dem/519Liu/build
Build command:
cmake --build . --target install
[ 96%] Built target mfixcore
Scanning dependencies of target udfs
[ 97%] Building Fortran object CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o
[ 97%] Built target udfs
Scanning dependencies of target mfixsolver
[ 97%] Linking Fortran executable mfixsolver
[ 97%] Built target mfixsolver
[ 97%] Generating f2py
{'before': '', 'this': 'use', 'after': ', intrinsic :: iso_c_binding, only: c_char, c_int, c_size_t, c_null_char '}
{'before': '', 'this': 'use', 'after': ', intrinsic :: iso_c_binding, only: c_char, c_int, c_size_t '}
{'before': '', 'this': 'use', 'after': ', intrinsic:: iso_c_binding, only: c_int '}
rmbadname1: Replacing "index" with "index_bn".
rmbadname1: Replacing "index" with "index_bn".
rmbadname1: Replacing "index" with "index_bn".
rmbadname1: Replacing "index" with "index_bn".
rmbadname1: Replacing "index" with "index_bn".
rmbadname1: Replacing "index" with "index_bn".
rmbadname1: Replacing "index" with "index_bn".
rmbadname1: Replacing "index" with "index_bn".
analyzevars: charselector={'len': '1', 'kind': 'c_char'} unhandled.analyzevars: charselector={'len': '1', 'kind': 'c_char'} unhandled.analyzevars: charselector={'len': '80'} unhandled.get_useparameters: mapping for {'only': 1, 'map': {'start_log': 'start_log', 'end_log': 'end_log'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'get_run_id': 'get_run_id'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'dim_n': 'dim_n', 'dim_m': 'dim_m'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'dim_n': 'dim_n', 'dim_m': 'dim_m'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'dim_n': 'dim_n', 'dim_m': 'dim_m'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'dim_n': 'dim_n', 'dim_m': 'dim_m'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'dim_n': 'dim_n', 'dim_m': 'dim_m'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'dim_n': 'dim_n', 'dim_m': 'dim_m'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'dim_n': 'dim_n', 'dim_m': 'dim_m'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'dim_m': 'dim_m', 'dim_eqs': 'dim_eqs'}} not impl.analyzevars: charselector={'len': '3'} unhandled.get_useparameters: mapping for {'only': 1, 'map': {'dim_m': 'dim_m', 'dim_eqs': 'dim_eqs'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'time': 'time', 'tstop': 'tstop'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'time': 'time', 'tstop': 'tstop'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'time': 'time', 'tstop': 'tstop'}} not impl.get_useparameters: mapping for {'only': 1, 'map': {'time': 'time', 'tstop': 'tstop'}} not impl.getctype: "integer(kind=c_int)" is mapped to C "int" (to override define dict(integer = dict(c_int="<C typespec>")) in /ncsfs02/xiaodong/Example/xd/3d dem/519Liu/build/.f2py_f2cmap file).
getctype: "integer(kind=c_int)" is mapped to C "int" (to override define dict(integer = dict(c_int="<C typespec>")) in /ncsfs02/xiaodong/Example/xd/3d dem/519Liu/build/.f2py_f2cmap file).
getctype: "integer(kind=c_int)" is mapped to C "int" (to override define dict(integer = dict(c_int="<C typespec>")) in /ncsfs02/xiaodong/Example/xd/3d dem/519Liu/build/.f2py_f2cmap file).
Scanning dependencies of target mfixsolver_ext
[ 98%] Building C object CMakeFiles/mfixsolver_ext.dir/f2pywrappers/mfixsolvermodule.c.o
[ 98%] Building Fortran object CMakeFiles/mfixsolver_ext.dir/f2pywrappers/mfixsolver-f2pywrappers.f.o
[ 98%] Building Fortran object CMakeFiles/mfixsolver_ext.dir/f2pywrappers/mfixsolver-f2pywrappers2.f90.o
[ 98%] Linking Fortran shared library mfixsolver.cpython-37m-x86_64-linux-gnu.so
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o: In function `__param_MOD_filler':
/ncsfs02/xiaodong/Example/xd/3d dem/519Liu/param_mod.f:101: multiple definition of `__param_MOD_filler'
CMakeFiles/==============================================================
BUILD FAILED
==============================================================
mfixsolver_ext.dir/pymfix/param_mod.f90.o:/ncsfs02/xiaodong/Example/xd/3d dem/519Liu/build/pymfix/param_mod.f90:101: first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o: In function `__param_MOD_filler':
/ncsfs02/xiaodong/Example/xd/3d dem/519Liu/param_mod.f:101: multiple definition of `__param_MOD_dimension_scalar'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:/ncsfs02/xiaodong/Example/xd/3d dem/519Liu/build/pymfix/param_mod.f90:101: first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x4): multiple definition of `__param_MOD_dimension_n_s'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x4): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x8): multiple definition of `__param_MOD_dimension_n_g'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x8): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0xc): multiple definition of `__param_MOD_dimension_m'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0xc): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x10): multiple definition of `__param_MOD_dimension_k'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x10): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x14): multiple definition of `__param_MOD_dimension_j'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x14): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x18): multiple definition of `__param_MOD_dimension_i'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x18): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x1c): multiple definition of `__param_MOD_dimension_4'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x1c): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x20): multiple definition of `__param_MOD_dimension_3p'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x20): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x24): multiple definition of `__param_MOD_dimension_3l'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x24): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x28): multiple definition of `__param_MOD_dimension_3g'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x28): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x2c): multiple definition of `__param_MOD_dimension_3_alloc'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x2c): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x30): multiple definition of `__param_MOD_dimension_3'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x30): first defined here
CMakeFiles/udfs.dir/ncsfs02/xiaodong/Example/xd/3d_dem/519Liu/param_mod.f.o:(.bss+0x34): multiple definition of `__param_MOD_dim_scalar2'
CMakeFiles/mfixsolver_ext.dir/pymfix/param_mod.f90.o:(.bss+0x34): first defined here
collect2: error: ld returned 1 exit status
gmake[2]: *** [mfixsolver.cpython-37m-x86_64-linux-gnu.so] Error 1
gmake[1]: *** [CMakeFiles/mfixsolver_ext.dir/all] Error 2