CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

How to run OpenFoam using openMP.

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By mbeaudoin

Reply
 
LinkBack Thread Tools Display Modes
Old   June 4, 2013, 04:02
Default How to run OpenFoam using openMP.
  #1
New Member
 
Ravi Kanth B
Join Date: Jul 2010
Posts: 10
Rep Power: 7
bravikanth is on a distinguished road
Dear all,

I want to run the simpleFoam solver using OpenMP. Can anyone suggest me how i can run the solver and what environment variables i need to set in order to make the openmp run.

Thanks,

Ravi
bravikanth is offline   Reply With Quote

Old   June 4, 2013, 04:25
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
Parallelization in OpenFOAM is done with MPI, not OpenMP. If you really want to use OpenMP, youll have to write some code. If you just want to run in parallel, read the according section in the user guide to learn how to do so using MPI.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology

Last edited by akidess; June 4, 2013 at 04:26. Reason: added url to user guide
akidess is offline   Reply With Quote

Old   June 4, 2013, 06:21
Default
  #3
New Member
 
Ravi Kanth B
Join Date: Jul 2010
Posts: 10
Rep Power: 7
bravikanth is on a distinguished road
Thanks for your reply. I do not have any problem running the code in MPI. I just thought there should be something like setting up OMP_NUM_THREADS to 8 and i thought i can use mpirun.

But if it like what you are saying it is different. Do you have any idea on running using OpenMP.

Regards,
Ravi Kanth
bravikanth is offline   Reply With Quote

Old   June 4, 2013, 07:14
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,186
Rep Power: 16
immortality is on a distinguished road
hi whats the advantage of openMI to MPI that you want to use it?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 4, 2013, 07:38
Default
  #5
New Member
 
Ravi Kanth B
Join Date: Jul 2010
Posts: 10
Rep Power: 7
bravikanth is on a distinguished road
I want to compare the solver times / performance / drag values with DMP and also i am comparing against inhouse solvers / commercial solvers.

That is the main intention of running the openMP and MPI both on OpenFoam
bravikanth is offline   Reply With Quote

Old   June 4, 2013, 10:14
Default
  #6
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
mbeaudoin will become famous soon enough
You can find here a very very short description of the main differences between OpenMP and MPI (where OpenMPI is a flavor of MPI).

http://lists.apple.com/archives/mt-s.../msg00002.html

This text refers to SMP systems. Nowadays, you can assume that multi-cores computers are a kind of SMP system.

Martin
immortality likes this.
mbeaudoin is offline   Reply With Quote

Old   July 21, 2013, 07:21
Default openMP in openFoam
  #7
Member
 
Hassan
Join Date: Oct 2012
Location: Iran
Posts: 62
Rep Power: 4
luckycfd is on a distinguished road
Hi,
can you give me some idea for start to implementation the openMP protocol for parallelization the openFoam linear solver.
luckycfd is offline   Reply With Quote

Old   July 21, 2013, 16:04
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Hassan,

Since you asked me through the private message and since you asked here as well, I'll answer here what I can remember:
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 30, 2013, 08:01
Default
  #9
Member
 
Hassan
Join Date: Oct 2012
Location: Iran
Posts: 62
Rep Power: 4
luckycfd is on a distinguished road
thank you bruno
luckycfd is offline   Reply With Quote

Old   August 24, 2013, 19:09
Default
  #10
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
To help add information to this thread, I remembered this thread when I saw the PDF from this other post:
Quote:
Originally Posted by luckycfd View Post
According to the reference that it's address link is below, in page 53;
http://www.diva-portal.org/smash/get...T01.pdf‎
The document is titled "Hybrid Parallel Computation of OpenFOAM Solver on Multi-Core Cluster Systems", a Master of Science Thesis by Yuan Liu.
Quoting from the abstract:
Quote:
This thesis pick up the most used compressible reacting solver named
dieselFoam as the research target. Through the analysis of code struc-
ture in solver equation and native MPI implementation in OpenFOAM,
deploy two level parallelism structure on SMP cluster, which use Mes-
sage Passing Interface (MPI) between each SMP nodes and OpenMP
directives inside SMP node. The key idea is making use of feature of
threads parallelism, reduce unnecessary MPI communication overhead,
thereby achieve performance improvement.
Although the results seem a bit suspicious, because being able to cut down runtime by 25% in MPI vs OpenMP, seems awfully suspicious to me. 5-10% I would believe, but 25% is too much. But then again, I don't have evidence to back me up.
Wait... the test case has 168100 cells and it was subdivided into 8 sub-domains, which would explain the performance boost, since this would be 20 kcells vs the rule of thumb of 50 kcells for MPI. So this (in theory) gives the ability to improve scalability for low cell count in sub-domains, therefore allowing for more cores assigned for a case.
wyldckat is offline   Reply With Quote

Old   January 30, 2014, 08:46
Default openmp in openfoam
  #11
Member
 
Hassan
Join Date: Oct 2012
Location: Iran
Posts: 62
Rep Power: 4
luckycfd is on a distinguished road
Quote:
Originally Posted by bravikanth View Post
Dear all,

I want to run the simpleFoam solver using OpenMP. Can anyone suggest me how i can run the solver and what environment variables i need to set in order to make the openmp run.

Thanks,

Ravi
Hi,
for activate the openmp protocol in your openfoam projects, you must add the "-fopenm" flag into the Make/options file of your project.
regards
luckycfd is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about Paraview to show Parallel run of OpenFOAM padian OpenFOAM Post-Processing 12 August 20, 2014 03:45
ESI-OpenCFD Releases OpenFOAM v2.2.0 opencfd OpenFOAM Announcements from ESI-OpenCFD 13 March 30, 2013 17:52
2D Mesh Generation Tutorial for GMSH aeroslacker Open Source Meshers: Gmsh, Netgen, CGNS, ... 12 January 19, 2012 04:52
OpenFOAM Training in Europe and USA hjasak OpenFOAM 0 August 8, 2008 05:33
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25


All times are GMT -4. The time now is 05:20.