43.3. Starting Parallel Ansys Fluent on a Windows System

You can run Ansys Fluent on a Windows system using either the graphical user interface (for details, see Starting Parallel Ansys Fluent Using Fluent Launcher) or command line options (for details, see Starting Parallel Ansys Fluent on a Windows System Using Command Line Options).


Important:  See the separate installation instructions for more information about installing parallel Ansys Fluent for Windows. The startup instructions below assume that you have properly set up the necessary software, based on the appropriate installation instructions.


43.3.1. Starting Parallel Ansys Fluent on a Windows System Using Command Line Options

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 43.2: Supported Interconnects for the Windows Platform, Table 43.3: Available MPIs for Windows Platforms, and Table 43.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 (Intel MPI or, with more than 64 logical cores, Microsoft MPI) will be used. The use of the default MPI is recommended. The available MPIs for Windows are shown in Table 43.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 in offload mode to accelerate the Algebraic Multigrid (AMG) solver and/or the Discrete Ordinates (DO) radiation model calculations. 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 and/or Accelerating Discrete Ordinates (DO) Radiation Calculations 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 (Intel MPI or, with more than 64 logical cores, Microsoft 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.

The supported interconnects for dedicated parallel win64 Windows machines, the associated MPIs for them, and the corresponding syntax are listed in Table 43.2: Supported Interconnects for the Windows Platform - Table 43.4: Supported MPIs for Windows Architectures (Per Interconnect).

Table 43.2: Supported Interconnects for the Windows Platform

Platform Processor Architecture Interconnects
Windows64-bit win64 ethernet (default), infiniband

Table 43.3: Available MPIs for Windows Platforms

MPI Syntax (flag) Communication Library Notes
msmpi -mpi=msmpi Microsoft MPI (1), (2)
intel -mpi=intel Intel MPI (1), (3), (4)

(1) Used with Shared Memory Machine (SHM) where the memory is shared between the processors on a single machine.

(2) Used with a job scheduler to run on a Windows high performance computing server (HPC).

(3) Used with Distributed Memory Machine (DMM) where each processor has its own memory associated with it.

(4) By default, the Intel MPI may fail when mixing hardware for compute nodes. As a workaround, you can use the following environment setting:

I_MPI_PLATFORM none

Table 43.4: Supported MPIs for Windows Architectures (Per Interconnect)

Architecture Ethernet InfiniBand
win64 intel (default with less than 64 logical cores), msmpi (default with more than 64 logical cores) msmpi

43.3.1.1. Starting Parallel Ansys Fluent with the Microsoft Job Scheduler

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:  The Intel MPI (intel) is not supported with the Microsoft Job Scheduler.



Note:  When using Microsoft Job Scheduler, the best interconnect is automatically selected by MS-MPI.


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