Unblocking parallelization

From SweepMe! Wiki
Jump to navigation Jump to search

Unblocking parallelization is a concept in which different operations, like triggering a measurement, asking for values and reading values, are called in separate functions of a driver. That way, all instruments contributing to a measurement point are first triggered and asked for their values. If one of the instruments needs more time to respond, other instruments can already process their queries. Finally, all instruments are read out in another function, and the overall time to get all values from all instruments is only limited by the instrument that needs the longest time to respond, not by the sum of the response times of all instruments.

In SweepMe!, each function of the Sequencer procedure is called for all modules of a branch before the next function is called. Drivers use the functions measure() to trigger a measurement, request_result() to ask for the values, and read_result() to read them. Split the communication across these functions only if the instrument supports it.