Compute Canada

How do I set up and run a non-interactive Fluent batch job?

Please note: The FAQ pages at the HPCVL website are continuously being revised. Some pages might pertain to an older configuration of the system. Please let us know if you encounter problems or inaccuracies, and we will correct the entries.

In most cases, you will run Fluent in batch mode. Since you have to have access to Fluent outside of the HPCVL license, most interactive work can be done elsewhere, whereas the computationally intensive runs can be executed on a parallel machine.

For this, you have to set up a batch command file that consists of a sequence of commands that are issue to Fluent. To get an idea how such a batch command file looks, you can produce a journal file during an interactive session, and edit it later to eliminate unnecessary commands. Note that this needs to be done using the command line inside Fluent, not the menu buttons of the GUI. In fact, it is best to generate journal files in sessions that have been started with the -g option, i.e. that do not use the GUI at all.

The "Text User Interface" that has to be used for writing batch files is documented in Chapter 3 of the Fluent 6.3 documentation. In html format this can be found at /opt/fluent/Fluent.Inc/help/html/ug/node48.htm or in pdf format at /opt/fluent/Fluent.Inc/help/pdf/ug/chp3.pdf.  

You also can have a look at a simple example batch file here. The example file (let's call it "example.flin") will read in a case-file from the working directory directory, initialize the flow, and run a single iteration. It then writes out the data on a file fan_1.dat and exits. Note that everycommand has to be included in the batch command file, including the answer "yes" to the question if you really want to exit the program without saving the case file.

Once you have produced a working command file, you can test it by calling

fluent 3d -g -i example.flin

We have assumed you are running a three-dimensional solver in single precision. You will have to alter those entries in different cases. Make sure that the output file for the data (in this case,fan_1.dat) does not exist before you start the job, otherwise the system will query if you want to over-write it and the answer is not in your command file.

Once everything works you could submit this job into the background (using bash) by typing

fluent 3d -g -i example.flin > example.flout 2>&1 &

This would redirect standard output and standard error to example.flout.

Production jobs, especially parallel ones, are submitted on the Sun Fire systems via Grid Engine, which is the subject of the next question.