Mantid
Loading...
Searching...
No Matches
Classes | Functions
ParallelTestHelpers Namespace Reference

Classes

class  ParallelRunner
 Runs a callable in parallel. More...
 

Functions

template<class T >
std::unique_ptr< T > create (const Mantid::Parallel::Communicator &comm)
 Create an initialized algorithm that does not store workspaces in the ADS. More...
 
template<class... Args>
void runParallel (Args &&...args)
 

Function Documentation

◆ create()

template<class T >
std::unique_ptr< T > ParallelTestHelpers::create ( const Mantid::Parallel::Communicator &  comm)

Create an initialized algorithm that does not store workspaces in the ADS.

This function is the recommended way to create algorithm for use with ParallelRunner since it avoids name clashes in the ADS from different ranks. This factory function is intended for unit tests that need to call algorithms in MPI tests. The communicator argument is obtained from ParallelTestHelpers::runParallel(). The algorithm is setup such that workspaces will not be stored in the ADS, i.e., it is not necessary to set OutputWorkspace properties, just like for child algorithms.

Definition at line 29 of file ParallelAlgorithmCreation.h.

◆ runParallel()

template<class... Args>
void ParallelTestHelpers::runParallel ( Args &&...  args)