Most SyncroSim models can be run in Multiprocessing mode.
When you run a Scenario in Multiprocessing mode the following sequence of steps is performed:
- The Scenario is split into several Multiprocessing jobs.
- All jobs are run to completion simultaneously.
- The output of each job is merged into a single Results Scenario.
The Multiprocessing Library System Datafeed (displayed by selecting Library Properties from the File menu) lets you enable Multiprocessing and configure all its options.
- Click Enable multiprocessing to enable Multiprocessing for the current Library.
- Click Run multiple scenarios in parallel to run the Multiprocessing jobs for multiple Scenarios at the same time.
- Set maximum number of allowed Multiprocessing jobs in the Maximum number of jobs text box.
For convenience, the Main Window Toolbar also has controls to configure some of these options.
To enable Multiprocessing using the Toolbar, click the word Multiprocessing. It will then be highlighted, as shown above, to indicate that Multiprocessing is enabled. You can also set the maximum number of allowed jobs using the entry field to the right of the word Multiprocessing.
A Note About Performance
The Multiprocessing feature is designed to allow you to run your models faster and save time. However, care should be taken when configuring the number of jobs to run.
Specifically, more jobs will not always run a Scenario faster because:
- The splitting and merging steps described above will always degrade the overall performance of a model run to some degree. Furthermore, splitting and merging performance is model dependent - some models have dozens of heavyweight inputs and outputs which can be very time consuming to split and merge.
- The speed at which a set of jobs can run is system dependent. Since each child job consumes memory and processing time, 20 jobs might run slowly on a computer with only 2 processors and 8 GB of memory available.
To achieve the best performance you should experiment with the number of jobs on a per-model basis, and perhaps even a per-Scenario basis. As a general rule, you may want to initially set the number of jobs to be one less than the computer's number of logical processors. Note that for most computers running Windows the number of logical processors is displayed under the Windows Task Manager.