- Timestamp:
- 03/15/17 17:17:30 (7 years ago)
- Location:
- XIOS/dev/branch_yushan
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/bld.cfg
r1072 r1073 36 36 #bld::target test_remap.exe 37 37 #bld::target test_new_features.exe test_unstruct_complete.exe 38 bld::target test_omp.exe #test_complete.exe test_client.exe38 bld::target test_omp.exe test_client.exe #test_complete.exe 39 39 bld::exe_dep 40 40 -
XIOS/dev/branch_yushan/extern/remap/src/clipper.cpp
r1072 r1073 52 52 53 53 static double const pi = 3.141592653589793238; 54 #pragma omp threadprivate(pi)55 54 56 55 static double const two_pi = pi *2; 57 #pragma omp threadprivate(two_pi)58 56 59 57 static double const def_arc_tolerance = 0.25; 60 #pragma omp threadprivate(def_arc_tolerance)61 58 62 59 enum Direction { dRightToLeft, dLeftToRight }; 63 60 64 61 static int const Unassigned = -1; //edge not currently 'owning' a solution 65 #pragma omp threadprivate(Unassigned)66 62 67 63 static int const Skip = -2; //edge that would otherwise close a path 68 #pragma omp threadprivate(Skip)69 64 70 65 #define HORIZONTAL (-1.0E+40) -
XIOS/dev/branch_yushan/extern/remap/src/clipper.hpp
r1072 r1073 73 73 typedef int cInt; 74 74 static cInt const loRange = 0x7FFF; 75 #pragma omp threadprivate(loRange)76 75 77 76 static cInt const hiRange = 0x7FFF; 78 #pragma omp threadprivate(hiRange)79 77 80 78 #else 81 79 typedef signed long long cInt; 82 80 static cInt const loRange = 0x3FFFFFFF; 83 #pragma omp threadprivate(loRange)84 81 85 82 static cInt const hiRange = 0x3FFFFFFFFFFFFFFFLL; 86 #pragma omp threadprivate(hiRange)87 83 88 84 typedef signed long long long64; //used by Int128 class -
XIOS/dev/branch_yushan/extern/remap/src/timerRemap.hpp
r1072 r1073 27 27 void print(void); 28 28 static map<string,CTimer*> allTimer; 29 //#pragma omp threadprivate(allTimer)30 29 31 30 static double getTime(void); -
XIOS/dev/branch_yushan/src/client.cpp
r1072 r1073 30 30 if (initialized) is_MPI_Initialized=true ; 31 31 else is_MPI_Initialized=false ; 32 33 32 34 33 35 // don't use OASIS … … 35 37 { 36 38 // localComm doesn't given 39 40 printf("check : localComm == MPI_COMM_NULL = %d\n", localComm == MPI_COMM_NULL); 41 37 42 if (localComm == MPI_COMM_NULL) 38 43 { … … 41 46 //MPI_Init(NULL, NULL); 42 47 int return_level; 48 #ifdef _intelmpi 43 49 MPI_Init_thread(NULL, NULL, 3, &return_level); 44 50 assert(return_level == 3); 51 #elif _openmpi 52 MPI_Init_thread(NULL, NULL, 2, &return_level); 53 assert(return_level == 2); 54 #endif 45 55 } 46 56 CTimer::get("XIOS").resume() ; … … 49 59 50 60 unsigned long hashClient=hashString(codeId) ; 51 unsigned long hashServer ; //=hashString(CXios::xiosCodeId) ;52 hashServer=hashString("xios.x") ;61 unsigned long hashServer=hashString(CXios::xiosCodeId) ; 62 //hashServer=hashString("xios.x") ; 53 63 unsigned long* hashAll ; 54 64 int size ; … … 56 66 int i,c ; 57 67 58 MPI_Comm_size(CXios::globalComm,&size) 68 MPI_Comm_size(CXios::globalComm,&size); 59 69 MPI_Comm_rank(CXios::globalComm,&rank); 70 71 printf("client init : codeId = %s, xiosCodeId = %s, rank = %d(%d), size = %d\n", codeId, CXios::xiosCodeId, rank, omp_get_thread_num(), size); 72 60 73 61 74 hashAll=new unsigned long[size] ; … … 198 211 199 212 MPI_Intercomm_create(contextComm,0,CXios::globalComm,serverLeader,10+globalRank,&contextInterComm) ; 200 info(10)<<"Register new Context : "<<id<<endl ;213 //info(10)<<"Register new Context : "<<id<<endl ; 201 214 202 215 -
XIOS/dev/branch_yushan/src/client.hpp
r1072 r1073 4 4 #include "xios_spl.hpp" 5 5 #include "mpi.hpp" 6 #ifdef _usingEP7 //#include "ep_declaration.hpp"8 #endif9 6 10 7 -
XIOS/dev/branch_yushan/src/cxios.cpp
r1072 r1073 22 22 bool CXios::isServer ; 23 23 MPI_Comm CXios::globalComm ; 24 // #pragma omp threadprivate(CXios::globalComm)25 26 24 bool CXios::usingOasis ; 27 25 bool CXios::usingServer = false; … … 37 35 { 38 36 set_new_handler(noMemory); 39 //#pragma omp critical(_output)40 37 #pragma omp master 41 38 { … … 97 94 98 95 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()]);96 MPI_Comm_rank(globalComm, &tmp_rank); 97 if(isClient) printf("client thread %d/%d\n", omp_get_thread_num(), tmp_rank); 98 if(isServer) printf("server thread %d/%d\n", omp_get_thread_num(), tmp_rank); 102 99 103 100 } … … 115 112 initialize() ; 116 113 117 114 115 118 116 CClient::initialize(codeId,localComm,returnComm) ; 117 118 119 119 if (CClient::getRank()==0) globalRegistry = new CRegistry(returnComm) ; 120 120 … … 123 123 isServer = !usingServer; 124 124 125 printf("CXios::initClientSide OK, printLogs2Files = %d\n", printLogs2Files); 125 126 126 127 if (printLogs2Files) -
XIOS/dev/branch_yushan/src/cxios.hpp
r1072 r1073 44 44 45 45 static bool isClient ; //!< Check if xios is client 46 //#pragma omp threadprivate(isClient)46 #pragma omp threadprivate(isClient) 47 47 48 48 static bool isServer ; //!< Check if xios is server 49 //#pragma omp threadprivate(isServer)49 #pragma omp threadprivate(isServer) 50 50 51 51 static MPI_Comm globalComm ; //!< Global communicator … … 56 56 57 57 static bool usingOasis ; //!< Using Oasis 58 //#pragma omp threadprivate(usingOasis)58 #pragma omp threadprivate(usingOasis) 59 59 60 60 static bool usingServer ; //!< Using server (server mode) 61 //#pragma omp threadprivate(usingServer)61 #pragma omp threadprivate(usingServer) 62 62 63 63 static double bufferSizeFactor; //!< Factor used to tune the buffer size 64 //#pragma omp threadprivate(bufferSizeFactor)64 #pragma omp threadprivate(bufferSizeFactor) 65 65 66 66 static const double defaultBufferSizeFactor; //!< Default factor value 67 //#pragma omp threadprivate(defaultBufferSizeFactor)67 #pragma omp threadprivate(defaultBufferSizeFactor) 68 68 69 69 static StdSize minBufferSize; //!< Minimum buffer size 70 //#pragma omp threadprivate(minBufferSize)70 #pragma omp threadprivate(minBufferSize) 71 71 72 72 static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible) 73 //#pragma omp threadprivate(isOptPerformance)73 #pragma omp threadprivate(isOptPerformance) 74 74 75 75 static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers 76 //#pragma omp threadprivate(globalRegistry)76 #pragma omp threadprivate(globalRegistry) 77 77 78 78 public: -
XIOS/dev/branch_yushan/src/test/test_client.f90
r1072 r1073 3 3 USE xios 4 4 USE mod_wait 5 use omp_lib6 5 IMPLICIT NONE 7 6 INCLUDE "mpif.h" … … 40 39 CALL MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr) 41 40 if(rank < 2) then 41 42 42 43 43 CALL xios_initialize(id,return_comm=comm) … … 45 45 CALL MPI_COMM_RANK(comm,rank,ierr) 46 46 CALL MPI_COMM_SIZE(comm,size,ierr) 47 47 48 48 49 DO j=1,nj_glo -
XIOS/dev/branch_yushan/src/xml_node.hpp
r1072 r1073 49 49 50 50 static StdString RootName; 51 //#pragma omp threadprivate(RootName)51 #pragma omp threadprivate(RootName) 52 52 53 53 }; //class CXMLParser -
XIOS/dev/branch_yushan/src/xml_parser.cpp
r1072 r1073 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());18 17 StdIFStream ifs ( filename.c_str() , StdIFStream::in ); 19 18 if ( (ifs.rdstate() & std::ifstream::failbit ) != 0 ) -
XIOS/dev/branch_yushan/src/xml_parser.hpp
r591 r1073 20 20 static void ParseString(const StdString & xmlContent); 21 21 static void ParseStream(StdIStream & stream, const string& fluxId, const std::set<StdString>& parseList); 22 22 23 template <class T> 23 24 static void ParseInclude(StdIStream & stream, const string& fluxId, T & object);
Note: See TracChangeset
for help on using the changeset viewer.