|
[Sponsors] |
July 13, 2014, 23:27 |
How to specify machine in Allrun files
|
#1 |
New Member
Zhiwei Zheng
Join Date: May 2014
Posts: 23
Rep Power: 12 |
Hi all,
I want to run my case on a cluster, but something puzzles me. I know that if I want to run in parallel, I need to specify the machine name in a file name "machines" and run the case with the command such as "mpirun --hostfile <machines> -np <nProcs><foamExec> <otherArgs> -parallel". However if I want to use Allrun files to run the case, I don't know where to specify the machine name in the Allrun files. In the tutorials of OpenFOAM, I just find that the solver and core numbers are specified in the Allrun files. For example, "runParallel potentialFoam 8". Any help will be appreciated! |
|
May 15, 2018, 14:16 |
|
#2 |
New Member
Faraz
Join Date: Mar 2018
Posts: 25
Rep Power: 8 |
I have the same question. How do I modify the Allrun file to specify a hostfile? I believe the line is:
runParallel $decompDict $(getApplication) Would it be simply a matter of commenting that out and using: mpirun $decompDict -np 18 simpleFoam -parallel |
|
May 16, 2018, 05:19 |
|
#3 |
Member
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12 |
Hallo,
I am not sure if this helps, but I have discussed one such scenario in this thread. Regards, Ricky
__________________
If it is easy, then something is fishy! |
|
May 18, 2018, 16:29 |
|
#4 |
New Member
Faraz
Join Date: Mar 2018
Posts: 25
Rep Power: 8 |
I figured it out. Basically in the Allrun file I have to replace all the runParallel lines with mpirun:
#runParallel $decompDict snappyHexMesh -overwrite mpirun -np XX -hostfile ./machinefile snappyHexMesh -overwrite -parallel #runParallel $decompDict patchSummary mpirun -np XX -hostfile ./machinefile patchSummary -parallel #runParallel $decompDict potentialFoam mpirun -np XX -hostfile ./machinefile potentialFoam -parallel #runParallel $decompDict $(getApplication) mpirun -np XX -hostfile ./machinefile simpleFoam -parallel where XX is the total number of cpus on all the machines in the machinefile. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
general momentum source/hydraulic pressure jump/positive displacement machine | ckleanth | CFX | 10 | August 25, 2012 07:23 |
OpenFOAM15 paraFoam bug | koen | OpenFOAM Bugs | 19 | June 30, 2009 11:46 |
Monitor Files Missing | Forrest | FLUENT | 3 | March 24, 2009 17:11 |
Results saving in CFD | hawk | Main CFD Forum | 16 | July 21, 2005 21:51 |
PC vs. Workstation | Tim Franke | Main CFD Forum | 5 | September 29, 1999 16:01 |