I have two been trying to simulate a two-fluid model for fluidized bed gasification. But when I run the MFiX simulation it does not have the default solver option. Therefore I tried to build a solver with the build tool and I found this error.
“Fatal Error: Cannot open module file ‘mpi.mod’ for reading at (1): No such file or directory”
OS: Linux/Ubuntu 20.04
But the with the locate mpi.mod command I found list of locations
I have a few questions for you, and one suggestion:
Why is there no default solver? How did you install MFiX? Did you install MFiX via Conda or some other way? What version?
What is the purpose of the pyenv commands in your .bashrc?
Why are you setting MODULEPATH?
Suggestion: Since you are having trouble running an MPI program the first thing to do is to verify the MPI installation without MFiX in the mix. There is a little program mfix/src/tools/mpi/hello_world.f90 that tests the MPI installation. Or you can use this https://mpitutorial.com/tutorials/mpi-hello-world/
See if you can get that to compile and run successfully and then we’ll tackle MFiX
The pyenv commands in .bashrc enable to define the python version in a shell before mfix can be run. mfix version I installed does not support python 3.8 which is my default python and I had to install 3.9.10.
Open a terminal from the mfix working directory / root
Run pyenv shell 3.9.10
Run mfix
I set MODULEPATH following an online solution to fix the build solver problem but it didn’t work.
Concerning mpi:
I successfully built and run the mpi_hello_world.c with the run.py file following MPI Hello World · MPI Tutorial
run git clone https://github.com/mpitutorial/mpitutorial
run export MPICC=/usr/bin/mpicc
run cd mpitutorial/tutorials/mpi-hello-world/code
cd to the root directory and run export MPIRUN=/usr/bin/mpirun
Copy the run.py file to mpitutorial/tutorials/mpi-hello-world/code and Change #!/usr/bin/python to #!/home/henok/.pyenv/shims/python in the run.py
run mpirun -n 2 mpi_hello_world and the result is
Hello world from processor henok-ThinkPad-L540, rank 0 out of 2 processors
Hello world from processor henok-ThinkPad-L540, rank 1 out of 2 processors
Dear @cgw, it is possible to install using Conda but I did not try that option. Since I have already python installed on my Linux machine I thought I can save disk space by avoiding installing Conda. I will try that option.
Thank you very much for the kind followup.
I installed Anaconda and tried to install the mfix as per the instruction on the mfix download page. Unfortunately, I got the following error. I tried to get some online solution but with no luck and I cannot figure out how to solve it.
conda create -n mfix-22.4.2 mfix==22.4.2 mfix-doc==22.4.2 mfix-gui==22.4.2 mfix-solver==22.4.2 mfix-src==22.4.2 -c conda-forge -c https://mfix.netl.doe.gov/s3/7c67abc5/b2cc8d19ca74faa65ed0a02e42d16dde//conda/dist
Collecting package metadata (current_repodata.json): failed
UnavailableInvalidChannel: HTTP 404 NOT FOUND for channel s3/7c67abc5/6934a8ff3dc2e207e0af2e5c53d27129//conda <https://mfix.netl.doe.gov/s3/7c67abc5/6934a8ff3dc2e207e0af2e5c53d27129//conda>
The channel is not accessible or is invalid.
You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.
This looks like it might be a transient network failure - can you try again?
Also note that the “secret” code that is part of the download token is only valid for a short period of time, you may have to go back to the mfix.netl.doe.gov website to get a fresh download code
Thank you very much I have successfully run my first mfix two-fluid model simulation. I have edited the condarc configuration file as per your advice, successfully installed mfix on conda environment, and successfully ran the simulation with the default solver.