To start the parallel version of ANSYS Fluent using command line options, you can use the following syntax in a Command Prompt window:
fluent
version
-t
nprocs
[-gpgpu=
ngpgpus
]
[-p
interconnect
]
[-mpi=
mpi_type
]
[-cnf=
hosts
]
where
version must be replaced by the
version of ANSYS Fluent you want to run (2d, 3d, 2ddp, or 3ddp).
-t
nprocs specifies the number of processes
to use. When the -cnf option is present, the
hosts argument is used to determine which machines to use for the
parallel job. For example, if there are 8 machines listed in the hosts file and you want
to run a job with 4 processes, set nprocs to
4 (that is, -t4) and ANSYS Fluent will
use the first 4 machines listed in the hosts file. Note that this does not apply to the
Compute Cluster Server (CCS). If the -gpgpu option is used,
nprocs must be chosen such that the number of solver processes
per machine is equal on all machines.
-p
interconnect (optional) specifies the
type of interconnect. The ethernet interconnect is used by
default if the option is not explicitly specified. See Table 34.2: Supported Interconnects for the Windows Platform, Table 34.3: Available MPIs for Windows Platforms, and Table 34.4: Supported MPIs for Windows Architectures (Per Interconnect) for more information.
-mpi=
mpi_type (optional) specifies the MPI
implementation. If the option is not specified, the default MPI for the given
interconnect (IBM MPI) will be used (the use of the default MPI is recommended). The
available MPIs for Windows are shown in Table 34.3: Available MPIs for Windows Platforms.
-cnf=
hosts (optional) specifies the hosts
file, which contains a list of the machines on which you want to run the parallel job;
if this option is not used, then the session will run on the local machine. If the hosts
file is not located in the folder where you are typing the startup command, you must
supply the full pathname to the file.
You can use
a plain text editor such as Notepad to create the hosts file. The
only restriction on the filename is that there should be no spaces
in it. For example, hosts.txt is an acceptable
hosts file name, but my hosts.txt is not.
Your hosts file (for example, hosts.txt) might contain the following entries:
machine1 machine2
Important: The last entry must be followed by a blank line.
If a machine in the network is a multiprocessor, you can list it more than once. For example,
if machine1 has 2 CPUs, then, to take advantage of both CPUs
(and similarly for multicore machines), the hosts.txt file
should list machine1 twice:
machine1 machine1 machine2
By default, Fluent allocates ranks to machines in contiguous
blocks, where the block sizes are as equal as possible. You can control the per machine
block allocation size using the
machine
X
:
Y
convention in the hosts specification, where Y is the process block
count for
machine
X. The
process assignment will cycle through the machine list until all
processes are allocated in specified blocks. A fully round-robin
assignment of processes can be achieved by setting the machine block
allocation sizes to 1 (for example, machine1:1,
machine2:1, and so on).
-gpgpu=
ngpgpus specifies the number of
GPGPUs per machine to use for AMG execution. Note that when this option is used, the
number of solver process per machine must be equal on all machines and
ngpgpus must be chosen such that the number of solver processes
per machine is an integer multiple of ngpgpus. That is, for
nprocs solver processes running on M
machines using ngpgpus GPGPUS per machine:
See Using General Purpose Graphics Processing Units (GPGPUs) With the Algebraic Multigrid (AMG) Solver for more information about using GPGPU acceleration.
For example, the full command line to start a 3D parallel job on the first 4 machines listed
in a hosts file called hosts.txt is as follows:
fluent 3d -t4 -cnf=hosts.txt
As another example, the full command line to start a 3D symmetrical multiprocessing (SMP) parallel job on 4 machines is as follows:
fluent 3d -t4
In either case, the default communication library (IBM MPI), and the default interconnect
(automatically selected by the MPI used, or ethernet) will be used
since these options are not specified.
The first time that you try to run ANSYS Fluent in parallel, you will be prompted for information about the current Windows account. For more information about the IBM MPI setup, see the ANSYS Customer Portal (www.ansys.com/customerportal).
The supported interconnects for dedicated parallel win64 Windows machines, the associated MPIs for them,
and the corresponding syntax are listed in Table 34.2: Supported Interconnects for the Windows Platform - Table 34.4: Supported MPIs for Windows Architectures (Per Interconnect).
Table 34.2: Supported Interconnects for the Windows Platform
| Platform | Processor | Architecture | Interconnects |
|---|---|---|---|
| Windows | 64-bit |
win64 |
ethernet (default), infiniband, myrinet
|
Table 34.3: Available MPIs for Windows Platforms
| MPI | Syntax (flag) | Communication Library | Notes |
|---|---|---|---|
ibmmpi
|
-mpi=ibmmpi
| IBM MPI | (1), (2), (3) |
ms | -mpi=ms
| Microsoft MPI | (1)*, (2) |
intel | -mpi=intel
| Intel MPI | (1), (2), (4) |
(1) Used with Shared Memory Machine (SHM) where the memory is shared between the processors on a single machine.
* Ensure that Microsoft MPI is installed on the machine where the shared memory job will be running.
(2) Used with Distributed Memory Machine (DMM) where each processor has it’s own memory associated with it.
(3) IBM Platform MPI Community Edition is installed with Fluent, which is limited to 4096 processes without an additional license. Refer to IBM Platform MPI with High (>4096) Process Count for details.
(4) By default, Intel MPI does not support heterogeneous environments (that is, a mix of operating system versions or hardware) for Windows. As a workaround, you can use the following environment setting:
I_MPI_PLATFORM zero
Table 34.4: Supported MPIs for Windows Architectures (Per Interconnect)
| Architecture | Ethernet | Myrinet | Infiniband |
|---|---|---|---|
win64 |
ibmmpi (default), intel,
ms
| ms | ms |
The Microsoft Job Scheduler allows you to manage multiple jobs and tasks, allocate machine resources, send tasks to compute nodes, and monitor jobs, tasks, and compute nodes.
The Windows Server operating systems
include a compute cluster server (CCS) and a high performance computing
server (HPC) that combines the Microsoft MPI type (msmpi) with the Microsoft Job Scheduler. ANSYS Fluent provides a means of
using the Microsoft Job Scheduler using the following flag in the
parallel command:
-ccp head-node-name
where -ccp indicates the use of the compute cluster server package,
and head-node-name indicates the name of the head node of the machine
cluster.
For example, if you want to use the Microsoft Job Scheduler to run a 3D model on 2 nodes, the corresponding command syntax would be:
fluent 3d -t2 -ccp head-node-name
Important: Both the IBM MPI type (ibmmpi) and the Intel MPI
(intel) are not supported with the Microsoft Job
Scheduler.
Note: When using Microsoft Job Scheduler, the best interconnect is automatically selected by MS-MPI and the default Ethernet option does not apply.
Though the usage described previously is recommended as an initial starting point for running ANSYS Fluent with the Microsoft Job Scheduler, there are further options provided to meet your specific needs. ANSYS Fluent allows you to do any of the following with the Microsoft Job Scheduler:
Request resources from the Microsoft Job Scheduler first, before you launch ANSYS Fluent.
This is done by first submitting a job that will run until canceled, as shown in the following example:
job new/scheduler:
head-node-name /numprocessors:2 /rununtilcanceled:true
This example requests a 2-node resource on a cluster named head-node-name. You will see that a job is created with the job ID job-id:
job submit/scheduler:
head-node-name /id:
job-id
Then check if the resources have been allocated:
job view job-id /scheduler:
head-node-name
If the resources are ready, you can start ANSYS Fluent using the job ID:
fluent 3d -t2 -ccp head-node-name -jobid=
job-id
This job will be reusable until you decide to cancel it, at which point you must enter the following:
job cancel job-id /scheduler: head-node-name
Have ANSYS Fluent submit a CCS job, but delay the launching of ANSYS Fluent until the actual resources are allocated.
This is done by specifying the job ID as -1, as shown in the following example:
fluent
3d -t2 -ccp head-node-name -jobid=-1
If you want to stop the job application, click the Cancel button. ANSYS Fluent will prompt you for confirmation, and then clean up the pending job and exit.
Run your job using XML template files.
This is done by first creating an XML template file, such as shown in the following example:
<?xml version="1.0" encoding="utf-8"?>
<Job
xmlns:m:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m:xsd="http://www.w3.org/2001/XMLSchema"
SoftwareLicense=""
MaximumNumberOfProcessors="4"
MinimumNumberOfProcessors="4"
Runtime="Infinite"
IsExclusive="true"
Priority="Normal"
Name="Name_of_job"
Project="Fluent runs"
RunUntilCanceled="false">
<Tasks xmlns:m="http://www.microsoft.com/ComputeCluster/">
<Task
MaximumNumberOfProcessors="4"
MinimumNumberOfProcessors="4"
Depend=""
WorkDirectory="\\file-server\home\user"
Stdout="fluent-case.%CCP_JOBID%.out"
Stderr="fluent-case.%CCP_JOBID%.err"
Name="My Task"
CommandLine="\\head-node\fluent-sharename\win64\fluent.exe 3d -i bsi.jou -t4"
IsExclusive="true"
IsRerunnable="false"
Runtime="Infinite">
</Task>
</Tasks>
</Job>
where fluent-sharename is the name
of the shared directory pointing to where ANSYS Fluent is installed (for
example, C:\Program Files\ANSYS Inc\v182\fluent).
Important: Note that you must create a journal file that exits ANSYS Fluent at
the end of the run, and refer to it using the -i flag in your XML template file (bs1.jou in the previous example).
After you have saved the file and given it a name (for example, job1.xml), you can submit the job as shown:
job submit /jobfile:job1.xml
Run the job in batch mode without displaying the ANSYS Fluent graphical user interface.
The following is an example of such a batch mode job:
job submit /scheduler:
head-node-name
/numprocessors:2
/workdir:\\file-server\home\user\
\\head-node\fluent-sharename\ntbin\win64\fluent.exe 3d -t2 -i bs1.jou
where fluent-sharename is the
name of the shared directory pointing to where ANSYS Fluent is installed
(for example, C:\Program Files\ANSYS Inc\v182\fluent).
Note that you must create a journal file that exits ANSYS Fluent at
the end of the run, and refer to it using the -i flag in your batch mode job submission (bs1.jou in the previous example).
You can start ANSYS Fluent jobs from any machine on which is installed either the full CCP or the CCP client tools, but note that all the machines must have the same version installed.