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

Run multiple cases simultaneously in parallel?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By mzzmrt
  • 1 Post By lebc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2020, 22:14
Default Run multiple cases simultaneously in parallel?
  #1
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
Hi FOAMers!

I have 16 cores available, and would like to run 4 different cases simultaneously, each on 4 cores. Is this possible? Is it as simple as simply running
Code:
mpirun -np 4 interFoam -parallel
or do I need to tell the system which 4 to use so that it's using all 16?
joshmccraney is offline   Reply With Quote

Old   April 17, 2020, 05:31
Default
  #2
Senior Member
 
Join Date: Mar 2014
Posts: 112
Rep Power: 12
mzzmrt is on a distinguished road
I guess you can. Just open four terminals run each case simultaneously.



Of course you have to partition the grids first for parallel processing.
mzzmrt is offline   Reply With Quote

Old   April 17, 2020, 18:50
Default
  #3
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
Quote:
Originally Posted by mzzmrt View Post
I guess you can. Just open four terminals run each case simultaneously.



Of course you have to partition the grids first for parallel processing.
So the computer is just smart enough to know not to reuse old cores?
joshmccraney is offline   Reply With Quote

Old   April 18, 2020, 04:26
Default
  #4
Senior Member
 
Join Date: Mar 2014
Posts: 112
Rep Power: 12
mzzmrt is on a distinguished road
I made a test and understood that my guess is wrong!
mzzmrt is offline   Reply With Quote

Old   April 19, 2020, 18:13
Default
  #5
Senior Member
 
Join Date: Mar 2014
Posts: 112
Rep Power: 12
mzzmrt is on a distinguished road
Well, just found the solution. An additional command "cpu-set" is needed:


mpirun -np 2 --cpu-set 0-3 pisoFoam -parallel (for assigning fist four cores)

mpirun -np 2 --cpu-set 4-7 pisoFoam -parallel (for assigning second four cores)
so on...
joshmccraney likes this.

Last edited by mzzmrt; April 20, 2020 at 04:14.
mzzmrt is offline   Reply With Quote

Old   April 20, 2020, 12:13
Default
  #6
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
You can also use the "--bind-to socket" or "--bind-to core" option, it works fine!
joshmccraney likes this.
lebc is offline   Reply With Quote

Reply


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
SimpleFoam cannot open include file Marija OpenFOAM Running, Solving & CFD 1 October 28, 2020 10:35
how to automatically run multiple cases in batch mode breezeyu STAR-CCM+ 1 June 11, 2018 06:45
Parallel run: bool ipstream::init attempt to run parallel on 1 processor SarahLee OpenFOAM Running, Solving & CFD 2 January 11, 2017 03:24
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
Change parameter and run cases parallel lingdeer ANSYS 0 July 29, 2011 10:27


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