Selection of no of cores of computer to perform simulation?

HELLO, I WANTED TO KNOW IF THERE IS SOMEHOW I COULD SELECT THE NO OF CORES OF THE COMPURTER TO PERFORM THE SIMULATION IN MFIX?
WHEN THE RUN IS CLICKED, AN OPTION POPS UP BUT I AM UNABLE TO MAKE ANY SELECTION.
@jeff.dietiker CAN YOU ANSWER THIS QUESTIONS?IT WILL BE VERY HELPFUL TO ME.

THANKS
SAYYAM CHOPRA

On Linux, you need to build the DMP solver first:
image

Then when you run the simulation, make sure you select the project solver (the one you just built) and you should see the option to set the number of nodes in each direction. Their product equals the number of cores (2x2x1 partition = 4 cores shown below).

image

The DMP solver is not supported on Windows.

2 Likes

Note that you can use SMP on windows, to take advantage of multiple cores on a single host. But distributed multiprocessing is not supported on Windows as Jeff says.

2 Likes

Thanks @jeff.dietiker . So, according to your reply, the first thing i should do is download the LINUX OS and then start using MFIX on LINUX.
The next steps are as directed by you.

Also, I have one more query. I use a 64-bit operating system, x64-based processor, so that means i have 64 cores available. Can you please tell me what is the default no of cores the windows 10 OS select when running the simulation on MFIX? Also, do you think using LINUX OS and selective selection of no of cores would help speed the simulation?

thanks

Thanks @cgw. I appreciate your reply.

The default will be to use a single core (serial) unless SMP is enabled.

1 Like

That’s not quite right. You have however many cores your system is built with. 64 bit does not mean 64 cores.

I may not have provided the complete information but i have checked and my CPU has 64 available cores that could be used.
Anyways, can you please suggest me how do i download LINUX OS on my desktop which is currently running on windows?

If you have 64 cores locally, you can try using SMP with 64 threads.

If you want to use DMP, you need to switch to Linux.

Support for installing Linux is outside the scope of this forum. We suggest Ubuntu Linux for beginners. See for example Install Ubuntu desktop | Ubuntu

1 Like

If you are running an SMP solver, the run popup should show you the number of SMP threads available, as in this screenshot:

shot-2022-09-16_14-26-53

If you have 64 that will say ‘64 cores avilable locally’ and you can set the number of threads to 64.

Yes @cgw , I am using DEM modelling and so i am planning to install LINUX OS. Thanks a lot for the reply.

Also, I have few other queries.

  1. What is SMP solver?
  2. Can I use windows and still select no of threads for TFM modelling?
  3. Is LINUX Os the only way to select no of threads for DEM modelling/

I hope if you could provide more clarity.
Also, I am attaching a screenshot of TFM model i am working on and i couldn’t
find a way to select the threads.

Please try to search the forum before asking question. SMP and DMP have been discussed previously, for example here Different solver building results by using SMP and DMP - #2 by jeff.dietiker

SMP (shared-memory parallel) will allow you to use multiple threads on a single machine.
DMP (distributed memory parallel) will allow you to use multiple machines connected on a network.

SMP is supported on Windows. DMP is not.

TFM and DEM are different physics models, this is completely independent of SMP vs DMP which are different approaches to parallel computation. You can do DEM or TFM with an SMP or DMP (or serial) solver. “Serial” refers to a solver without any support for parallelism. The MFiX default solver is serial.

To use SMP on Windows you have to build a custom solver with SMP enabled. This is covered in the MFiX documentation.

I do not understand even after following the forum about how to create SMP because I have no knowledge of coding. Could you give some details?
Anyone @cgw @jeff.dietiker

Click the “Build mfix” icon (wrench) in the top toolbar.

Then select the SMP checkbox and click “Build solver”

Hello @cgw , i tried the following suggestions from you and i seem to have some difficulty. I have referred to some other forums but i really do not understand the actually cause of this error.
Could you please help me with this issue?

Running C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1\python.exe -m mfixgui.build_mfixsolver -j --smp -DCMAKE_Fortran_COMPILER=gfortran
Building custom solver for newbuilder.mfx
Running cmake command:

cmake -DCMAKE_Fortran_COMPILER=gfortran -DENABLE_PYMFIX=ON -DPython3_EXECUTABLE=C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1\python.exe -DPython3_ROOT_DIR=C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1 -DENABLE_OpenMP=1 -G MinGW Makefiles -DCMAKE_INSTALL_PREFIX=C:\Users\CHOP0003\Downloads\newbuilder -DUDF_DIR=C:\Users\CHOP0003\Downloads\newbuilder -DVERSION=22.2.1 C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1\share\mfix\src

– Setting build type to ‘RelWithDebInfo’ as none was specified.
– MFIX build settings summary:
– Build type = RelWithDebInfo
– CMake version = 3.24.0
– Fortran compiler = gfortran
– Fortran flags =
– ENABLE_MPI = OFF
– ENABLE_OpenMP = 1
– ENABLE_CTEST = OFF
– ENABLE_COVERAGE = OFF
– The C compiler identification is GNU 5.3.0
– The Fortran compiler identification is unknown
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/cc.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - failed
– Check for working Fortran compiler: C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/gfortran.exe
– Check for working Fortran compiler: C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/gfortran.exe - broken
CMake Error at C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/share/cmake-3.24/Modules/CMakeTestFortranCompiler.cmake:61 (message):
The Fortran compiler

"C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/gfortran.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/CHOP0003/Downloads/newbuilder/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/mingw32-make.exe -f Makefile cmTC_e547c/fast && C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/mingw32-make.exe  -f CMakeFiles\cmTC_e547c.dir\build.make CMakeFiles/cmTC_e547c.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/CHOP0003/Downloads/newbuilder/build/CMakeFiles/CMakeTmp'
Building Fortran object CMakeFiles/cmTC_e547c.dir/testFortranCompiler.f.obj
C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1\Library\mingw-w64\bin\gfortran.exe    -c C:\Users\CHOP0003\Downloads\newbuilder\build\CMakeFiles\CMakeTmp\testFortranCompiler.f -o CMakeFiles\cmTC_e547c.dir\testFortranCompiler.f.obj
<built-in>: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/msys2> for instructions.
CMakeFiles\cmTC_e547c.dir\build.make:76: recipe for target 'CMakeFiles/cmTC_e547c.dir/testFortranCompiler.f.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_e547c.dir/testFortranCompiler.f.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/CHOP0003/Downloads/newbuilder/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_e547c/fast' failed
mingw32-make.exe: *** [cmTC_e547c/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:20 (project)

– Configuring incomplete, errors occurred!
See also “C:/Users/CHOP0003/Downloads/newbuilder/build/CMakeFiles/CMakeOutput.log”.
See also “C:/Users/CHOP0003/Downloads/newbuilder/build/CMakeFiles/CMakeError.log”.

                 BUILD FAILED

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

This is an unusual error. The gfortran comes from the Anaconda distribution and we expect it to work. This is the first report I’ve seen where it fails.

“Internal compiler error” problems like this can be due to faulty installation, disks filling up, or even hardware issues like faulty RAM. Can you try on a different machine?

Sure @cgw . I will try it and let you know.

Yes i tried on my other desktop and its the same error.
Running C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1\python.exe -m mfixgui.build_mfixsolver -j --smp -DCMAKE_Fortran_COMPILER=gfortran
Building custom solver for buildsolver.mfx
Running cmake command:

cmake -DCMAKE_Fortran_COMPILER=gfortran -DENABLE_PYMFIX=ON -DPython3_EXECUTABLE=C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1\python.exe -DPython3_ROOT_DIR=C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1 -DENABLE_OpenMP=1 -G MinGW Makefiles -DCMAKE_INSTALL_PREFIX=C:\Users\CHOP0003\Downloads\buildsolver -DUDF_DIR=C:\Users\CHOP0003\Downloads\buildsolver -DVERSION=22.2.1 C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1\share\mfix\src

– Setting build type to ‘RelWithDebInfo’ as none was specified.
– MFIX build settings summary:
– Build type = RelWithDebInfo
– CMake version = 3.24.0
– Fortran compiler = gfortran
– Fortran flags =
– ENABLE_MPI = OFF
– ENABLE_OpenMP = 1
– ENABLE_CTEST = OFF
– ENABLE_COVERAGE = OFF
– The C compiler identification is GNU 5.3.0
– The Fortran compiler identification is unknown
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/cc.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - failed
– Check for working Fortran compiler: C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/gfortran.exe
– Check for working Fortran compiler: C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/gfortran.exe - broken
CMake Error at C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/share/cmake-3.24/Modules/CMakeTestFortranCompiler.cmake:61 (message):
The Fortran compiler

"C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/gfortran.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/CHOP0003/Downloads/buildsolver/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/mingw32-make.exe -f Makefile cmTC_18538/fast && C:/Users/CHOP0003/Anaconda3/envs/mfix-22.2.1/Library/mingw-w64/bin/mingw32-make.exe  -f CMakeFiles\cmTC_18538.dir\build.make CMakeFiles/cmTC_18538.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Users/CHOP0003/Downloads/buildsolver/build/CMakeFiles/CMakeTmp'
Building Fortran object CMakeFiles/cmTC_18538.dir/testFortranCompiler.f.obj
C:\Users\CHOP0003\Anaconda3\envs\mfix-22.2.1\Library\mingw-w64\bin\gfortran.exe    -c C:\Users\CHOP0003\Downloads\buildsolver\build\CMakeFiles\CMakeTmp\testFortranCompiler.f -o CMakeFiles\cmTC_18538.dir\testFortranCompiler.f.obj
<built-in>: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/msys2> for instructions.
CMakeFiles\cmTC_18538.dir\build.make:76: recipe for target 'CMakeFiles/cmTC_18538.dir/testFortranCompiler.f.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_18538.dir/testFortranCompiler.f.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Users/CHOP0003/Downloads/buildsolver/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_18538/fast' failed
mingw32-make.exe: *** [cmTC_18538/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:20 (project)

– Configuring incomplete, errors occurred!
See also “C:/Users/CHOP0003/Downloads/buildsolver/build/CMakeFiles/CMakeOutput.log”.
See also “C:/Users/CHOP0003/Downloads/buildsolver/build/CMakeFiles/CMakeError.log”.

                 BUILD FAILED

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