CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Running OpenFOAM from Platform LSF (https://www.cfd-online.com/Forums/openfoam-solving/81308-running-openfoam-platform-lsf.html)

phinallydone October 22, 2010 11:54

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!

jdiorio June 27, 2011 13:25

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

Linse June 28, 2011 09:30

James, thank you very much for that information!
At the very least it points to ways how to solve the problems I have!

ehsankf June 3, 2013 15:10

Does anyone have any experience running OF from LSF with mpirun.lsf?

immortality June 3, 2013 15:52

Hi
what is LSF?

wyldckat June 8, 2013 16:22

Greetings to all!

Quote:

Originally Posted by ehsankf (Post 431751)
Does anyone have any experience running OF from LSF with mpirun.lsf?

If you make a more specific question as to what problem you're having with LSF, it'll be easier for anyone to answer you. ;)

Quote:

Originally Posted by immortality (Post 431758)
Hi
what is LSF?

I'm not 100% certain, but I think it's this: http://en.wikipedia.org/wiki/Load_Sharing_Facility

Best regards,
Bruno

DominicTNC July 21, 2017 03:39

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.