Changeset 1102


Ignore:
Timestamp:
04/21/17 14:56:25 (4 years ago)
Author:
yushan
Message:

clean up

Location:
XIOS/dev/branch_yushan/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan/src/attribute_template_impl.hpp

    r1101 r1102  
    4040      { 
    4141         xios_map<StdString, CAttribute*>::iterator it; 
    42          printf("umap size = %lu, add = %p\n", umap.size(), &umap); 
     42         //printf("umap size = %lu, add = %p\n", umap.size(), &umap); 
    4343         it = umap.find(id); 
    4444         if(it == umap.end()) 
  • XIOS/dev/branch_yushan/src/client.cpp

    r1094 r1102  
    176176      MPI_Comm_rank(contextComm,&tmp_rank) ; 
    177177       
    178       #pragma omp critical (_output) 
    179       printf("Client %d : client.cpp Client::registerContext context add = %p\n", tmp_rank, &(*context)); 
     178      // #pragma omp critical (_output) 
     179      // printf("Client %d : client.cpp Client::registerContext context add = %p\n", tmp_rank, &(*context)); 
    180180       
    181181       
     
    225225        context->initClient(contextComm,contextInterComm) ; 
    226226         
    227         #pragma omp critical (_output) 
    228         printf("Client %d : context->initClient(contextComm,contextInterComm) OK \n", getRank()) ; 
     227        // #pragma omp critical (_output) 
     228        // printf("Client %d : context->initClient(contextComm,contextInterComm) OK \n", getRank()) ; 
    229229         
    230230        //contextInterComms->push_back(contextInterComm); 
  • XIOS/dev/branch_yushan/src/context_client.cpp

    r1094 r1102  
    7373        } 
    7474 
    75         printf("clientRank = %d (%p)\n", clientRank, &clientRank); 
     75        // printf("clientRank = %d (%p)\n", clientRank, &clientRank); 
    7676      } 
    7777 
  • XIOS/dev/branch_yushan/src/group_factory_impl.hpp

    r1101 r1102  
    7070      CObjectFactory::SetCurrentContextId 
    7171      (CGroupFactory::GetCurrentContextId()); 
    72       printf("SetCurrentContextId OK %d , %d, %s\n", id.size(), CGroupFactory::HasChild(group, id), id); 
     72      //printf("SetCurrentContextId OK %d , %d, %s\n", id.size(), CGroupFactory::HasChild(group, id), id); 
    7373      if (id.size() == 0) 
    7474      { 
    7575         boost::shared_ptr<typename U::RelChild> value = CObjectFactory::CreateObject<typename U::RelChild>(); 
    76          printf("boost::shared_ptr<typename U::RelChild> value OK\n"); 
     76         //printf("boost::shared_ptr<typename U::RelChild> value OK\n"); 
    7777         group->childList.insert(group->childList.end(), value.get()); 
    78          printf("group->childList.insert OK\n"); 
     78         //printf("group->childList.insert OK\n"); 
    7979         group->childMap.insert(std::make_pair(value->getId(), value.get())); 
    80          printf("group->childMap.insert OK\n"); 
     80         //printf("group->childMap.insert OK\n"); 
    8181         return (value); 
    8282      } 
     
    8989      { 
    9090         boost::shared_ptr<typename U::RelChild> value = CObjectFactory::CreateObject<typename U::RelChild>(id); 
    91          printf("shared_ptr OK\n"); 
     91         //printf("shared_ptr OK\n"); 
    9292         group->childList.insert(group->childList.end(), value.get()); 
    93          printf("childList.insert OK\n"); 
     93         //printf("childList.insert OK\n"); 
    9494         group->childMap.insert(std::make_pair(id, value.get())); 
    95          printf("childMap.insert OK\n"); 
     95         //printf("childMap.insert OK\n"); 
    9696         return (value); 
    9797      } 
  • XIOS/dev/branch_yushan/src/group_template_impl.hpp

    r1101 r1102  
    348348   U* CGroupTemplate<U, V, W>::createChild(const string& id)  
    349349  { 
    350     printf("U* CGroupTemplate<U, V, W>::createChild(const string& id) %p\n", this->getShared()); 
     350    //printf("U* CGroupTemplate<U, V, W>::createChild(const string& id) %p\n", this->getShared()); 
    351351    return CGroupFactory::CreateChild<V>(this->getShared(), id).get() ; 
    352352  } 
  • XIOS/dev/branch_yushan/src/interface/c/icfield.cpp

    r1101 r1102  
    3939      CTimer::get("XIOS").resume() ; 
    4040      *_ret = CField::get(id); 
    41       printf("cxios_field_handle_create\n"); 
     41      //printf("cxios_field_handle_create\n"); 
    4242      CTimer::get("XIOS").suspend() ; 
    4343   } 
     
    4949      CTimer::get("XIOS").resume() ; 
    5050      *_ret = CFieldGroup::get(id); 
    51       printf("cxios_fieldgroup_handle_create\n"); 
     51      //printf("cxios_fieldgroup_handle_create\n"); 
    5252      CTimer::get("XIOS").suspend() ; 
    5353   } 
  • XIOS/dev/branch_yushan/src/node/context.cpp

    r1087 r1102  
    254254     MPI_Barrier(intraComm); 
    255255 
    256      #pragma omp critical (_output) 
    257      printf("Client %d : context.cpp client = new CContextClient, client add = %p, clientRank = %d\n", tmp_rank, &(*client), client->clientRank) ; 
     256     // #pragma omp critical (_output) 
     257     // printf("Client %d : context.cpp client = new CContextClient, client add = %p, clientRank = %d\n", tmp_rank, &(*client), client->clientRank) ; 
    258258      
    259259     #pragma omp critical 
     
    263263     registryIn->setPath(getId()) ; 
    264264      
    265      #pragma omp critical (_output) 
    266      printf("Client %d : context.cpp registryIn->setPath, client add = %p, clientRank = %d\n", tmp_rank, &(*client), client->clientRank) ; 
     265     // #pragma omp critical (_output) 
     266     // printf("Client %d : context.cpp registryIn->setPath, client add = %p, clientRank = %d\n", tmp_rank, &(*client), client->clientRank) ; 
    267267 
    268268     if (client->clientRank==0) registryIn->fromFile("xios_registry.bin") ; 
  • XIOS/dev/branch_yushan/src/object_factory_impl.hpp

    r1101 r1102  
    123123      if(U::AllMapObj  == NULL) U::AllMapObj  = new xios_map<StdString, xios_map<StdString, boost::shared_ptr<U> > >; 
    124124 
    125       printf("so far so good : %d %d %d\n", CurrContext_ptr->empty(), CObjectFactory::HasObject<U>(id), id.empty()); 
     125      //printf("so far so good : %d %d %d\n", CurrContext_ptr->empty(), CObjectFactory::HasObject<U>(id), id.empty()); 
    126126       
    127127      if (CurrContext_ptr->empty()) 
     
    136136      { 
    137137         boost::shared_ptr<U> value(new U(id.empty() ? CObjectFactory::GenUId<U>() : id)); 
    138          printf("in CreateObject, value OK\n");   
     138         //printf("in CreateObject, value OK\n");   
    139139         (* U::AllVectObj)[*CObjectFactory::CurrContext_ptr].insert((*U::AllVectObj)[*CObjectFactory::CurrContext_ptr].end(), value); 
    140          printf("AllVectObj insert OK\n"); 
     140         //printf("AllVectObj insert OK\n"); 
    141141         (* U::AllMapObj) [*CObjectFactory::CurrContext_ptr].insert(std::make_pair(value->getId(), value)); 
    142          printf("AllMapObj insert OK\n"); 
     142         //printf("AllMapObj insert OK\n"); 
    143143 
    144144         return value; 
  • XIOS/dev/branch_yushan/src/test/test_omp.f90

    r1101 r1102  
    100100    CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat) 
    101101    CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 
    102     print*, "test block OK", rank, size 
     102!     print*, "test block OK", rank, size 
    103103 
    104 !     CALL xios_get_handle("field_definition",fieldgroup_hdl)  
    105 !     print*, "test block II get_handle OK", rank, size 
    106 !     CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B") 
    107 !     print*, "test block II add_child OK", rank, size 
    108 !     CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_B") 
    109 !     print*, "test block II set_attr OK", rank, size 
     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",name="field_C") 
    110111 
    111112    dtime%second = 3600 
     
    157158    print*, "xios_context_finalize OK", rank, size 
    158159 
    159     !$omp master 
     160    !$omp master  
    160161    !call MPI_Barrier(comm) 
    161162    CALL MPI_COMM_FREE(comm, ierr) 
     
    173174 
    174175  !$omp end parallel 
    175  
    176  
    177    
    178 !   CALL xios_context_initialize("test",comm) 
    179  
    180 !   CALL xios_get_handle("test",ctx_hdl) 
    181 !   CALL xios_set_current_context(ctx_hdl) 
    182    
    183    
    184 !   CALL xios_get_calendar_type(calendar_type) 
    185  
    186 !   CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ; 
    187 !   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') 
    188 !   CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4) 
    189 !   CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat) 
    190 !   CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 
    191  
    192 !   CALL xios_get_handle("field_definition",fieldgroup_hdl) 
    193 !   CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B") 
    194 !   CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_B") 
    195  
    196 !   CALL xios_get_handle("output",file_hdl) 
    197 !   CALL xios_add_child(file_hdl,field_hdl) 
    198 !   CALL xios_set_attr(field_hdl,field_ref="field_A_zoom",name="field_C") 
    199    
    200 !   dtime%second = 3600 
    201 !   CALL xios_set_timestep(dtime) 
    202  
    203 !   ! The calendar is created as soon as the calendar type is defined. This way 
    204 !   ! calendar operations can be used before the context definition is closed 
    205 !   CALL xios_get_time_origin(date) 
    206 !   PRINT *, "--> year length = ", xios_get_year_length_in_seconds(date%year) 
    207 !   PRINT *, "--> day length = ", xios_get_day_length_in_seconds() 
    208 !   CALL xios_date_convert_to_string(date, date_str) 
    209 !   PRINT *, "time_origin = ", date_str 
    210 !   PRINT *, "xios_date_get_second_of_year(time_origin) = ", xios_date_get_second_of_year(date) 
    211 !   PRINT *, "xios_date_get_day_of_year(time_origin) = ", xios_date_get_day_of_year(date) 
    212 !   PRINT *, "xios_date_get_fraction_of_year(time_origin) = ", xios_date_get_fraction_of_year(date) 
    213 !   PRINT *, "xios_date_get_second_of_day(time_origin) = ", xios_date_get_second_of_day(date) 
    214 !   PRINT *, "xios_date_get_fraction_of_day(time_origin) = ", xios_date_get_fraction_of_day(date) 
    215 !   dtime%timestep = 1 
    216 !   dtime = 0.5 * dtime 
    217 !   CALL xios_duration_convert_to_string(dtime, dtime_str) 
    218 !   PRINT *, "duration = ", dtime_str 
    219 !   date = date + 3 * (dtime + dtime) 
    220 !   CALL xios_date_convert_to_string(date, date_str) 
    221 !   PRINT *, "date = time_origin + 3 * (duration + duration) = ", date_str 
    222 !   PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date) 
    223 !   PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour) 
    224  
    225 !   ni=0 ; lonvalue(:,:)=0; 
    226 !   CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue_2D=lonvalue) 
    227 !   print *,"ni",ni 
    228 !   !print *,"lonvalue",lonvalue; 
    229  
    230 !   CALL xios_is_defined_field_attr("field_A",enabled=ok) 
    231 !   PRINT *,"field_A : attribute enabled is defined ? ",ok 
    232    
    233 !   CALL xios_close_context_definition() 
    234 !   print*, "xios_close_context_definition OK"   
    235  
    236 !   PRINT*,"field field_A is active ? ",xios_field_is_active("field_A") 
    237  
    238  
    239 !   call MPI_Barrier(comm, ierr) 
    240  
    241 !   !DO ts=1,24*10 
    242 !   DO ts=1,6 
    243 !     CALL xios_update_calendar(ts) 
    244 !     CALL xios_send_field("field_A",field_A) 
    245 !     CALL wait_us(5000) 
    246 !   ENDDO 
    247    
    248  
    249 !   CALL xios_context_finalize() 
    250  
    251 !   DEALLOCATE(lon, lat, field_A, lonvalue) 
    252176 
    253177 
Note: See TracChangeset for help on using the changeset viewer.