CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Running OpenFOAM from Platform LSF (

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
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.


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

what is LSF?

wyldckat June 8, 2013 16:22

Greetings to all!


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. ;)


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

I'm not 100% certain, but I think it's this:

Best regards,

All times are GMT -4. The time now is 15:41.