Fluent

Once the license and module have been set up correctly, Fluent can be run both in serial and in parallel.

Running Fluent in Serial mode

There are three ways in which to launch fluent in serial:

On the front end, running through an interactive shell, or via the batch queues. Note, when launching the Fluent GUI you must have an X-server running locally and have enabled X11 forwarding through your SSH client.

Launching on the front end

Once the fluent module is loaded, fluent can be run by entering its name at the command prompt. Please note that this method should not be used apart from for quick tests, i.e.:


$ fluent

Running interactively through the batch queues

To launch fluent in serial launch in an interactive shell, issue the following on the command line:



$ qrsh -cwd -V -l h_rt= -l h_vmem= fluent  -sgeup

In the above command, hh:mm:ss is the length of real-time the shell will exist for, vmem is the amount of memory required, dim is the dimension/precision of the fluent process (e.g. 2d for two dimension, single precision).

For example, to launch the fluent GUI on a back end node to for 3D double precision, issue:


$ qrsh -cwd -V -l h_rt=6:00:00 -l h_vmem=2G fluent 3ddp -sgeup

Running through the batch queues

When running through the batch queues, no interactive input is possible. It is possible to create a journal file which contains all of the commands that would normally be entered within fluent, e.g. file test.jou :


file/read-case test.cas
file/read-data test.dat
solve iter 4
/file/write-data test2.dat
y
/exit
y

It is then necessary to construct a script that will run fluent. The script begins with a request for resources and then the executable is run, e.g. file fluent.sh :


#!/bin/bash
# Export all variables and use current working directory
#$ -V -cwd
# Request three hours of runtime
#$ -l h_rt=3:00:00
#Launch the executable
fluent 3ddp -g -i test.jou

In this case, the 3-dimensional, double precision module is launched, however this can be interchanged with any other modules. The -g option will suppress the GUI and -i specifies the name of the input journal file. The file can be submitted to Sun Grid Engine by typing:


$ qsub fluent.sh

The above script assumes that the ansys module is loaded and license is defined. If desired, the module command can be loaded into the batch script (removing the -V ):


#!/bin/bash
# Use current working directory
#$ -cwd
# Request three hours of runtime
#$ -l h_rt=3:00:00
#Launch the executable
module add ansys/12.1
export LM_LICENSE_FILE=
fluent 3ddp -g -i test.jou -sgeup

Running in parallel

There are three ways of launching Fluent to work in parallel: interactively through an SGE shell, or through batch the batch queues.

Running via an interactive shell

To launch an interactive shell on many compute nodes type the following at the command prompt:


$ qrsh -cwd -V -l h_rt= -l h_vmem= -pe ib  fluent  -pib -sgeup

In the above commands hh:mm:ss is the length of real-time the shell will exist for and np is the number of processes requested. dim is the dimension/precision of the fluent process (e.g. 3ddp for 3-D double precision).

E.g. the to launch fluent for 6 hours on 16 processors:


$ qrsh -cwd -V -l h_rt=6:00:00 -pe ib 16 fluent 2d -pib -sgeup

Running a large mesh interactively

Occasionally, you will need to have interactive access to a large model that requires large amounts of memory and/or cores.
Whilst it might be possible to use a login node to do this for a short period of time, this is not a preferred option as the login nodes are a shared resource.

However, you can request an interactive session on the backend compute nodes to do this.

Remember that each compute node has 16 compute cores and 32GB memory. If you know that your model will require more memory than this, you will need to request multiple cores.

Running through the batch queues

Parallel execution via the batch queues is performed by combination of the techniques mentioned above. Firstly a journal file should be created to control the parallel run, without the aid of the GUI; file test_para.jou :


file/read-case test_para.cas
file/read-data test_para.dat
solve iter 4
/file/wirte-data test2_para.dat
y
/exit
y

Then a job submission script should be created, that requests resources and executes the code; e.g. file fluent_para.csh


#!/bin/bash
# use current working directory
#$ -cwd
# Request three hours of runtime
#$ -l h_rt=3:00:00
# Run on 32 processors
#$ -pe ib 32
#$ define license and load module
module add ansys/12.1
export LM_LICENSE_FILE=
#Launch the executable
fluent -g -i test_para.jou 3ddp -pib -sgeup

In this case, the 3-dimensional, double precision module is launched on 32 processors. The -g option will suppress the GUI and -i specifies the name of the input journal file. The file can be submitted to Sun Grid Engine by typing:


$ qsub fluent_para.csh

The job will be run once the requested resources become available.

Running Fluent v16 and above

When running Fluent v16 or above in parallel batch mode, additional parameters need to be added to the Fluent command line in the batch submission script.

Taking the script in the previous section as an example, the line:


fluent -g -i test_para.jou 3ddp -pib -sgeup

needs to be changed to:


fluent -g -i test_para.jou 3ddp -pib -sgeup -mpi=openmpi -rsh=ssh