Bridge++  Ver. 1.2.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
threadManager_OpenMP.cpp
Go to the documentation of this file.
1 
14 #include "threadManager_OpenMP.h"
15 
16 
17 #include "communicator.h"
18 #include "bridgeIO.h"
19 using Bridge::vout;
20 
21 // These are stub routine when OpenMP is not used.
22 // [11 Mar 2014 H.Matsufuru]
23 //====================================================================
24 // initialization of static member variables.
25 
29 
30 //====================================================================
31 void ThreadManager_OpenMP::init(int nthread)
32 {
34 
35  m_Nthread = 1;
36 
37  vout.general(m_vl, "ThreadManager_OpenMP being setup.\n");
38  vout.general(m_vl, " Number of thread = %d\n", m_Nthread);
39  vout.general(m_vl, " OpenMP is not used: stub implementation.\n");
40 }
41 
42 
43 //====================================================================
45 {
46  vout.paranoiac(m_vl, "Thread manager says good-bye.\n");
47 }
48 
49 
50 //====================================================================
52 {
53  return 1;
54 }
55 
56 
57 //====================================================================
59 {
60  return 0;
61 }
62 
63 
64 //====================================================================
66 {
67 }
68 
69 
70 //====================================================================
72 {
73 }
74 
75 
76 //====================================================================
78 {
80 }
81 
82 
83 //====================================================================
85  const int ith, const int nth)
86 {
88 }
89 
90 
91 //====================================================================
93  const std::string& classname)
94 { // do nothing.
95 }
96 
97 
98 //====================================================================
99 //============================================================END=====
static void barrier(const int nth)
barrier among threads inside a node.
static int m_Nthread
number of threads.
BridgeIO vout
Definition: bridgeIO.cpp:207
static int get_num_threads()
returns available number of threads.
void general(const char *format,...)
Definition: bridgeIO.cpp:38
static Bridge::VerboseLevel Vlevel()
static void wait()
barrier among threads inside a node.
static valarray< double > m_darray_reduction
static void reduce_sum_global(double &value, const int ith, const int nth)
global reduction with summation: value is assumed thread local.
static int get_thread_id()
returns thread id.
static void sync_barrier_all()
barrier among all the threads and nodes.
static void finalize()
finalization.
void paranoiac(const char *format,...)
Definition: bridgeIO.cpp:62
static void init(int nthread)
setup: called in main only once.
static Bridge::VerboseLevel m_vl
verbose level.
VerboseLevel
Definition: bridgeIO.h:25
static int reduce_sum(int count, double *recv_buf, double *send_buf, int pattern=0)
make a global sum of an array of double over the communicator. pattern specifies the dimensions to be...
static int sync()
synchronize within small world.
static void assert_single_thread(const std::string &classname)
assert currently running on single thread.