MADNESS 0.10.1
test_foreign_threads.cc File Reference

Tasks submitted concurrently from threads the task backend did not create. More...

#include <madness/world/MADworld.h>
#include <atomic>
#include <barrier>
#include <cstdlib>
#include <filesystem>
#include <string>
#include <thread>
#include <unistd.h>
#include <vector>
Include dependency graph for test_foreign_threads.cc:

Functions

int main (int argc, char **argv)

Detailed Description

Tasks submitted concurrently from threads the task backend did not create.

The MADNESS comm thread and other runtimes' callback threads (e.g. CUDA host-function callbacks) submit tasks from outside the backend's thread pool. With the PaRSEC backend each such thread needs an execution stream. In builds with PaRSEC tracing (PARSEC_PROF_TRACE) the task profiler records every schedule call in that stream, so this test turns the profiler on.

Function Documentation

◆ main()