CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[Other] Using different MPI types and versions with OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2018, 09:08
Default Using different MPI types and versions with OpenFOAM
  #1
Member
 
Join Date: Jan 2014
Posts: 32
Rep Power: 12
spaceprop is on a distinguished road
Hi,

I have a few questions I've been unable to find the answers to, or the answers were for very old versions of OpenFOAM. I know you can use different types and versions of MPI with OpenFOAM by changing some settings before compilation. The types include the OpenMPI that comes in the ThirdParty folder, MPICH, and Intel MPI. There are many different versions of these MPIs. In the past, I've used OpenFOAM with the default OpenMPI that comes with the ThirdParty folder, and with a previously installed version of OpenMPI.

Questions:
1. Why does OpenFOAM include an old version of OpenMPI? It's 1.5.X or something like that. The current OpenMPI version is 3.1.0.
2. Does OpenFOAM support newer versions of OpenMPI?
3. Are there any advantages/disadvantages to using a newer version of OpenMPI, e.g. 3.1.0? I know the major OpenMPI versions are not backwards compatible. I guess an advantage is that the newer OpenMPI's are probably better (faster?).
4. How difficult is it to use a different MPI, e.g. MPICH, with OpenFOAM? I saw in an old thread that in an older version of OpenFOAM you had to change about 6 settings and add a compilation file (or something like that) to get MPICH to work. Is there any documentation for how to do it with the latest OpenFOAMs?

Part of the reason I'm asking is because I'm building my own cluster with Infiniband. I have to build everything from source (I can't use the precompiled OpenFOAM because it's a cluster), and I'm trying to decide between using the OpenMPI that comes in the ThirdParty folder or the latest version.

Thanks!
spaceprop is offline   Reply With Quote

Old   May 18, 2018, 12:50
Default
  #2
Member
 
Join Date: Jan 2014
Posts: 32
Rep Power: 12
spaceprop is on a distinguished road
1. Still not sure about this.
2. OpenFOAM does support newer versions of OpenMPI. You can either compile it beforehand for the whole system and change the mpilib variable in the main openfoam bashrc to systemopenmpi, or put the untar'd folder in the ThirdParty folder and modify the config.sh script (in the OpenFOAM/etc folder) to point to that particular version, then the ThirdParty make file will make it with the ThirdParty Allwmake.
3. I couldn't find any disadvantages to using a newer version. In fact, I suggest it due to new features.
4. Intel and MPICH is similar to the answer to question 2, but I think there are a few more settings you have to modify.
spaceprop is offline   Reply With Quote

Old   May 28, 2018, 04:31
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by spaceprop View Post
Questions:
1. Why does OpenFOAM include an old version of OpenMPI? It's 1.5.X or something like that. The current OpenMPI version is 3.1.0.
2. Does OpenFOAM support newer versions of OpenMPI?
3. Are there any advantages/disadvantages to using a newer version of OpenMPI, e.g. 3.1.0? I know the major OpenMPI versions are not backwards compatible. I guess an advantage is that the newer OpenMPI's are probably better (faster?).
4. How difficult is it to use a different MPI, e.g. MPICH, with OpenFOAM? I saw in an old thread that in an older version of OpenFOAM you had to change about 6 settings and add a compilation file (or something like that) to get MPICH to work. Is there any documentation for how to do it with the latest OpenFOAMs?
The short answers: There is no reason not to use a newer openmpi, if it works for you and your system. In that past some odd problems have cropped up with newer openmpi versions and thus the version is very conservative (old). I've even hear of an odd issue caused only by a particular IB firmware version.

To get a different openmpi version, you would normally change two (or three) files. In etc/prefs.sh you define your WM_MPLIB=OPENMPI.

The openmpi version can be changed either by editing the etc/config.sh/mpi file, or by creating a new etc/config.sh/openmpi file with the entry (FOAM_MPI=openmpi-3.1.0) ...


Note that in both cases, these changes can also be made for a single user by creating the appropriate files in the ~/.OpenFOAM directory. See foamEtcFile -help, or foamEtcFile -list for more information about the directories searched.

/mark
olesen is offline   Reply With Quote

Reply

Tags
mpi, openfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM.com versus OpenFOAM.org: Which version to use? wyldckat OpenFOAM 19 March 25, 2023 08:50
Selectors in Foam Solvers and Data types associated mathartist OpenFOAM Programming & Development 0 June 12, 2018 05:38
Do different openfoam versions have different formats of the configuration files? suryansh OpenFOAM 1 May 30, 2016 12:47
Do different openfoam versions have different formats of the configuration files? suryansh OpenFOAM Running, Solving & CFD 0 May 30, 2016 11:14
OpenFOAM Foundation releases OpenFOAMŪ 3.0.0 CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 1 November 7, 2015 16:16


All times are GMT -4. The time now is 04:32.