47#ifndef MADNESS_WORLD_THREAD_BINDING_H__INCLUDED
48#define MADNESS_WORLD_THREAD_BINDING_H__INCLUDED
89 std::shared_ptr<const std::string>
text;
109 "CPU binding over-subscribes the hardware threads", 1,
Wrapper around MPI_Comm. Has a shallow copy constructor; use Create(Get_group()) for deep copy.
Definition safempi.h:497
Base class for exceptions thrown in MADNESS.
Definition madness_exception.h:66
const char * function
Function where the exception occurred.
Definition madness_exception.h:72
const int line
Line number where the exception occurred.
Definition madness_exception.h:71
Thrown by check_thread_binding() when the CPU binding cannot support the thread pool.
Definition thread_binding.h:103
ThreadBindingException(std::string text, const int line, const char *function, const char *file)
Definition thread_binding.h:105
Defines madness::MadnessException for exception handling.
Definition potentialmanager.cc:41
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
std::string cpu_list_to_string(const std::vector< int > &cpus)
Render a list of cpu ids in compact form, e.g. {0,1,2,3,8} -> "0-3,8".
Definition thread_binding.cc:201
void check_thread_binding(const SafeMPI::Intracomm &comm, const int nthread_app)
Throw if the CPU binding cannot accommodate the thread pool.
Definition thread_binding.cc:251
ThreadBindingInfo get_thread_binding_info()
Query the CPU affinity mask and NUMA placement of the calling process.
Definition thread_binding.cc:220
static XNonlinearSolver< std::vector< Function< T, NDIM > >, T, vector_function_allocator< T, NDIM > > nonlinear_vector_solver(World &world, const long nvec)
Definition nonlinsol.h:371
Serializes calls to MPI in case it does not support THREAD_MULTIPLE.
Description of the CPU affinity of the calling process.
Definition thread_binding.h:64
int ncpu_configured
Number of logical CPUs configured on this host (not just allowed).
Definition thread_binding.h:75
std::size_t ncpu_allowed() const
Number of hardware threads this process may run on.
Definition thread_binding.h:78
std::vector< int > numa_nodes
Definition thread_binding.h:73
std::vector< int > cpus
Logical (hardware thread) ids this process is allowed to run on.
Definition thread_binding.h:70
bool available
Definition thread_binding.h:68
Owns the (long) diagnostic text of a ThreadBindingException.
Definition thread_binding.h:88
std::shared_ptr< const std::string > text
Definition thread_binding.h:89
ThreadBindingMessage(std::string t)
Definition thread_binding.h:90