Using Parallel Computing in iSMS

About parallel computing

Parallel computing can be activated in iSMS in order to speed up heavy computations.

Requirements

In order to use parallel computing you must have access to a multicore processor, GPU or a computer cluster. Most modern laptop and desktop computers have multicore processors. In MATLAB, you must additionally have the Parallel Computing Toolbox installed.

Functions supporting parallel computing

iSMS currently supports parallel computing for the following functionalities:

  • Optimization of 2D Gaussian point spread functions (PSFs) and traces derived thereof.

Activate parallel computing

This will activate parallel computing using a default cluster profile.

Select 'Performance->Memory->Use parallel computing whenever possible'. If you choose not to activate the workers immediately they will be opened automatically when the parallized computing starts. Otherwise select 'Performance->Memory->Open pool' to activate the workers now.
While trying to connect to the workers, the message board will display a message like 'Attempting to open pool...'. If the connection is successful, the message board will display a message like 'Starting parallel pool (parpool) using the 'local' profile ... connected to 2 workers.'. You can see the number of connected, active workers (cores) by navigating to 'Performance->Memory menu->Size of current pool: X'.

Setting up a cluster

If opening a pool of workers from within iSMS (using Performance->Memory->Open pool), iSMS will try to connect to the default cluster profile. The default cluster profile in MATLAB is the local multicore processor.

If you run iSMS in MATLAB, you can also use a non-default cluster. See more information on how to set up clusters in the MATLAB documentation here.

When a non-default cluster profile is set up, open the pool outside iSMS from the command window or set up the cluster profile as the default MATLAB cluster profile and open it from within iSMS. Make sure to tick 'Performance->Memory->Use parallel computing whenever possible' before running the computation.

Note that the compiled version of iSMS only supports the default local profile.

Comparison of speed with and without parallel computing

This example shows a timed comparison for calculating a 450 frame 2D Gaussian PSF trace in the TFM window of iSMS with and without parallel computing running on 2 cores.

Without parallel computing activated, the analysis took 16.66 s corresponding to 0.03703 s/frame.
Now, we activate parallel computing in the main window by navigating to 'Performance->Parallel computing' as described above. We have 2 local workers available (dual-core laptop).
Running the exact same analysis as above, now with parallel computing, this took us 10.18 s corresponding to 0.02262 s/frame. Not exactly a double increase as hoped for with two available cores - but close to. Machines with more cores will run even faster.