Parallel run in Ubuntu 22.04
We seem to have problems running applications in parallel in Ubuntu 22.04. For instance, the motorBike tutorial displays the following error:
--> FOAM FATAL ERROR: (openfoam-2112 patch=220610) attempt to run parallel on 1 processor
From static bool Foam::UPstream::init(int&, char**&, bool)
in file UPstream.C at line 297.
FOAM aborting
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Link issues together to show that they're related. Learn more.
Activity
- Maintainer
I just tested on my laptop (Ubuntu 22.04) with the precompiled packages and seems to be OK (pitzDaily with 2 processors).
I tried searching the issues here, but didn't find what I was looking for. It was maybe a year ago (or more), where the docker container with ubuntu worked OK, but not on a regular installation. The problem traced back to something like mpi-default (openmpi) being installed (according to the database) but was actually missing a bunch of files. The weird hack was to remove that package only (without removing any dependencies) and the reinstalling it.
Sorry that I can't give more to go on, but I think this might be it. Maybe you are better at searching the issues. If you happen to find it, should probably put into an FAQ.
EDIT: checked with openfoam2112 and openfoam2206
Edited by Mark OLESEN - Author
Hi Mark, Thanks for checking this, and for doing it so fast. Just to add a bit on the problem, we have replicated the same error on 2 different machines. In one case, we had OpenFOAM installed, we have done the upgrade of ubuntu from 20.04 to 22.04, and all of a sudden the mpirun was not working. In the second case, we have done a clean installation of Ubuntu 22.04 and of OpenFOAM on a new machine. The two common points were: Ubuntu 22.04, and OpenFOAM (binary, installed with apt-get install). I'll keep trying figuring out what happened but I thought it would have been useful to give you some additional details --carlo
- Kutalmış Berçin added community label
added community label
- Author
Hi again. I think I have found the problem. There was another common point between the 2 installations we did: using Anaconda. Somehow, the base anaconda environment was interfering with the mpirun. Without Anaconda all works fine. So, pretty much the problem was on my side. On the other hand, considering the widespread use of anaconda, it might be worthwhile mentioning the issue somewhere (if not already done) cheers
- Maintainer
This is interesting. In the meantime I actually found the notes about the oddness with mpirun I'd previously seen. Strangely enough was actually documented on our mini Ubuntu FAQ - same as #1817 (closed)
Does this roughly correspond to your observations?
Edited by Mark OLESEN - Author
It does, in the sense that:
dpkg-query -L libopenmpi-dev | grep libmpi
andlibopenmpi-dev:amd64: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
give what we expect.The difference is that I did not need to re-install
libopenmpi-dev
. I just had to deactivate the anaconda base environment. - Owner
Orphaned/stale report - please re-open if needed
- Andrew Heather closed
closed