58 void finalize(
const bool )
override;
179 return omp_get_thread_num();
195 assert( omp_get_num_threads() == 1 );
204 assert( omp_get_num_threads() ==
static_cast< int >(
n_threads_ ) );
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Interface for kernel manager classes.
Definition manager_interface.h:46
Definition vp_manager.h:50
void assert_thread_parallel() const
Fails if NEST is not in thread-parallel section.
Definition vp_manager.h:200
size_t node_id_to_vp(const size_t node_id) const
Return a thread number for a given global node id.
Definition vp_manager_impl.h:43
void assert_single_threaded() const
Fails if NEST is in thread-parallel section.
Definition vp_manager.h:192
VPManager()
Definition vp_manager.cpp:40
size_t lid_to_node_id(const size_t lid) const
Returns the node ID of a given local index.
Definition vp_manager_impl.h:86
bool is_node_id_vp_local(const size_t node_id) const
Returns true if the given global node exists on this vp.
Definition vp_manager_impl.h:73
size_t get_num_threads() const
Get number of threads.
Definition vp_manager.h:186
virtual void set_status(const Dictionary &) override
Set the status of the manager.
Definition vp_manager.cpp:100
const bool force_singlethreading_
Definition vp_manager.h:171
size_t get_num_assigned_ranks_per_thread() const
Returns the number of processes that are taken care of by a single thread while processing MPI buffer...
Definition vp_manager_impl.h:93
size_t vp_to_thread(const size_t vp) const
Convert a given VP ID to the corresponding thread ID.
Definition vp_manager_impl.h:49
size_t thread_to_vp(const size_t tid) const
Convert a given thread ID to the corresponding VP ID.
Definition vp_manager_impl.h:67
AssignedRanks get_assigned_ranks(const size_t tid)
Returns assigned ranks per thread to fill MPI buffers.
Definition vp_manager_impl.h:121
size_t get_vp() const
Returns virtual process index.
Definition vp_manager_impl.h:37
size_t get_num_virtual_processes() const
Returns the number of virtual processes.
Definition vp_manager_impl.h:55
void finalize(const bool) override
Take down manager after operation.
Definition vp_manager.cpp:81
~VPManager() override
Definition vp_manager.h:53
size_t n_threads_
Number of threads per process.
Definition vp_manager.h:172
size_t get_thread_id() const
Gets ID of local thread.
Definition vp_manager.h:176
bool is_local_vp(const size_t tid) const
Return true, if the given VP is on the local machine.
Definition vp_manager_impl.h:61
virtual void get_status(Dictionary &) override
Retrieve the status of the manager.
Definition vp_manager.cpp:180
size_t get_start_rank_per_thread(const size_t tid) const
Definition vp_manager_impl.h:99
void set_num_threads(const size_t n_threads)
Set the number of threads by setting the internal variable n_threads_, the corresponding value in the...
Definition vp_manager.cpp:187
size_t node_id_to_lid(const size_t node_id) const
Returns thread local index of a given global node.
Definition vp_manager_impl.h:79
size_t get_end_rank_per_thread(const size_t rank_start, const size_t num_assigned_ranks_per_thread) const
Definition vp_manager_impl.h:105
size_t get_OMP_NUM_THREADS() const
Get OMP_NUM_THREADS environment variable.
Definition vp_manager.cpp:86
void initialize(const bool) override
Prepare manager for operation.
Definition vp_manager.cpp:51
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
Definition vp_manager.h:42
size_t end
Definition vp_manager.h:44
size_t size
Definition vp_manager.h:45
size_t max_size
Definition vp_manager.h:46
size_t begin
Definition vp_manager.h:43