Embarissingly parallel loop¶
Core functions for template
distribute_tasks(func_task, tasks, num_proc=1, is_distributed=False)¶
This function distributes the workload using the
mpi4pylibrary. It simply creates a pool of processes that allow to work on the tasks using shared or distributed memory.
We need to ensure that the number of processes is never larger as the number of tasks as otherwise the MPI implementation does not terminate properly.
This module contains the integration tests that all the individual units are combined and tested together.
Random test case.
This function sets up a random test case that differs depending on whether MPI capabilities are available or not.
Test a random request.
This test simply evaluates a random request. It automatically checks whether a distributed evaluation is an option.
Varying the number of processes.
This test evaluates the same request with different number of processes and ensures that the amount resources do not matter for the results.
Alternating between shared and distributed memory.
This test evaluates the same request using the
mpi4pylibrary and ensures that both yield the same result.