PartitionParticipants()

Provides a utility for setting the parallel algorithm, parallel partitioning fractions for each participant, and machine list information.

At least one participant must be defined for this command to be used. Use of this command is not recommended if participants are already running.


Note:
  • Distributed parallel processing is not supported for Windows systems.

  • An AEDT participant cannot be run in distributed parallel. It will run on one machine, regardless of the number of machines allocated by this command.


For more detailed information, see Parallel Processing for Coupling Participants.

Optional Keyword Arguments

AlgorithmName : string

Name of the partitioning algorithm.

Possible values:

  • SharedAllocateMachines: Participants share both machines and cores. (default value)

  • SharedAllocateCores: Participants share machines but not cores.

  • DistributedAllocateMachines: Participants minimally share cores and machines. (Linux only)

  • DistributedAllocateCores: Participants never share cores or machines. (Linux only)

  • Custom: Participants are assigned machines and cores based on the partitioning details provided by the PartitioningInfo argument. For details, see Applying Custom Participant Partitioning in the System Coupling User's Guide.

The default algorithm is generally the best choice, as it allows for each participant to take advantage of all the allocated resources. The other "allocate" algorithms are provided to handle situations where not enough resources are available to run the same machines. The custom algorithm allows you to partition participants in a way not offered by the other algorithms.


Note:  If running on a Windows system, ensure that you specify an algorithm with shared (as opposed to distributed) resource allocation.


For more detailed information, see Partitioning Algorithms.

NamesAndFractions : tuple list

List of tuples specifying the fractions of core count applied for each participant

Each tuple must have the ParticipantName value as its first item and the associated fraction as its second item. If this parameter is omitted, then cores will be allocated for all participants set in the data model.

For more detailed information, see Resource Allocation Fractions.

MachineList : dictionary list

List of dictionaries specifying the machines available for distributed run. Each dictionary must have:

  • machine-name as a key with the machine's name as its value

  • core-count as a key with the number of cores for that machine as its value


Note:  If running on a Windows system, ensure that you specify only the name of the local machine (localhost) and do not exceed the number of cores available on that machine.


Providing this argument will override any machine list information detected from the scheduler environment and any information provided by the -t or --cnf command-line arguments.

PartitioningInfo : dictionary

Dictionary specifying the machine resources assigned to each participant by the user.

Providing this argument sets AlgorithmName to Custom automatically and blocks other partitioning algorithms.

Each tuple pair in the dictionary must have:

  • participant name as a key

  • machineList as a value, where machineList is a list of dictionaries containing machine resources in the following format:

    [{'machine-name' : <machine-name-1 (str)>, 'core-count' : <core-count-1 (int)>}, {'machine-name' : <machine-name-2 (str)>, 'core-count' : <core-count-2 (int)>}, ... ]

The complete machine list can be obtained using the GetMachines() command.

Return Type

None

Examples

Example 47: Allocate cores for participants based on fraction specified for each participant

In this example, the SOLVER-1 participant gets 6 cores and the SOLVER-2 participant gets 14 cores allocated on machine host-1. No cores are shared between the participants.


>>>PartitionParticipants(
	AlgorithmName = 'DistributedAllocateCores',
	NamesAndFractions = [('SOLVER-1', 0.3),('SOLVER-2', 0.7)], 
	MachineList = [
		{'machine-name' : 'host1', 'core-count' : 10},
		{'machine-name' : 'host2', 'core-count' : 10}])


Example 48: Allocate resources for participants based on custom partitioning information

In this example, SOLVER-1 participant will run on machines host-1 and host-2 with 19 cores, and SOLVER-2 participant will run on machine host-3 with 8 cores.


>>> PartitionParticipants(
        PartitioningInfo={"SOLVER-1":[{'machine-name' : 'host-1', 'core-count' : 10},
                                      {'machine-name' : 'host-2', 'core-count' : 9}],
                          "SOLVER-2":[{'machine-name' : 'host-3', 'core-count' : 8}]})