Changeset 1072
- Timestamp:
- 03/14/17 19:12:25 (8 years ago)
- Location:
- XIOS/dev/branch_yushan
- Files:
-
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/bld.cfg
r1067 r1072 33 33 #bld::target libxios.a 34 34 #bld::target generate_fortran_interface.exe 35 bld::target xios_server.exe36 # test_remap.exe35 #bld::target xios_server.exe 36 #bld::target test_remap.exe 37 37 #bld::target test_new_features.exe test_unstruct_complete.exe 38 bld::target test_ client.exe test_complete.exe38 bld::target test_omp.exe #test_complete.exe test_client.exe 39 39 bld::exe_dep 40 40 … … 63 63 bld::excl_dep use::netcdf 64 64 bld::excl_dep inc::mpif.h 65 bld::excl_dep use::omp_lib -
XIOS/dev/branch_yushan/extern/remap/src/clipper.cpp
r919 r1072 52 52 53 53 static double const pi = 3.141592653589793238; 54 #pragma omp threadprivate(pi) 55 54 56 static double const two_pi = pi *2; 57 #pragma omp threadprivate(two_pi) 58 55 59 static double const def_arc_tolerance = 0.25; 60 #pragma omp threadprivate(def_arc_tolerance) 56 61 57 62 enum Direction { dRightToLeft, dLeftToRight }; 58 63 59 64 static int const Unassigned = -1; //edge not currently 'owning' a solution 65 #pragma omp threadprivate(Unassigned) 66 60 67 static int const Skip = -2; //edge that would otherwise close a path 68 #pragma omp threadprivate(Skip) 61 69 62 70 #define HORIZONTAL (-1.0E+40) -
XIOS/dev/branch_yushan/extern/remap/src/clipper.hpp
r688 r1072 73 73 typedef int cInt; 74 74 static cInt const loRange = 0x7FFF; 75 #pragma omp threadprivate(loRange) 76 75 77 static cInt const hiRange = 0x7FFF; 78 #pragma omp threadprivate(hiRange) 79 76 80 #else 77 81 typedef signed long long cInt; 78 82 static cInt const loRange = 0x3FFFFFFF; 83 #pragma omp threadprivate(loRange) 84 79 85 static cInt const hiRange = 0x3FFFFFFFFFFFFFFFLL; 86 #pragma omp threadprivate(hiRange) 87 80 88 typedef signed long long long64; //used by Int128 class 81 89 typedef unsigned long long ulong64; -
XIOS/dev/branch_yushan/extern/remap/src/inside.cpp
r688 r1072 11 11 12 12 static const double SNAP = 1e-11; 13 #pragma omp threadprivate(SNAP) 13 14 14 15 using namespace std; -
XIOS/dev/branch_yushan/extern/remap/src/parallel_tree.cpp
r923 r1072 16 16 17 17 static const int assignLevel = 2; 18 #pragma omp threadprivate(assignLevel) 18 19 19 20 // only the circle is packed, rest of node will be initialized on unpacking -
XIOS/dev/branch_yushan/extern/remap/src/timerRemap.hpp
r694 r1072 27 27 void print(void); 28 28 static map<string,CTimer*> allTimer; 29 //#pragma omp threadprivate(allTimer) 30 29 31 static double getTime(void); 30 32 static CTimer& get(string name); -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_fortran.cpp
r1069 r1072 19 19 fint = ::MPI_Comm_c2f(static_cast< ::MPI_Comm>(comm.mpi_comm)); 20 20 #endif 21 21 22 std::map<std::pair<int, int>, MPI_Comm > ::iterator it; 22 23 … … 50 51 else 51 52 { 52 MPI_Comm return_comm; 53 if(omp_get_thread_num() == 0) 53 54 #ifdef _openmpi 55 ::MPI_Comm base_comm = ::MPI_Comm_f2c(comm); 56 #elif _intelmpi 57 ::MPI_Comm base_comm = (::MPI_Comm)(comm); 58 #endif 59 60 if(base_comm != MPI_COMM_NULL_STD) 54 61 { 55 #ifdef _openmpi 56 ::MPI_Comm base_comm = ::MPI_Comm_f2c(comm); 57 #elif _intelmpi 58 ::MPI_Comm base_comm = (::MPI_Comm)(comm); 59 #endif 60 61 if(base_comm != MPI_COMM_NULL_STD) 62 if(omp_get_thread_num() == 0) 62 63 { 63 64 int num_ep = omp_get_num_threads(); … … 65 66 MPI_Info info; 66 67 MPI_Comm_create_endpoints(base_comm, num_ep, info, new_comm); 67 return_comm = new_comm[omp_get_thread_num()];68 passage = new_comm; 68 69 } 69 return MPI_COMM_NULL; 70 #pragma omp barrier 71 72 MPI_Comm return_comm = passage[omp_get_thread_num()]; 73 return return_comm; 74 70 75 } 76 return MPI_COMM_NULL; 71 77 72 73 return return_comm;74 78 } 75 79 } -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_intercomm_kernel.cpp
r1068 r1072 420 420 *newintercomm = iter->second[my_position]; 421 421 found = true; 422 tag_list.erase(iter);423 422 break; 424 423 } … … 428 427 429 428 MPI_Barrier_local(local_comm); 430 //if(is_proc_master)431 //{432 //for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++)433 //{434 //if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1])))435 //{436 //tag_list.erase(iter);437 //break;438 //}439 //}440 //}429 if(is_proc_master) 430 { 431 for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 432 { 433 if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 434 { 435 tag_list.erase(iter); 436 break; 437 } 438 } 439 } 441 440 442 441 int intercomm_ep_rank, intercomm_ep_rank_loc, intercomm_mpi_rank; … … 687 686 *newintercomm = iter->second[my_position]; 688 687 found = true; 688 // tag_list.erase(iter); 689 break; 690 } 691 } 692 } 693 } 694 695 MPI_Barrier_local(local_comm); 696 697 if(leader_rank_in_peer[0] < leader_rank_in_peer[1]) 698 { 699 for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 700 { 701 if((*iter).first == make_pair(tag_label[0], tag_label[1])) 702 { 689 703 tag_list.erase(iter); 690 704 break; 691 705 } 692 706 } 693 } 694 } 695 696 // if(leader_rank_in_peer[0] < leader_rank_in_peer[1]) 697 // { 698 // for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 699 // { 700 // if((*iter).first == make_pair(tag_label[0], tag_label[1])) 701 // { 702 // tag_list.erase(iter); 703 // } 704 // } 705 // } 707 } 706 708 707 709 -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_intercomm_world.cpp
r1067 r1072 417 417 418 418 found = true; 419 tag_list.erase(iter);419 //tag_list.erase(iter); 420 420 break; 421 421 } … … 426 426 MPI_Barrier_local(local_comm); 427 427 428 // if(is_proc_master) 429 // { 430 // for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 431 // { 432 // if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 433 // { 434 // tag_list.erase(iter); 435 // } 436 // } 437 // } 428 if(is_proc_master) 429 { 430 for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 431 { 432 if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 433 { 434 tag_list.erase(iter); 435 break; 436 } 437 } 438 } 438 439 439 440 … … 934 935 935 936 found = true; 936 tag_list.erase(iter);937 //tag_list.erase(iter); 937 938 break; 938 939 } … … 943 944 MPI_Barrier_local(local_comm); 944 945 945 // if(is_proc_master) 946 // { 947 // for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 948 // { 949 // if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 950 // { 951 // tag_list.erase(iter); 952 // } 953 // } 954 // } 946 if(is_proc_master) 947 { 948 for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 949 { 950 if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 951 { 952 tag_list.erase(iter); 953 break; 954 } 955 } 956 } 955 957 956 958 int intercomm_ep_rank, intercomm_ep_rank_loc, intercomm_mpi_rank; -
XIOS/dev/branch_yushan/src/attribute_map.hpp
r1037 r1072 69 69 /// Propriété statique /// 70 70 static CAttributeMap * Current; 71 //#pragma omp threadprivate (Current) 71 72 72 73 }; // class CAttributeMap -
XIOS/dev/branch_yushan/src/buffer_client.hpp
r1037 r1072 16 16 public: 17 17 static size_t maxRequestSize; 18 //#pragma omp threadprivate(maxRequestSize) 18 19 19 20 CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize maxBufferedEvents); -
XIOS/dev/branch_yushan/src/client.cpp
r1070 r1072 39 39 if (!is_MPI_Initialized) 40 40 { 41 MPI_Init(NULL, NULL); 41 //MPI_Init(NULL, NULL); 42 int return_level; 43 MPI_Init_thread(NULL, NULL, 3, &return_level); 44 assert(return_level == 3); 42 45 } 43 46 CTimer::get("XIOS").resume() ; … … 46 49 47 50 unsigned long hashClient=hashString(codeId) ; 48 unsigned long hashServer=hashString(CXios::xiosCodeId) ; 51 unsigned long hashServer; //=hashString(CXios::xiosCodeId) ; 52 hashServer=hashString("xios.x") ; 49 53 unsigned long* hashAll ; 50 54 int size ; … … 96 100 MPI_Comm_size(intraComm,&intraCommSize) ; 97 101 MPI_Comm_rank(intraComm,&intraCommRank) ; 98 info(50)<<"intercommCreate::client "<<rank<<" intraCommSize : "<<intraCommSize 99 <<" intraCommRank :"<<intraCommRank<<" serverLeader "<< serverLeader<<endl ; 102 #pragma omp critical(_output) 103 { 104 info(50)<<"intercommCreate::client "<<rank<<" intraCommSize : "<<intraCommSize 105 <<" intraCommRank :"<<intraCommRank<<" serverLeader "<< serverLeader<<endl ; 106 } 107 100 108 MPI_Intercomm_create(intraComm,0,CXios::globalComm,serverLeader,0,&interComm) ; 109 101 110 } 102 111 else … … 289 298 290 299 fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << getRank() << ext; 291 fb->open(fileNameClient.str().c_str(), std::ios::out); 292 if (!fb->is_open()) 293 ERROR("void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 294 << std::endl << "Can not open <" << fileNameClient << "> file to write the client log(s)."); 300 printf("getrank() = %d, file name = %s\n", getRank(), fileNameClient.str().c_str()); 301 #pragma omp critical(_output) 302 { 303 fb->open(fileNameClient.str().c_str(), std::ios::out); 304 if (!fb->is_open()) 305 ERROR("void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 306 << std::endl << "Can not open <" << fileNameClient << "> file to write the client log(s)."); 307 } 308 295 309 } 296 310 -
XIOS/dev/branch_yushan/src/client.hpp
r1053 r1072 19 19 20 20 static MPI_Comm intraComm; 21 #pragma omp threadprivate(intraComm) 22 21 23 static MPI_Comm interComm; 24 #pragma omp threadprivate(interComm) 25 22 26 static std::list<MPI_Comm> contextInterComms; 27 // #pragma omp threadprivate(contextInterComms) 28 23 29 static int serverLeader; 30 #pragma omp threadprivate(serverLeader) 31 24 32 static bool is_MPI_Initialized ; 33 #pragma omp threadprivate(is_MPI_Initialized) 25 34 26 35 //! Get rank of the current process … … 43 52 protected: 44 53 static int rank; 54 #pragma omp threadprivate(rank) 55 45 56 static StdOFStream m_infoStream; 57 #pragma omp threadprivate(m_infoStream) 58 46 59 static StdOFStream m_errorStream; 60 #pragma omp threadprivate(m_errorStream) 47 61 48 62 static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb); -
XIOS/dev/branch_yushan/src/cxios.cpp
r1070 r1072 22 22 bool CXios::isServer ; 23 23 MPI_Comm CXios::globalComm ; 24 // #pragma omp threadprivate(CXios::globalComm) 25 24 26 bool CXios::usingOasis ; 25 27 bool CXios::usingServer = false; … … 35 37 { 36 38 set_new_handler(noMemory); 37 parseFile(rootFile); 39 //#pragma omp critical(_output) 40 #pragma omp master 41 { 42 parseFile(rootFile); 43 } 38 44 parseXiosConfig(); 39 45 } … … 45 51 void CXios::parseXiosConfig() 46 52 { 53 47 54 usingOasis=getin<bool>("using_oasis",false) ; 48 55 usingServer=getin<bool>("using_server",false) ; … … 63 70 bufferSizeFactor = getin<double>("buffer_size_factor", defaultBufferSizeFactor); 64 71 minBufferSize = getin<int>("min_buffer_size", 1024 * sizeof(double)); 65 72 66 73 int num_ep; 67 if(isClient) 74 if(isClient) 68 75 { 69 num_ep = 1; 76 num_ep = omp_get_num_threads(); 77 printf("Client %d: num_ep = %d\n", omp_get_thread_num(), num_ep); 70 78 } 71 79 72 80 if(isServer) 73 81 { 74 num_ep = 1; 82 num_ep = omp_get_num_threads(); 83 printf("Server %d: num_ep = %d\n", omp_get_thread_num(), num_ep); 75 84 } 76 85 77 86 MPI_Info info; 78 MPI_Comm *ep_comm;79 if(omp_get_thread_num()==0)80 {87 #pragma omp master 88 { 89 MPI_Comm *ep_comm; 81 90 MPI_Comm_create_endpoints(MPI_COMM_WORLD, num_ep, info, ep_comm); // servers should reach here too. 82 91 passage = ep_comm; … … 86 95 87 96 globalComm = passage[omp_get_thread_num()]; 97 98 int tmp_rank; 99 MPI_Comm_rank(MPI_COMM_WORLD, &tmp_rank); 100 if(isClient) printf("client thread %d/%d, globalComm = %p\n", omp_get_thread_num(), tmp_rank, &passage[omp_get_thread_num()]); 101 if(isServer) printf("server thread %d/%d, globalComm = %p\n", omp_get_thread_num(), tmp_rank, &passage[omp_get_thread_num()]); 88 102 89 103 } -
XIOS/dev/branch_yushan/src/cxios.hpp
r1053 r1072 32 32 public: 33 33 static string rootFile ; //!< Configuration filename 34 //#pragma omp threadprivate(rootFile) 35 34 36 static string xiosCodeId ; //!< Identity for XIOS 37 //#pragma omp threadprivate(xiosCodeId) 38 35 39 static string clientFile; //!< Filename template for client 40 //#pragma omp threadprivate(clientFile) 41 36 42 static string serverFile; //!< Filename template for server 43 //#pragma omp threadprivate(serverFile) 37 44 38 45 static bool isClient ; //!< Check if xios is client 46 //#pragma omp threadprivate(isClient) 47 39 48 static bool isServer ; //!< Check if xios is server 49 //#pragma omp threadprivate(isServer) 40 50 41 51 static MPI_Comm globalComm ; //!< Global communicator 52 #pragma omp threadprivate(globalComm) 42 53 43 54 static bool printLogs2Files; //!< Printing out logs into files 55 //#pragma omp threadprivate(printLogs2Files) 56 44 57 static bool usingOasis ; //!< Using Oasis 58 //#pragma omp threadprivate(usingOasis) 59 45 60 static bool usingServer ; //!< Using server (server mode) 61 //#pragma omp threadprivate(usingServer) 62 46 63 static double bufferSizeFactor; //!< Factor used to tune the buffer size 64 //#pragma omp threadprivate(bufferSizeFactor) 65 47 66 static const double defaultBufferSizeFactor; //!< Default factor value 67 //#pragma omp threadprivate(defaultBufferSizeFactor) 68 48 69 static StdSize minBufferSize; //!< Minimum buffer size 70 //#pragma omp threadprivate(minBufferSize) 71 49 72 static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible) 73 //#pragma omp threadprivate(isOptPerformance) 74 50 75 static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers 76 //#pragma omp threadprivate(globalRegistry) 51 77 52 78 public: -
XIOS/dev/branch_yushan/src/event_client.hpp
r731 r1072 12 12 public: 13 13 static const size_t headerSize; 14 //#pragma omp threadprivate(headerSize) 14 15 15 16 CEventClient(int classId, int typeId); -
XIOS/dev/branch_yushan/src/filter/spatial_transform_filter.hpp
r1037 r1072 103 103 //! The allocated engines 104 104 static std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > engines; 105 // #pragma omp threadprivate(engines) 106 105 107 }; // class CSpatialTransformFilterEngine 106 108 } // namespace xios -
XIOS/dev/branch_yushan/src/indent.hpp
r501 r1072 10 10 public: 11 11 static int defaultIncSize; 12 //#pragma omp threadprivate(defaultIncSize) 13 12 14 static int index ; 15 //#pragma omp threadprivate(index) 16 13 17 int incSize ; 14 18 int offset ; -
XIOS/dev/branch_yushan/src/indent_xml.cpp
r501 r1072 15 15 { 16 16 static unsigned int LineNB = 1; 17 #pragma omp threadprivate(LineNB) 18 17 19 if (CIndent::WithLine) out << LineNB++ << ". "; 18 20 for(unsigned int i = 0; i < CIndent::Indent; out << CIndent::Increm , i++){} -
XIOS/dev/branch_yushan/src/indent_xml.hpp
r591 r1072 22 22 /// Propriétés statiques /// 23 23 static unsigned int Indent; 24 //#pragma omp threadprivate(Indent) 25 24 26 static StdString Increm; 27 //#pragma omp threadprivate(Increm) 28 25 29 static bool WithLine; 30 //#pragma omp threadprivate(WithLine) 26 31 27 32 }; // class CIndent -
XIOS/dev/branch_yushan/src/interface/c/icdata.cpp
r1070 r1072 71 71 else local_comm = MPI_COMM_NULL; 72 72 #endif 73 73 74 74 75 75 CXios::initClientSide(str, local_comm, return_comm); -
XIOS/dev/branch_yushan/src/io/netCdf_cf_constant.hpp
r782 r1072 16 16 static const StdString XIOS_CF_coordinates; 17 17 static const StdString XIOS_CF_bounds; 18 19 #pragma omp threadprivate(XIOS_CF_units, XIOS_CF_standard_name, XIOS_CF_coordinates, XIOS_CF_bounds) 18 20 }; 19 21 const StdString CCFKeywords::XIOS_CF_units("units"); … … 27 29 static const std::set<StdString> XIOS_CF_Longitude_units; 28 30 31 // #pragma omp threadprivate(XIOS_CF_Latitude_units, XIOS_CF_Longitude_units) 32 29 33 private: 30 34 CCFConvention(); -
XIOS/dev/branch_yushan/src/memtrack.cpp
r501 r1072 68 68 private: // static member variables 69 69 static BlockHeader *ourFirstNode; 70 //#pragma omp threadprivate(ourFirstNode) 70 71 71 72 private: // member variables … … 244 245 static const unsigned int SIGNATURE1 = 0xCAFEBABE; 245 246 static const unsigned int SIGNATURE2 = 0xFACEFACE; 247 248 //#pragma omp threadprivate(SIGNATURE1, SIGNATURE2) 246 249 247 250 private: // member variables -
XIOS/dev/branch_yushan/src/mpi.hpp
r1053 r1072 12 12 13 13 #ifdef _usingEP 14 #include <omp.h> 14 15 #include "../extern/src_ep_dev/ep_lib.hpp" 15 16 using namespace ep_lib; -
XIOS/dev/branch_yushan/src/node/axis.hpp
r927 r1072 167 167 static bool initializeTransformationMap(std::map<StdString, ETranformationType>& m); 168 168 static std::map<StdString, ETranformationType> transformationMapList_; 169 // #pragma omp threadprivate(transformationMapList_) 170 169 171 static bool dummyTransformationMapList_; 172 //#pragma omp threadprivate(dummyTransformationMapList_) 170 173 171 174 DECLARE_REF_FUNC(Axis,axis) -
XIOS/dev/branch_yushan/src/node/compute_connectivity_domain.hpp
r934 r1072 60 60 static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 63 62 64 }; // class CComputeConnectivityDomain 63 65 -
XIOS/dev/branch_yushan/src/node/context.hpp
r1053 r1072 209 209 // Context root 210 210 static shared_ptr<CContextGroup> root; 211 // #pragma omp threadprivate(root) 211 212 212 213 // Determine context on client or not -
XIOS/dev/branch_yushan/src/node/domain.hpp
r953 r1072 213 213 static std::map<StdString, ETranformationType> transformationMapList_; 214 214 static bool _dummyTransformationMapList; 215 //#pragma omp threadprivate(_dummyTransformationMapList) 215 216 216 217 DECLARE_REF_FUNC(Domain,domain) -
XIOS/dev/branch_yushan/src/node/expand_domain.hpp
r935 r1072 60 60 static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 63 62 64 }; // class CExpandDomain 63 65 -
XIOS/dev/branch_yushan/src/node/extract_axis_to_scalar.hpp
r960 r1072 60 60 static CTransformation<CScalar>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 62 63 }; // class CExtractAxisToScalar 63 64 -
XIOS/dev/branch_yushan/src/node/extract_domain_to_axis.hpp
r895 r1072 60 60 static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 62 63 }; // class CExtractDomainToAxis 63 64 -
XIOS/dev/branch_yushan/src/node/generate_rectilinear_domain.hpp
r836 r1072 60 60 static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 62 63 }; // class CGenerateRectilinearDomain 63 64 -
XIOS/dev/branch_yushan/src/node/interpolate_axis.hpp
r836 r1072 62 62 static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node); 63 63 static bool _dummyRegistered; 64 //#pragma omp threadprivate(_dummyRegistered) 65 64 66 }; // class CInterpolateAxis 65 67 -
XIOS/dev/branch_yushan/src/node/interpolate_domain.hpp
r1037 r1072 60 60 static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 62 63 }; // class CInterpolateDomain 63 64 -
XIOS/dev/branch_yushan/src/node/inverse_axis.hpp
r836 r1072 59 59 static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node); 60 60 static bool _dummyRegistered; 61 //#pragma omp threadprivate(_dummyRegistered) 61 62 62 63 }; // class CInverseAxis -
XIOS/dev/branch_yushan/src/node/reduce_axis_to_scalar.hpp
r888 r1072 59 59 static CTransformation<CScalar>* create(const StdString& id, xml::CXMLNode* node); 60 60 static bool _dummyRegistered; 61 //#pragma omp threadprivate(_dummyRegistered) 61 62 }; // class CReduceAxisToScalar 62 63 -
XIOS/dev/branch_yushan/src/node/reduce_domain_to_axis.hpp
r895 r1072 60 60 static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 62 63 }; // class CReduceDomainToAxis 63 64 -
XIOS/dev/branch_yushan/src/node/reduce_domain_to_scalar.hpp
r976 r1072 60 60 static CTransformation<CScalar>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 62 63 }; // class CReduceDomainToScalar 63 64 -
XIOS/dev/branch_yushan/src/node/scalar.hpp
r888 r1072 89 89 static std::map<StdString, ETranformationType> transformationMapList_; 90 90 static bool dummyTransformationMapList_; 91 //#pragma omp threadprivate(dummyTransformationMapList_) 91 92 92 93 -
XIOS/dev/branch_yushan/src/node/transformation.hpp
r934 r1072 35 35 typedef std::map<ETranformationType, CreateTransformationCallBack> CallBackMap; 36 36 static CallBackMap* transformationCreationCallBacks_; 37 //#pragma omp threadprivate(transformationCreationCallBacks_) 37 38 38 39 static bool registerTransformation(ETranformationType transType, CreateTransformationCallBack createFn); -
XIOS/dev/branch_yushan/src/node/zoom_axis.hpp
r836 r1072 60 60 static CTransformation<CAxis>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 62 63 }; // class CZoomAxis 63 64 -
XIOS/dev/branch_yushan/src/node/zoom_domain.hpp
r836 r1072 60 60 static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node); 61 61 static bool _dummyRegistered; 62 //#pragma omp threadprivate(_dummyRegistered) 63 62 64 }; // class CZoomDomain 63 65 -
XIOS/dev/branch_yushan/src/parse_expr/lex_parser.cpp
r1037 r1072 264 264 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 265 265 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 266 #pragma omp threadprivate(yy_buffer_stack_top, yy_buffer_stack_max, yy_buffer_stack) 266 267 267 268 /* We provide macros for accessing buffer states in case in the … … 283 284 static char yy_hold_char; 284 285 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ 286 #pragma omp threadprivate(yy_hold_char, yy_n_chars) 287 285 288 yy_size_t yyleng; 286 289 … … 289 292 static int yy_init = 0; /* whether we need to initialize */ 290 293 static int yy_start = 0; /* start state number */ 294 #pragma omp threadprivate(yy_c_buf_p, yy_init, yy_start) 291 295 292 296 /* Flag which is used to allow yywrap()'s to do buffer switches … … 294 298 */ 295 299 static int yy_did_buffer_switch_on_eof; 300 #pragma omp threadprivate(yy_did_buffer_switch_on_eof) 296 301 297 302 void yyrestart (FILE *input_file ); … … 982 987 983 988 } ; 989 #pragma omp threadprivate(yy_nxt) 984 990 985 991 static yy_state_type yy_get_previous_state (void ); … … 1025 1031 0, 0, 0, 0, 0 1026 1032 } ; 1033 1034 #pragma omp threadprivate(yy_accept, yy_last_accepting_state, yy_last_accepting_cpos, yy_NUL_trans) 1027 1035 1028 1036 extern int yy_flex_debug; -
XIOS/dev/branch_yushan/src/server.cpp
r1070 r1072 268 268 int flag = false ; 269 269 static void* buffer ; 270 #pragma omp threadprivate(buffer) 271 270 272 static MPI_Request request ; 273 #pragma omp threadprivate(request) 274 271 275 static bool recept=false ; 276 #pragma omp threadprivate(recept) 277 272 278 int rank ; 273 279 int count ; … … 364 370 int flag ; 365 371 static void* buffer ; 372 #pragma omp threadprivate(buffer) 373 366 374 static MPI_Request request ; 375 #pragma omp threadprivate(request) 376 367 377 static bool recept=false ; 378 #pragma omp threadprivate(recept) 379 368 380 int rank ; 369 381 int count ; -
XIOS/dev/branch_yushan/src/server.hpp
r1037 r1072 29 29 30 30 static MPI_Comm intraComm; 31 //#pragma omp threadprivate(intraComm) 32 31 33 static list<MPI_Comm> interComm; 34 //#pragma omp threadprivate(interComm) 35 32 36 static std::list<MPI_Comm> contextInterComms; 33 37 static CEventScheduler* eventScheduler; 38 //#pragma omp threadprivate(eventScheduler) 34 39 35 40 struct contextMessage … … 40 45 41 46 static bool isRoot; 47 //#pragma omp threadprivate(isRoot) 42 48 43 49 static map<string,CContext*> contextList; 44 50 static bool finished; 51 //#pragma omp threadprivate(finished) 52 45 53 static bool is_MPI_Initialized; 54 //#pragma omp threadprivate(is_MPI_Initialized) 46 55 47 56 public: … … 65 74 private: 66 75 static int rank; 76 //#pragma omp threadprivate(rank) 77 67 78 static StdOFStream m_infoStream; 79 //#pragma omp threadprivate(m_infoStream) 80 68 81 static StdOFStream m_errorStream; 82 //#pragma omp threadprivate(m_errorStream) 69 83 70 84 static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb); -
XIOS/dev/branch_yushan/src/test/test_client.f90
r1069 r1072 3 3 USE xios 4 4 USE mod_wait 5 use omp_lib 5 6 IMPLICIT NONE 6 7 INCLUDE "mpif.h" … … 32 33 INTEGER :: i,j,l,ts,n 33 34 34 !!! MPI Initialization 35 !!! MPI Initialization 35 36 36 37 CALL MPI_INIT(ierr) … … 44 45 CALL MPI_COMM_RANK(comm,rank,ierr) 45 46 CALL MPI_COMM_SIZE(comm,size,ierr) 46 47 47 48 48 DO j=1,nj_glo -
XIOS/dev/branch_yushan/src/transformation/Functions/reduction.hpp
r1037 r1072 59 59 typedef std::map<EReductionType, CreateOperationCallBack> CallBackMap; 60 60 static CallBackMap* reductionCreationCallBacks_; 61 #pragma omp threadprivate(reductionCreationCallBacks_) 61 62 62 63 static bool registerOperation(EReductionType reduceType, CreateOperationCallBack createFn); … … 66 67 static bool initReductionOperation(std::map<StdString,EReductionType>& m); 67 68 static bool _dummyInit; 69 #pragma omp threadprivate(_dummyInit) 68 70 }; 69 71 -
XIOS/dev/branch_yushan/src/transformation/grid_transformation_factory_impl.hpp
r933 r1072 57 57 typedef std::map<ETranformationType, CreateTransformationCallBack> CallBackMap; 58 58 static CallBackMap* transformationCreationCallBacks_; 59 #pragma omp threadprivate(transformationCreationCallBacks_) 60 59 61 static bool registerTransformation(ETranformationType transType, CreateTransformationCallBack createFn); 60 62 static bool unregisterTransformation(ETranformationType transType); 61 63 static bool initializeTransformation_; 64 #pragma omp threadprivate(initializeTransformation_) 62 65 }; 63 66 -
XIOS/dev/branch_yushan/src/xios_server.f90
r1063 r1072 4 4 IMPLICIT NONE 5 5 INCLUDE "mpif.h" 6 INTEGER :: ierr 6 INTEGER :: ierr, th_level 7 7 8 8 CALL MPI_INIT(ierr) 9 !CALL MPI_INIT_thread(3, th_level, ierr) 9 10 CALL init_wait 10 11 CALL xios_init_server -
XIOS/dev/branch_yushan/src/xml_node.hpp
r591 r1072 49 49 50 50 static StdString RootName; 51 //#pragma omp threadprivate(RootName) 51 52 52 53 }; //class CXMLParser -
XIOS/dev/branch_yushan/src/xml_parser.cpp
r1037 r1072 15 15 void CXMLParser::ParseFile(const StdString & filename, const std::set<StdString>& parseContextList) 16 16 { 17 //printf("thread %d, parsefile = %s\n", omp_get_thread_num(), filename.c_str()); 17 18 StdIFStream ifs ( filename.c_str() , StdIFStream::in ); 18 19 if ( (ifs.rdstate() & std::ifstream::failbit ) != 0 )
Note: See TracChangeset
for help on using the changeset viewer.