Embarissingly parallel loop¶
Core functions¶
Core functions for template
-
core_functions.
distribute_tasks
(func_task, tasks, num_proc=1, is_distributed=False)[source]¶ Distribute workload.
This function distributes the workload using the
multiprocessing
ormpi4py
library. It simply creates a pool of processes that allow to work on the tasks using shared or distributed memory.Notes
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.
Test integration¶
Integration tests.
This module contains the integration tests that all the individual units are combined and tested together.
-
test_integration.
get_random_request
()[source]¶ Random test case.
This function sets up a random test case that differs depending on whether MPI capabilities are available or not.
-
test_integration.
test_1
()[source]¶ Test a random request.
This test simply evaluates a random request. It automatically checks whether a distributed evaluation is an option.