CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Problems with MPI implementation (http://www.cfd-online.com/Forums/openfoam-installation/96373-problems-mpi-implementation.html)

francesco_capuano January 20, 2012 10:49

Problems with MPI implementation
 
Hi everybody,

I'm having some problems running OpenFOAM v 2.1.0 in parallel mode. In particular, I need to update the PStream library to switch from OpenMPI to Intel MPI, which is actually installed on the cluster I'm using.

I have followed the instructions in

http://openfoamwiki.net/index.php/HowTo_Pstream

but they refer to old versions of OpenFOAM (v. 1.XXX) and I cannot figure out what's the problem.

Is there anyone who has successfully switched from OpenMPI to other MPI implementations?

wyldckat January 21, 2012 13:57

Greetings Francesco,

The wiki page isn't very out of date, the instructions there still apply to the latest versions of OpenFOAM... with a few minor adjustments...

Basically, there are 3 places that need attention (OpenFOAM version number is just a reference):
  1. "OpenFOAM-2.1.0/etc/bashrc" - check where it says:
    Code:

    #- MPI implementation:
    #    WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI
    #              | GAMMA | MPI | QSMPI
    export WM_MPLIB=OPENMPI

    Change "WM_MPLIB=OPENMPI" to "WM_MPLIB=INTELMPI"
  2. "OpenFOAM-2.1.0/etc/config/settings.sh" - search for the code that starts with:
    Code:

    # Communications library
    # ~~~~~~~~~~~~~~~~~~~~~~

    unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN

    case "$WM_MPLIB" in
    OPENMPI)

    Wait... you will find in 2.1.0 on this file, near the end, the entry for "INTELMPI)". It assumes that "MPI_ROOT" is properly defined before you source "OpenFOAM-2.1.0/etc/bashrc".
  3. "OpenFOAM-2.1.0/wmake/rules/linux64Gcc/mplibINTELMPI" - this is the rules file for the "INTELMPI" option.
And that's pretty much it!

Best regards,
Bruno

francesco_capuano January 21, 2012 15:57

Thanks Bruno for your quick and clear reply!

As soon as I get back to work I will try and let you know!

Regards,
Francesco

francesco_capuano January 24, 2012 04:06

Dear Bruno,

I get the following message:


Warning in /u2/capuanf/OpenFOAM/OpenFOAM-2.0.1/etc/config/settings.csh:
MPI_ROOT not a valid mpt installation directory.
Please set MPI_ROOT to the mpt installation directory.
(usually done by loading the mpt module)
MPI_ROOT currently set to '/dummy'

MPI_ROOT is not properly set! How can I fix this?

Problem solved! I just defined the MPI_ROOT variable properly in my .bashrc file and it worked!

Thanks in advance!

sandy September 19, 2012 05:21

Hi Francesco,

I met the same problem. Could you give a detailed list how to set the MPI_ROOT variable in .bashrc ?? Thanks

francesco_capuano September 19, 2012 11:09

Quote:

Originally Posted by sandy (Post 382505)
Hi Francesco,

I met the same problem. Could you give a detailed list how to set the MPI_ROOT variable in .bashrc ?? Thanks

Hi Sandy,

you can define the MPI_ROOT variable by adding the line

export MPI_ROOT=mpipath

at the end of the your .bashrc file. mpipath is the mpi installation path of your computer/cluster. You can either try to find it yourself or ask it to your cluster technician. Just to give you a clue, in my case the installation path is

/cm/shared/apps/intel/ics/impi/4.0.3.008/

In case you have further questions, please don't hesitate to ask.

Regards,
Francesco

mahdiiowa January 15, 2013 20:46

MPI version and OpenFOAM 2.1
 
Hi FOAMERS
I am using OpenFOAM 2.1,and have LAM/MPI already installed (LAM 7.1.4/MPI 2 C++/ROMIO - Indiana University). When I am trying to rum icofoam on 3 processors I get this error

------------
It seems that [at least] one of the processes that was started with
mpirun did not invoke MPI_INIT before quitting (it is possible that
more than one process did not invoke MPI_INIT -- mpirun was only
notified of the first one, which was on node n0).

mpirun can *only* be used with MPI programs (i.e., programs that
invoke MPI_INIT and MPI_FINALIZE). You can use the "lamexec" program
to run non-MPI programs over the lambooted nodes.
------------
Any idea why i get this error?
I have already run some cases on parallel with OpenFOAM 1.7 and mpirun (Open MPI) 1.3.2. Can I used LAM/MPI instead of OpenMPI? If yes, is there a certain version of LAM/MPI which is compatible with OpenFOAM 2.1?

nimasam January 16, 2013 01:53

i dont know what the error is, but there is a suggestion in error line
Quote:

You can use the "lamexec" program
did you try this program?


All times are GMT -4. The time now is 10:13.