3. Ansys CFX Hosts Specification

For distributed parallel operation, it is necessary to specify the hosts on which the Ansys CFX-Solver will run. Hosts may be predefined in the hosts.ccl configuration file, or be specified at the time of the run.

3.1. Predefinition of Hosts

For convenience, predefinition of hosts is recommended. However, in the following cases, hosts must be predefined:

  • If the installation location differs between hosts.

  • If any host name contains certain characters (e.g. underscores).

  • On Linux systems, if remote host interrogation is disabled.

In all other cases, host predefinition is not mandatory, although it is strongly recommended if:

  • The Ansys CFX-Solver is started from the CFX-Solver Manager because the user can then select from a list of available hosts.

  • Using hosts with different speeds.

3.2. Host Specification at Run Time from the CFX-Solver Manager

Instead of predefining hosts, the CFX-Solver Manager may be used to specify hosts on a per-run basis. More details are available in Selecting Parallel Hosts in the CFX-Solver Manager User's Guide.


Tip:  If an individual user wants to use a host that is not present in either the hostinfo.ccl in the installation config directory or the user’s own version of this file, then the user can add this host to the list for a particular run by using the CFX-Solver Manager. However, this would have to be done each time a run is started.


3.3. Host Specification at Run Time from the cfx5solve Command

If the Ansys CFX-Solver is run from the command line using the cfx5solve command, hosts do not necessarily need to be predefined. More details on using the cfx5solve command are available in Command-Line Use in the CFX-Solver Manager User's Guide.

For example, if all runs are launched using the cfx5solve command and the hostnames are known, predefinition of hosts is usually not necessary.

The same applies to a cluster environment, where all runs are launched via a queueing system and hosts are automatically specified by a script.

3.4. Remote Host Interrogation

Remote host interrogation is a mechanism that allows Ansys CFX to determine the details of remote hosts automatically. By default, it is enabled on Linux and disabled on Windows. In most cases, these defaults are sensible, however they may be overridden by setting the environment variable CFX_SOLVE_DISABLE_REMOTE_CHECKS as shown below:

Value of CFX_SOLVE_DISABLE_REMOTE_CHECKS

Result

0

Enable remote host interrogation (default on Linux)

1

Disable remote host interrogation (default on Windows)

This environment variable can be specified in your environment or your user cfx5rc.txt file or site cfx5rc.txt file. For details, see Resources Set in cfx5rc Files in the CFX Introduction.

If remote host interrogation is enabled, then remote- or secure-shell access must be available from the leader host (the system on which parallel runs will be started) to follower hosts (other systems on which the Ansys CFX-Solver will run). You must be able to execute an rsh or ssh command on the remote host without typing in your password. Remote host interrogation is not recommended on Windows unless your systems are already set up to allow this type of access.

On Windows systems, any hosts not predefined are assumed to have the same specification as the host on which the run is started, unless remote host interrogation is enabled.

On Linux systems, if remote host interrogation is disabled, all hosts must be predefined.

3.5. The hostinfo.ccl File

This file is a database containing information about the available hosts and where Ansys CFX has been installed on each of them. The file is used by the Ansys CFX-Solver when preparing a parallel run.

During installation, a default hostinfo.ccl file containing one entry for the local host is created in the <CFXROOT>/config/ directory of the Ansys CFX installation. This file must be readable by all users of the software.

The hostinfo.ccl file may be modified either by using the cfx5parhosts utility or by editing the hostinfo.ccl configuration file.

3.5.1. Editing the hostinfo.ccl File

This file is written using the CFX Command Language (CCL). It defines a set of HOST DEFINITION objects, one for each available node.

For example, on a Linux system:

SIMULATION CONTROL:
  EXECUTION CONTROL:
    PARALLEL HOST LIBRARY:  
      HOST DEFINITION: kangaroo   
        Installation Root = /ansys_inc/v%v/CFX  
      END  
      HOST DEFINITION:wallaby   
        Installation Root = /usr/local/cfx   
        Host Architecture String = linux-amd64
        Number of Processors = 16
        Relative Speed = 1.7  
      END  
      HOST DEFINITION: mypc   
        Remote Host Name = my_pc  
      END 
    END
  END
END

Or, on a Windows system:

SIMULATION CONTROL:
  EXECUTION CONTROL:
    PARALLEL HOST LIBRARY:
      HOST DEFINITION: hostname1
        Installation Root = C:\Program Files\ANSYS Inc\v%v\CFX
        Host Architecture String = winnt-amd64
      END
    END
  END
END

If you manually create your hostinfo.ccl file, you must ensure that the SIMULATION CONTROL...END wrapper is present.

None of the values for each host are mandatory, and the following empty host definition is perfectly valid:

HOST DEFINITION: parakeet
END

Host names are limited to the set of valid CCL object names. In particular, they must not contain full stops (.) or underscores (_) and must start with a letter.

If a hostinfo.ccl file does not already exist when Ansys CFX is installed, one will be created containing the installation host. You can add hosts to the hostinfo.ccl file using the cfx5parhosts utility, or by modifying the file using a text editor. Individual users may also create their own versions of this file in:

  • Linux: ~/.hostinfo.ccl

  • Windows: %HOMEDRIVE%\%HOMEPATH%\.hostinfo.ccl

which will be used in preference if it exists.

For most installations, it will be necessary to supply only the Installation Root parameter, which should point to the <CFXROOT> directory in which Ansys CFX is installed. On mixed architectures, you may find it useful to supply the Number of Processors and/or Relative Speed parameters. Some time may be saved at start-up by providing the Host Architecture String parameter explicitly, for example, using the cfx5parhosts utility.

The available parameters for the hostinfo.ccl file are as follows:

Installation Root

This is set to the <CFXROOT> installation directory on this host. If it is set to the special string none, this indicates that there is no Ansys CFX installation on the remote host, which can sometimes be useful if only the solver binary is available.

Host Architecture String

Ansys CFX will use this value to select the most appropriate solver executable for this node. These strings can be obtained by giving the command <CFXROOT>/bin/cfx5info -os on the node in question. When these short os values (for example, linux-amd64) are given in this position, the generic solver executable will always be used for this host. The string can also be set to the actual architecture of the remote host (for example, intel_xeon64.sse2_linux2.3.4), which is determined by giving the command <CFXROOT>/bin/cfx5info -arch. If these longer strings are used then CFX could use this information to select between solvers optimized for specific architectures. However, since there are currently no solvers optimized for specific architectures, this extra information is currently unused.

Number of Processors

As implied, this is the number of processors on the machine. It is used for display purposes only and can be safely omitted.

Relative Speed

The Relative Speed is a real number that is used by the Ansys CFX-Solver when partition sizes are calculated. The ratio of relative speeds of each host is used to determine the size of each partition. As an example, consider a parallel run involving two machines, one with a relative speed of 2.0 and the other with a relative speed of 1.0. The faster machine would work on a partition size twice as large as the slower machine in this case.

The numbers themselves are arbitrary; as a guide you may want to set 1.0 for a 1 GHz processor, 0.75 for a 750 MHz processor, and so on. If a relative speed entry is not entered, a default of 1.0 is assumed for that host.

You can obtain relative speed values using the cfx5parhosts utility.

Remote Host Name

To include hosts in the parallel run with names that contain, for example, underscore characters, you can add the Remote Host Name parameter to the HOST DEFINITION with the correct network name for the host and use a readable alias as the name of the object.

Solver Executable

A solver executable may be explicitly supplied, if necessary. This is usually only required when using Installation Root = none, and is recommended for advanced users only. The following substitutions are made on the string:

%rroot directory of the installation
%pparallel suffix for the executable
%vversion of Ansys CFX being run
%ooperating system string
%aarchitecture subdirectory specification; for example, linux/double

If it is not supplied, this parameter has the default value "%r/bin/%a/solver%p.exe".

3.5.2. Adding Hosts for Parallel Processing with the cfx5parhosts Utility

You can add new hosts to Ansys CFX's database for parallel runs using the cfx5parhosts utility:

CFXROOT\bin\cfx5parhosts argument list

where argument list corresponds to one or more of the arguments listed below:

ArgumentDescription
-add host[,host,...]

Add information about the named hosts to the file. This assumes that Ansys CFX is installed in the same directory on each listed host as on the host on which you are running.

<host> may be specified as [<user>@]<hostname>[:<Ansys CFX root>] if the username or the Ansys CFX installation root directory differs from the local host.

To add a set of separately installed Windows hosts to the hostinfo.ccl file, where the installation may be in a different place on each host, the recommended method is to gather the hostinfo.ccl files created on each host by the installation process, and merge them together using the -merge switch.

-add-slurm host[,host,...]

-add-uge host[,host,...]

Add information about the named SLURM or UGE host(s) to the file. Unless the -no-update option is specified, the system will be queried and the resulting job submission information added.

-benchmark

Runs a standard benchmark case, and fills in the Relative Speed for the local host.

-benchmark-parts

Number of partitions to use when benchmarking

-file file

Use the specified file as the hostinfo.ccl file.

-merge fileMerge host information from the named file.
-no-update After modifying the file, write back the information available without attempting to fill in any missing pieces.
-strict Used with -update. Normally, hosts that exist on the network but that cannot be connected to with rsh or ssh are included in the resulting file with a comment. This switch will exclude these hosts.
-system Use the system host file. This is the default.
-update

Updates the specified host information file. If any hosts do not have an architecture specified in the existing hostinfo.ccl file (for example, because it was added via the -add switch), it will connect to the host and query it to fill in the Host Architecture String parameter. This is the default behavior.

Note that if the Installation Root parameter is incorrect for the host, it will use the standard system commands to guess a generic architecture string. This can happen if you use -add to include a host with a different installation directory than the local one.

-user Use the per-user host file.

Note:  Command line help is available by providing the -h argument.