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

Running a code in multi-core processor

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2014, 16:29
Default Running a code in multi-core processor
  #1
Member
 
Parisa
Join Date: Feb 2013
Posts: 51
Rep Power: 13
Parisa_Khiabani is on a distinguished road
Hi everyone,
I am using OpenFOAM 2.1.1.
I am wondering if I can run the cases in multi cores? My machine has 2 CPUs, each include 12 cores.
I really appreciate your support,

Parisa
Parisa_Khiabani is offline   Reply With Quote

Old   February 27, 2014, 17:10
Default
  #2
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Hi Parisa,

Briefly said, you need to decompose your case using the 'decomposePar' utility and start the job with e.g. (adjust the solver name to your own preference)
Code:
foamJob -p simpleFoam
Afterwards, you can reconstruct the solution with 'reconstructPar'. Have a look at the dambreak tutorial if you want to have an example:
http://www.openfoam.org/docs/user/da...hp#x7-500002.3

Cheers,

Lieven
Lieven is offline   Reply With Quote

Old   February 27, 2014, 18:12
Default
  #3
Member
 
Parisa
Join Date: Feb 2013
Posts: 51
Rep Power: 13
Parisa_Khiabani is on a distinguished road
Thanks for your help,
In the tutorial, it is decomposed for several CPUs. But I would lke to run in different cores. Is there any difference?
Parisa_Khiabani is offline   Reply With Quote

Old   February 28, 2014, 04:07
Default
  #4
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
There is no difference, since you select the number of processors. Using your terminlogoly:
you have 24 processors in total (2x12). You can select any number of processors between 1 and 23 to do the calculations. OpenFOAM will divide the work over the difference CPUs and cores automatically. But always test if your simulation effectively runs faster when increasing the number of cores. So don't blindly jump to 23 processors, test with 4, 8, 16 or so and check if the computation time decreases with increasing number of procs.

Just as a note, you shouldn't select all 24 processors since you need one for the operating system.

Cheers,

L
Lieven is offline   Reply With Quote

Old   May 6, 2014, 22:10
Default
  #5
Member
 
Niu
Join Date: Apr 2014
Posts: 55
Rep Power: 12
Z.Q. Niu is on a distinguished road
Hi Lieven,
Do you know how to run reconstructPar in parallel?
Z.Q. Niu is offline   Reply With Quote

Old   May 7, 2014, 04:30
Default
  #6
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Hi Z.Q. Niu,

As far as I know this is not possible...
Lieven 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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
decomposePar 4-core warning/error? Boloar OpenFOAM Bugs 23 April 8, 2014 08:57
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
Statically Compiling OpenFOAM Issues herzfeldd OpenFOAM Installation 21 January 6, 2009 09:38
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 10:37


All times are GMT -4. The time now is 21:12.