- Timestamp:
- 04/13/17 14:24:08 (7 years ago)
- Location:
- XIOS/dev/branch_yushan/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/src/buffer_client.cpp
r1070 r1094 26 26 buffer[1] = new char[bufferSize]; 27 27 retBuffer = new CBufferOut(buffer[current], bufferSize); 28 info(10) << "CClientBuffer: allocated 2 x " << bufferSize << " bytes for server " << serverRank << " with a maximum of " << maxBufferedEvents << " buffered events" << endl;28 //info(10) << "CClientBuffer: allocated 2 x " << bufferSize << " bytes for server " << serverRank << " with a maximum of " << maxBufferedEvents << " buffered events" << endl; 29 29 } 30 30 -
XIOS/dev/branch_yushan/src/client.cpp
r1087 r1094 214 214 MPI_Intercomm_create(contextComm,0,CXios::globalComm,serverLeader,10+globalRank,&contextInterComm) ; 215 215 216 #pragma omp critical (_output)217 info(10)<<"Register new Context : "<<id<<endl ;216 //#pragma omp critical (_output) 217 //info(10)<<"Register new Context : "<<id<<endl ; 218 218 219 219 -
XIOS/dev/branch_yushan/src/context_client.cpp
r1081 r1094 324 324 for (itMap = itbMap; itMap != iteMap; ++itMap) 325 325 { 326 report(10) << " Memory report : Context <" << context->getId() << "> : client side : memory used for buffer of each connection to server" << endl327 << " +) To server with rank " << itMap->first << " : " << itMap->second << " bytes " << endl;326 //report(10) << " Memory report : Context <" << context->getId() << "> : client side : memory used for buffer of each connection to server" << endl 327 // << " +) To server with rank " << itMap->first << " : " << itMap->second << " bytes " << endl; 328 328 totalBuf += itMap->second; 329 329 } 330 report(0) << " Memory report : Context <" << context->getId() << "> : client side : total memory used for buffer " << totalBuf << " bytes" << endl;330 //report(0) << " Memory report : Context <" << context->getId() << "> : client side : total memory used for buffer " << totalBuf << " bytes" << endl; 331 331 332 332 releaseBuffers(); -
XIOS/dev/branch_yushan/src/context_server.cpp
r1070 r1094 221 221 { 222 222 finished=true; 223 info(20)<<"Server Side context <"<<context->getId()<<"> finalized"<<endl;223 //info(20)<<"Server Side context <"<<context->getId()<<"> finalized"<<endl; 224 224 std::map<int, StdSize>::const_iterator itbMap = mapBufferSize_.begin(), 225 225 iteMap = mapBufferSize_.end(), itMap; … … 227 227 for (itMap = itbMap; itMap != iteMap; ++itMap) 228 228 { 229 report(10)<< " Memory report : Context <"<<context->getId()<<"> : server side : memory used for buffer of each connection to client" << endl230 << " +) With client of rank " << itMap->first << " : " << itMap->second << " bytes " << endl;229 //report(10)<< " Memory report : Context <"<<context->getId()<<"> : server side : memory used for buffer of each connection to client" << endl 230 // << " +) With client of rank " << itMap->first << " : " << itMap->second << " bytes " << endl; 231 231 totalBuf += itMap->second; 232 232 } 233 233 context->finalize(); 234 report(0)<< " Memory report : Context <"<<context->getId()<<"> : server side : total memory used for buffer "<<totalBuf<<" bytes"<<endl;234 //report(0)<< " Memory report : Context <"<<context->getId()<<"> : server side : total memory used for buffer "<<totalBuf<<" bytes"<<endl; 235 235 } 236 236 else if (event.classId==CContext::GetType()) CContext::dispatchEvent(event); -
XIOS/dev/branch_yushan/src/group_factory.cpp
r1089 r1094 4 4 { 5 5 /// ////////////////////// Définitions ////////////////////// /// 6 StdString CGroupFactory::CurrContext("");6 StdString *CGroupFactory::CurrContext_ptr = new StdString; 7 7 StdString *CGroupFactory::CurrContext_ptr = new StdString; 8 8 9 9 void CGroupFactory::SetCurrentContextId(const StdString & context) 10 { 11 //CGroupFactory::CurrContext = context;12 *CGroupFactory::CurrContext_ptr = context;10 { 11 if(CGroupFactory::CurrContext_ptr == NULL ) CGroupFactory::CurrContext_ptr = new StdString; 12 CGroupFactory::CurrContext_ptr->assign(context); 13 13 } 14 14 15 15 StdString & CGroupFactory::GetCurrentContextId(void) 16 16 { 17 //return (CGroupFactory::CurrContext);18 17 return (*CGroupFactory::CurrContext_ptr); 19 18 } -
XIOS/dev/branch_yushan/src/group_factory.hpp
r1089 r1094 69 69 70 70 /// Propriétés statiques /// 71 //static StdString CurrContext;72 71 static StdString *CurrContext_ptr; 73 72 #pragma omp threadprivate(CurrContext_ptr) -
XIOS/dev/branch_yushan/src/object_factory.cpp
r1089 r1094 5 5 /// ////////////////////// Définitions ////////////////////// /// 6 6 7 //StdString CObjectFactory::CurrContext(""); 8 StdString *CObjectFactory::CurrContext_ptr = new StdString; 7 StdString *CObjectFactory::CurrContext_ptr = new StdString; 9 8 10 9 void CObjectFactory::SetCurrentContextId(const StdString & context) 11 { 12 //CObjectFactory::CurrContext = context;13 *CObjectFactory::CurrContext_ptr = context;10 { 11 if(CObjectFactory::CurrContext_ptr == NULL ) CObjectFactory::CurrContext_ptr = new StdString; 12 CObjectFactory::CurrContext_ptr->assign(context); 14 13 } 15 14 16 15 StdString & CObjectFactory::GetCurrentContextId(void) 17 16 { 18 //return (CObjectFactory::CurrContext); 19 return (*CObjectFactory::CurrContext_ptr); 17 return (*CObjectFactory::CurrContext_ptr); 20 18 } 21 19 -
XIOS/dev/branch_yushan/src/object_factory.hpp
r1089 r1094 59 59 60 60 /// Propriétés statiques /// 61 //static StdString CurrContext;62 61 static StdString *CurrContext_ptr; 63 62 #pragma omp threadprivate(CurrContext_ptr) -
XIOS/dev/branch_yushan/src/test/test_omp.f90
r1088 r1094 88 88 print*, "xios_context_initialize OK", rank, size 89 89 90 CALL xios_get_handle("test",ctx_hdl) 91 CALL xios_set_current_context(ctx_hdl) 92 93 94 CALL xios_get_calendar_type(calendar_type) 95 print*, "xios_get_calendar_type OK", rank, size 96 97 CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ; 98 CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj,type='curvilinear') 99 CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4) 100 CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat) 101 CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 102 print*, "test block OK", rank, size 103 104 CALL xios_get_handle("field_definition",fieldgroup_hdl) 105 CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B") 106 CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_B") 107 108 CALL xios_get_handle("output",file_hdl) 109 CALL xios_add_child(file_hdl,field_hdl) 110 CALL xios_set_attr(field_hdl,field_ref="field_A_zoom",name="field_C") 111 print*, "test block 2 OK", rank, size 112 113 ! dtime%second = 3600 114 ! CALL xios_set_timestep(dtime) 115 ! print*, "xios_set_timestep OK", rank, size 116 117 ! The calendar is created as soon as the calendar type is defined. This way 118 ! calendar operations can be used before the context definition is closed 119 ! CALL xios_get_time_origin(date) 120 ! PRINT *, "--> year length = ", xios_get_year_length_in_seconds(date%year) 121 ! PRINT *, "--> day length = ", xios_get_day_length_in_seconds() 122 ! CALL xios_date_convert_to_string(date, date_str) 123 ! PRINT *, "time_origin = ", date_str 124 ! PRINT *, "xios_date_get_second_of_year(time_origin) = ", xios_date_get_second_of_year(date) 125 ! PRINT *, "xios_date_get_day_of_year(time_origin) = ", xios_date_get_day_of_year(date) 126 ! PRINT *, "xios_date_get_fraction_of_year(time_origin) = ", xios_date_get_fraction_of_year(date) 127 ! PRINT *, "xios_date_get_second_of_day(time_origin) = ", xios_date_get_second_of_day(date) 128 ! PRINT *, "xios_date_get_fraction_of_day(time_origin) = ", xios_date_get_fraction_of_day(date) 129 ! dtime%timestep = 1 130 ! dtime = 0.5 * dtime 131 ! CALL xios_duration_convert_to_string(dtime, dtime_str) 132 ! PRINT *, "duration = ", dtime_str 133 ! date = date + 3 * (dtime + dtime) 134 ! CALL xios_date_convert_to_string(date, date_str) 135 ! PRINT *, "date = time_origin + 3 * (duration + duration) = ", date_str 136 ! PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date) 137 ! PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour) 138 90 ! CALL xios_get_handle("test",ctx_hdl) 91 ! CALL xios_set_current_context(ctx_hdl) 92 93 94 ! CALL xios_get_calendar_type(calendar_type) 95 ! print*, "xios_get_calendar_type OK", rank, size 96 97 ! CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ; 98 ! CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj,type='curvilinear') 99 ! CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4) 100 ! CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat) 101 ! CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 102 ! print*, "test block OK", rank, size 139 103 140 104 CALL xios_context_finalize() … … 142 106 143 107 !$omp master 144 call MPI_Barrier(comm)108 !call MPI_Barrier(comm) 145 109 CALL MPI_COMM_FREE(comm, ierr) 146 110 !$omp end master
Note: See TracChangeset
for help on using the changeset viewer.