Setting Up a Parallel Multiple Run
Configuring a Project to Utilize Parallel Multiple Run
In computing, the acronym SPMD (or 'spim-D') stands for Single Program, Multiple Data, and is one of several computer architectures described in a classification called Flynn's taxonomy. It is a technique used to achieve data parallelism, where multiple instances of a simulation are run simultaneously on multiple processor cores, given different input, in order to obtain overall results quicker and more efficiently than if running them sequentially. In PSCAD, the SPMD technique is referred to more affectionately as a Parallel Multiple Run (PMR).
The PMR feature enables users to launch multiple simulation runs in parallel, based on a single case project, but providing different data to each parallel simulation task. Each simulation is run independently on its own, unique processor core. The default maximum number of cores that may be utilized simultaneously on a standard PSCAD certificate license is eight. This limit may be increased up to 1024 cores (64 in PSCAD v4.6 and earlier), made available by an upgrade to the certificate license. Please contact or Sales Desk for more details on increasing your maximum.
Processor cores involved in a PMR simulation may exist on different computers. See Cluster Launch System (CLS) for more details on setting up a multiple computer, parallel simulation.
PMR can be viewed as an upgrade to the existing sequential multiple run control of EMTDC, which utilizes the Multiple Run or Optimum Run components. Projects currently configured to use either of these components may be upgraded to use the PMR feature. An example is given below under Configuring a Project to Utilize Parallel Multiple Run. PSCAD also calculates a Multiple Run Output File once the PMR simulation is completed.
Setting up a PMR simulation is relatively straightforward:
First, add a new simulation set and add the case project you want use as a simulation. See Simulations and Simulation Sets for more details.
Once the simulation set is put together, edit the simulation options. As a quick and simple example: If you want to launch a PMR of seven simultaneous runs, then set both the Task Count and Maximum Volley to 7. When you next run the simulation set, seven instances of that simulation will be launched in parallel, utilizing the available, local processor cores.
To make use of the true power of PMR however, your case must be developed to utilize the rank number. The rank is a unique integer number assigned to each parallel run. The rank number is usually used as an input, constant signal to modify controller output, ensuring unique data in each parallel simulation. See Rank Number and Configuring a Project to Utilize Parallel Multiple Run below for more details on this.
The Rank Number, or simply Rank, is a unique integer number assigned to each parallel simulation instance that is part of a PMR volley (a batch of parallel simulations). For example, if there are 16 simulation instances in a volley (Maximum Volley equals 16) , then rank number 5 identifies the 5th parallel simulation instance. The rank number has two primary purposes: It is used to modify the input of each unique, parallel simulation task in the PMR volley, as well as for single trace identification when the simulation option Tracing is set to Enable Tracing (Single).
The rank number is primarily used to enforce uniqueness of control data in each simulation instance in a PMR volley, thereby creating a true Single Program, Multiple Data (SPMD) simulation. The rank number is generated within a simulation via the Rank Number component in the master library.
For more information on setting up your project to properly use Rank Number component, see Configuring a Project to Utilize Parallel Multiple Run below.
When a PMR simulation is launched, a single simulation can be identified to pass plotting data back to PSCAD for display. The rank number is used to identify that simulation instance. This may be set via the Simulation Options dialog, using the Tracing and Tracing Rank options.
Simulation Options Dialog |
In the example above, the Tracing Rank is set to 3, meaning that the 3rd simulation instance in the PMR volley will return the plotting waveforms to PSCAD. It is recommended that unless absolutely necessary, that the Tracing option should remain set to Disable Tracing, as the additional processing necessary to send simulation data back to display in graphs, is normally detrimental to the overall speed of the PMR simulation.
Configuration of your project to utilize PMR will of course, be unique to each project. Perhaps you are constructing a brand new project, or more likely you will want to upgrade an existing project, which uses the sequential Multiple Run component. In order to keep the explanation simple, we will present and example:
EXAMPLE:
This simple project has been constructed in an older version of PSCAD (prior to V5), which is setup to perform a sequential multiple run, varying the time of first breaker operation on a simple AC system.
Simple AC Network |
The Multiple Run component is configured to vary a time signal (called BT) from 0.2 s to 0.216 s, in increments of 0.000333 s. This results in a total of 50 sequential runs, this includes 49 runs plus an additional run that identifies the optimal run. It is also setup to record the source current (Ia) phase with the maximum magnitude.
Multiple Run Component Circuit |
Multiple Run Component Parameter Dialog |
To upgrade this project to utilize PMR, we simply will need to recreate the internal control inside the Multiple Run component, externally on the schematic canvas, in order to duplicate its behaviour. Using the Rank Number component as a control input to differentiate each parallel run, and to ensure a unique time signal BT. Also, you should of course disable the existing Multiple Run component, or remove it all together. In this example, there is a signal being recorded, so the Multiple Run Additional Recording component needs to be brought in to replace that function of the Multiple Run component.
Equivalent PMR Control Circuit |
And that is it: The project has been upgraded to use PMR.
Now all that is left is to set the project up to be launched from within a simulation set (if you have not done so already). See Setting Up a Parallel Multiple Run above for details.