CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] mpirun: Error: unknown option "-np" (https://www.cfd-online.com/Forums/openfoam-installation/236681-mpirun-error-unknown-option-np.html)

complete.basis June 9, 2021 12:00

mpirun: Error: unknown option "-np"
 
Hello, everyone!
I have a problem with running solver in parallel:

mpirun -np 4 rhoReactingCentralFoam -parallel > log_run.log
mpirun: Error: unknown option "-np"

When I run it on a single processor - everything is fine.

I am working on Ubuntu 20.04 LTS (run in docker over Windows 10 Pro 21H1) with OpenFOAM 7 (installed it using this guide https://openfoamwiki.net/index.php/I...7/Ubuntu/20.04)

I've also installed swak4foam and I am using custom solver rhoReactingCentralFoam.

which mpirun
/home/dkuzovlev/OpenFOAM/OpenFOAM-7/bin/mpirun

whereis mpirun
mpirun: /usr/bin/mpirun /usr/bin/mpirun.openmpi /home/dkuzovlev/OpenFOAM/OpenFOAM-7/bin/mpirun /usr/share/man/man1/mpirun.1.gz

ompi_info -V
Open MPI v4.0.3

ompi_info --path bindir
Bindir: /home/dkuzovlev/OpenFOAM/ThirdParty-7/platforms/linux64Gcc/openmpi-2.1.1/bin

What is wrong? What should I do?

Kind regards
Dmitry

complete.basis June 15, 2021 03:22

solved this problem by setting in /etc/bashrc: export WM_MPLIB=SYSTEMOPENMPI and installed only OpenFOAM (skipped install of the ThirdParty software).

bany September 8, 2023 04:17

mpirun: Error: unknown option "-np"
 
Recently, i met the same problem. However, i cannot understand the explanation.

After several tries, openmpi-2.1.1 is loaded into Thirdparty-7, and modify “WM_MPLIB=SYSTEMOPENMPI” to “WM_MPLIB=OPENMPI in ~/OpenFOAM/OpenFOAM-7/ext/bashrc.

Then, load the openmpi-2.1.1 into Thirdparty-7, ./Allclean;./Allwmake
And it will install openmpi automatically.


All times are GMT -4. The time now is 06:51.