Get Services >  High Performance Computing >  Parallel Computing >  Serial/Parallel Computing of Fluent at LSF Batch Queues

The most efficient and convenient way to run Fluent solver for your CFD simulations, which need hours, days or weeks to finish, is to run the solver in LSF batch/parallel mode. First, you shall setup the CFD problem, including mesh, models, boundary conditions etc., on an interactive Fluent interface. Next save the initial problem to Fluent case and data file pair. Then you can choose a suitable batch queue to submit your case for computing.

Batch Serial Fluent Job

serial | parallel | monitor


Small or medium sized jobs, which may need about one hour or slightly longer to complete, are recommended submitting to run in serial-batch mode (on single CPU processor/core). The serial batch queues supported Fluent job include linux64, atlas4_large, atlas5_large and atlas4_128. The last three large queues are used for Fluent models requiring more than 8GB memory to run.
As an example, the following is the command used to submit a serial-batch Fluent job to queue linux64:

  bsub -q linux64 -o myjob.o "fluent 3d -g -i myjob_script"

where:

-q linux64
-o myjob.o
fluent 3d -g
-i myjob_script

define to submit Fluent job to queue linux64
specify the filename to keep the standard output message for the job
run Fluent 3D solver without graphics display (required for batch)
specify the Fluent command script file in text. The file contains the Fluent commands for the execution, you may use Unix text editor, such as vi, emacs or pico, to edit this file.


Here is an example of the script inside the file myjob_script (for steady-state case):

rcd test.cas
it 1000
wd test_1000.dat
exit
y

# read test.cas and test.dat into Fluent solver
# do 1000 iterations
# store (write data) the solution to test_1000.dat
# exit Fluent solver
# confirm the exit with "y" or "yes"


There have many ways to create/edit the text-based script file. To learn those ways, please check at the article on editing files on Linux from the HPC@NUS Issue No. 7 in 2005 March.

When the job is completed, you should find the final data file "test_1000.dat" at the working directory where you submitted the job. To do the post-processing and visualise the results, launch a Fluent interface interactively from the command line and read the case and data files into it to do the visualisation.
Here is another example of the script for unsteady flow simulation, or time-dependent flow:

/file/rcd myfile.cas
/file/autosave/data-frequency
100
/solve/set/time-step 6
/solve/dual-time-iterate
1000
20
wd mydata_new.dat
exit
y

# read myfile.cas and myfile.dat into Fluent solver
# define auto-save frequency of result data as per
100
iterations
# set time step as 6 seconds
# start to do iterations of
1000
iterations in total
20
sub-iterations within one time step
# store (write data) the final solution to mydata_new.dat
# exit Fluent solver
# confirm the exit with "y" or "yes"


When the job is completed, you should find 10 (=1000/100) sets of intermediate data file and the final data file "mydata_new.dat". You can use those data files to visualise the results

Using "fluent-job" Command

You can also use command "fluent-job" for batch serial Fluent job submission. Here is an example of the command:

fluent-job -s 3d -n 1 -i myjob_script


Take note that "fluent-job" will try to search and submit the job to a less busy LSF queue. The default job output file is "std-out.txt", and you can use a different file with option of "-o my_job.o". The script file should be created similarly as mentioned above.

Batch Parallel Fluent Job

serial | parallel | monitor


For long hour Fluent simulations, parallel computing with Fluent solver is encouraged. By running simulations on parallel model, or using multiple CPUs, the computing time will be shortened and hence improve the production. Fluent solver is well and ready parallelised using MPI and is able to run in parallel manner using multiple CPUs on all HPC clusters. The parallel queues supported Fluent solver include atlas3_parallel, atlas4_parallel, 4core_parallel and 8core_parallel.
To use parallel computing for a Fluent simulation, similarly as the serial-batch job process you need to setup your Fluent model first and save the model in Fluent case and data files. Initial debug and/or trial is necessary to ensure the model is properly defined.
At the same time, prepare the Fluent script file that is used for the job submission (same as above). To submit a parallel Fluent job, run command "fluent-job" and follow the 5 steps:

fluent-job 
1. Solver type [2d, 2ddp, 3d, 3ddp]: 3d <Enter> 2. Fluent Inputput/Script file Name: myjob_script <Enter> 3. Number of CPU [1,2,3, ..., 16] <Suggested num is 4>: <Enter> 4. Output file Name [e.g. std-out.txt]: <Enter>

1. SOLVER..................> 3d
2. Input File..............> run_0.5m
3. Num of CPU..............> 4
4. Stderr Output File......> std-output.txt
5. Run Queue...............> atlas4_parallel
Enter <1,2,3,4,5> to change the above inputs, or 
Enter <y,n> to submit/discard this job. <1,2,3,4,5,y,n,q(quit)>: Y <Enter>

There have two mandatory inputs for the parallel Fluent job: 1) the solver type and 2) the Fluent input script file. The solver type is related to your Fluent model, in either 3d or 2d. For Steps 3, 4 and 5, you can use the default settings (just press Enter to accept) which was tuned to choose the most suitable parameters and resources for the job for you. You can also input your own parameters for any specific reasons or purpose.
A summary of the batch job will be listed after all the necessary information is provided. Modifications to the batch job are allowed, or enter "Y" to confirm the job submission.
The post-processing is the same as mentioned above.

Job Monitor

serial | parallel | monitor


You can monitor the progress of your job with the following LSF commands:

bjobs

to list all your batch jobs

bjobs -l <jobid>

to list a particular batch jobs in detail

bjobs -p <jobid>

to find out the pending reason of job

bpeek <jobid>

to display the standard output of a particular job

bkill <jobid>

to terminate a particular job

Last Modified in April 2010. Copyright - All Rights Reserved.

 

top