CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Multiple Installation Issue: Parallel Processing No Longer Works (

dancfd June 27, 2011 21:33

Multiple Installation Issue: Parallel Processing No Longer Works
Hello all,

I have been using OF1.7.x for a number of cases, and when OF2 was released I eagerly installed it. Unfortunately, since I installed OF2, I can no longer run applications in parallel in OF1.7.x. Some more info:
-Parallel processing works fine in OF2
-There appears to be some kind of MPI problem (MPI installed with OF2 is newer than that installed with OF17x, did it delete the older version?)
-I have set up my .bashrc to call one of the two OF bashrc when I call the appropriate alias
-using Ubuntu 10.04
-I would like to continue using OF1.7.x for the cases that are in progress since it would take some effort to change the structure to be suitable for use in OF2.

-I get the following error:

Sorry!  You were supposed to get help about:
But I couldn't open the help file:
    /home/dan/OpenFOAM/ThirdParty-1.7.x/platforms/linux64Gcc/openmpi-1.4.1/share/openmpi/help-opal-runtime.txt: No such file or directory.  Sorry!
[two-desktop:12987] [[INVALID],INVALID] ORTE_ERROR_LOG: Not found in file ../../../orte/runtime/orte_init.c at line 77
[two-desktop:12987] [[INVALID],INVALID] ORTE_ERROR_LOG: Not found in file ../../../../../orte/tools/orterun/orterun.c at line 541

Note that I re-ran foamInstallationTest, and I now have a critical failure:

Environment_variable Set_to_file_or_directory                            Valid Path Crit
$FOAM_LIBBIN        ...M/OpenFOAM-1.7.x/lib/linux64GccDPOpt    yes  yes  yes
$FOAM_SITE_LIBBIN    ...nFOAM/site/1.7.x/lib/linux64GccDPOpt    no            no
$FOAM_USER_LIBBIN    ...enFOAM/dan-1.7.0/lib/linux64GccDPOpt  yes  yes  no
$MPI_ARCH_PATH      ...x/platforms/linux64Gcc/openmpi-1.4.1      no          yes

I would appreciate any help you could offer. I am not familiar with MPIs, but I have a feeling I need to make OF17x use the newer MPI. Just not sure how to do it.


wyldckat June 28, 2011 19:01

Greetings Dan,

You forgot to mention how exactly do you differentiate between OpenFOAM versions!?
My guess is that your "$HOME/.bashrc" currently looks something like this:

source $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc
source $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc

This is a big no-no ;) You should have something like this:

alias of17x='source $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc'
alias of20x='source $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc'

And whenever you start a new terminal, you must run the respective alias name. For example, to start up OpenFOAM 1.7.x environment, run:

OK, this only covers 50% of the problem. Now comes the other problem: whenever you launch a parallel run in OpenFOAM, you are probably simply using mpirun to launch it. Something like:

mpirun -np 4 simpleFoam -parallel
This only works because your $HOME/.bashrc file is sourced by all remote/parallel processes.
Now, since we are as of now relying on aliases, things will definitely not work, since there is no OpenFOAM environment available for them to use.

So, there are at least two solutions:
  • Run mpirun like this:

    mpirun -np 4 `which foamExec` simpleFoam -parallel
    Or like this:

    mpirun -np 4 $WM_PROJECT_DIR/bin/foamExec simpleFoam -parallel
  • Or use foamJob to launch the parallel run, like this:

    foamJob -p -s simpleFoam
    Want to know more options or about these, run:

    foamJob -help
Best regards,

dancfd June 28, 2011 21:29

Hi Bruno,

Thank you for your detailed response. I have set up my .bashrc with aliases for each instance of OF, and I have only called one instance in each terminal window. I also run the solver in parallel using a different command - I use "runParallel simpleFoam 2" as is done in the "Allrun" files in the tutorials.

I tried using the "mpirun" command, and using foamJob, and I received the same error as above in both instances.

Any other ideas?


wyldckat July 3, 2011 06:01

Hi Daniel,

I'm sorry, but so much got in the way that I forgot about your thread :(

The RunParallel function is only meant to be used in a single machine with a single installation, i.e. with the OpenFOAM environment activated automatically in ~/.bashrc.

This does look like something got damaged somewhere somehow, but further experimentation should be done.

OK, I've reviewed your first post and only now did something pop out to me, which you had already mentioned... so, to verify this, run with the 1.7.x environment active the following commands:

echo $WM_MPLIB

The last line should show you what exists in the installation folder of OpenMPI, if it exists at all.

If it doesn't find such folder, check if you have the folder "$WM_THIRD_PARTY_DIR/platforms/":

ls -l $WM_THIRD_PARTY_DIR/platforms/
And the contents therein. Check its sub-folders as well.

If you can't find something or nothing at all, then something got damaged along the way :(. Rebuilding OpenFOAM 1.7.x might be the safest bet.

Best regards and good luck!

dancfd July 12, 2011 21:37

Hi Bruno,

Thanks again for your response. I tried a few things, but still no luck. As it turns out, making the cases compatible with OF2 was not as demanding as I had anticipated, so I am now using OF2 without any further difficulty. Thanks for your help,


wyldckat July 13, 2011 16:03

Hi Daniel,

I'm glad you've got the hang of OF 2.0 :)

And I know this is a bit uncalled for, but this phrase comes to mind: OpenFOAM 2.0 rules, 1.7 drools :p

Have fun!

GerhardHolzinger February 17, 2012 05:21

Using multiple OF installations on one machine
Recently I installed OF2.0 and yesterday I installed OF 2.1.

As I was looking for information whether two different versions of OF can be run on a single machine I found this thread. The information above was very helpful.

I tried to alter the solution of wyldckat and it seems to work properly - but: no guarantee!

My ~/.bashrc looks like this:


source $HOME/OpenFOAM/OpenFOAM-2.1.x/etc/bashrc
alias of20x='source $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc'

I appended these two lines. Sourcing the bashrc file of OF2.1 as if OF2.1 was the only version of OF on my machine.
The alias defined, sources the bashrc file of OF2.0. When I want to use OF2.0 I open a new terminal an run of20x as first command.

This way I managed to run the cavity tutorial, using domain decomposition and running icoFoam in parallel, using OF2.0 in one tab and OF2.1 in another tab of my Gnome-terminal.

Note: All versions were installed from sources using the git-repository.

wyldckat February 17, 2012 05:57

Greetings Gerhard and welcome to the forum!

A word of warning: that method you are using only works because you have both installations of OpenFOAM on the same working area. If you were using 2.1.0 on "/opt" and 2.1.x on "$HOME/OpenFOAM", this would not work.

The advisable method is to use wmUNSET (available as of 2.0.0) to unload the current OpenFOAM version and then activate the proper version with the respective alias, such as of21x.

For more: Advanced tips for working with the OpenFOAM shell environment ;)

Best regards,

All times are GMT -4. The time now is 19:09.