Running OpenFOAM from Platform LSF
Does anyone have any experience running OF from LSF? If so, could you share an example shell script to submit the job to bsub?
Many Thanks! |
Posting this in response to a PM from member Linse. Sorry if this info is posted elsewhere but maybe others will find it helpful.
The key is the LSF environment variable $LSB_HOSTS which is the lists of machines assigned for your job. Create two files e.g. "parjobscript" and the "runparjob" #script parjobscript rm machineFile for i in $LSB_HOSTS do echo $i >> machineFile done mpirun -n 20 --hostfile machineFile simpleFoam -parallel > foam.log #script runparjob bsub -q limit150 -n 20 -e error.%J.log -o output.%J.log < parjobscript The -n option in each of these files should be followed by the number of processors you want. In "runparjob" I'm submitting to the LSF scheduler using bsub, followed by the queue name (in this case limit150) and again the number of processors. The -e and -o options specify the error and log files respectively (using %J gives you the current job number). Executing "runparjob" should assign the assigned LSF machines to OpenFOAM. Hope this helps. James |
James, thank you very much for that information!
At the very least it points to ways how to solve the problems I have! |
Does anyone have any experience running OF from LSF with mpirun.lsf?
|
Hi
what is LSF? |
Greetings to all!
Quote:
Quote:
Best regards, Bruno |
Hi all,
I am now facing the same problem. Would anyone give me some help? With reference to James comment, I write the following script <<<<<<<<<<<<<snappyHexMesh.sh>>>>>>>>>>>>>> rm machineFile for i in $LSB_HOSTS do echo $i >> machineFile done mpirun -n 264 --hostfile machineFile snappyHexMesh -overwrite -parallel > foam.log <<<<<<<<<<<<<run_snappyHexMesh.sh>>>>>>>>>>>>>> bsub -q model_queue_high -n 264 -e error.%J.log -o output.%J.log < snappyHexMesh.sh But it turns out that it fails to run. Any comments are appreciated! Many Thanks! Regards, Dominic |
All times are GMT -4. The time now is 13:17. |