Changeset 1126


Ignore:
Timestamp:
05/05/17 11:37:18 (4 years ago)
Author:
yushan
Message:

test_complete OK with openmp. Missing : arithmetic filter

Location:
XIOS/dev/branch_yushan
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan/extern/src_ep_dev/ep_gatherv.cpp

    r1115 r1126  
    498498      int buffer_size = accumulate(recvcounts+ep_rank, recvcounts+ep_rank+num_ep, 0); 
    499499      local_gather_recvbuf = new void*[datasize*buffer_size]; 
    500       printf("buffersize = %d\n", buffer_size); 
    501500    } 
    502501 
  • XIOS/dev/branch_yushan/extern/src_ep_dev/ep_message.cpp

    r1110 r1126  
    220220    } 
    221221 
    222                 return MPI_SUCCESS; 
     222    return MPI_SUCCESS; 
    223223  } 
    224224 
  • XIOS/dev/branch_yushan/extern/src_ep_dev/ep_probe.cpp

    r1110 r1126  
    7474      Debug("calling MPI_Improbe MPI\n"); 
    7575 
    76         ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm>(comm.mpi_comm); 
    77         ::MPI_Status mpi_status; 
     76      ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm>(comm.mpi_comm); 
     77      ::MPI_Status mpi_status; 
    7878      ::MPI_Message mpi_message; 
    7979 
    80         #ifdef _openmpi 
     80      #ifdef _openmpi 
    8181      #pragma omp critical (_mpi_call) 
    8282      { 
     
    9898      message->ep_src = src; 
    9999      message->ep_tag = tag; 
    100         return 0; 
     100      return 0; 
    101101    } 
    102102 
  • XIOS/dev/branch_yushan/extern/src_ep_dev/ep_send.cpp

    r1053 r1126  
    316316 
    317317 
     318 
  • XIOS/dev/branch_yushan/inputs/COMPLETE/context_surface.xml

    r1058 r1126  
    66    <field id="field_A_srf"  name="field_A_srf" long_name="Champ en degC" operation="average" unit="degC" /> 
    77    <field id="field_A_srf_2" field_ref="field_A_srf" /> 
    8     <field id="field_A_srf_K" name="field_A_srf_K" field_ref="field_A_srf" long_name="Champ en degK" unit="degK"> field_A_srf + 273.15 </field> 
     8    <!-- field id="field_A_srf_K" name="field_A_srf_K" field_ref="field_A_srf" long_name="Champ en degK" unit="degK"> field_A_srf + 273.15 </field --> 
     9    <field id="field_A_srf_K" name="field_A_srf_K" field_ref="field_A_srf" long_name="Champ en degK" unit="degK">  </field> 
    910    <field id="field_A_srf_K_2" field_ref="field_A_srf_K" /> 
    1011    <field id="field_A_srf_max" name="field_A_srf_max" field_ref="field_A_srf" long_name="maximum field_A_srf" operation="maximum" /> 
     
    2223      <field field_ref="field_A_srf_K" /> 
    2324      <field field_ref="field_A_srf_K_2" name="field_A_srf_K_2" /> <!-- Should be identical to field_A_srf_K --> 
    24       <field field_ref="field_A_srf_K" name="field_A_srf_K_3">field_A_srf_K</field> <!-- Should be identical to field_A_srf_K --> 
    25       <field field_ref="field_A_srf_K_2" name="field_A_srf_K_max_mean" long_name="Maximum of hourly average over 6h" operation="maximum" freq_op="1h"> @field_A_srf_K </field> 
     25      <!--field field_ref="field_A_srf_K" name="field_A_srf_K_3">field_A_srf_K</field>  --> <!-- Should be identical to field_A_srf_K -->  
     26      <!--field field_ref="field_A_srf_K_2" name="field_A_srf_K_max_mean" long_name="Maximum of hourly average over 6h" operation="maximum" freq_op="1h"> @field_A_srf_K </field> --> 
    2627      <field field_ref="field_A_srf" name="field_A_srf_min" operation="minimum" /> 
    2728      <field field_ref="field_A_srf_2" name="field_A_srf_min_2" operation="minimum" /> <!-- Should be identical to field_A_srf_min --> 
    2829      <field field_ref="field_A_srf" name="field_A_srf_max" operation="maximum" /> 
    2930      <field field_ref="field_A_srf" name="field_A_srf_prec4" prec="8" /> 
    30       <field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 6h" operation="average" freq_op="1h"> @field_A_srf_max </field> 
    31       <variable id="my_global_attribute" type="string">file_6h</variable> 
     31      <!-- field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 6h" operation="average" freq_op="1h"> @field_A_srf_max </field> --> 
     32      <!--variable id="my_global_attribute" type="string">file_6h</variable> --> 
    3233    </file> 
    3334 
     
    4344      <field field_ref="field_A_srf" name="field_A_srf_max" operation="maximum" /> 
    4445      <field field_ref="field_A_srf" name="field_A_srf_prec4" prec="8" /> 
    45       <field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 1d" operation="average" freq_op="1h"> @field_A_srf_max </field> 
     46      <!--field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 1d" operation="average" freq_op="1h"> @field_A_srf_max </field> --> 
    4647      <variable id="my_global_attribute" type="string" >file_1d</variable> 
    4748    </file> 
  • XIOS/dev/branch_yushan/src/client.cpp

    r1102 r1126  
    177177       
    178178      // #pragma omp critical (_output) 
    179       // printf("Client %d : client.cpp Client::registerContext context add = %p\n", tmp_rank, &(*context)); 
     179      //printf("Client %d : client.cpp Client::registerContext %s context add = %p\n", tmp_rank, id, &(*context)); 
    180180       
    181181       
  • XIOS/dev/branch_yushan/src/cxios.cpp

    r1085 r1126  
    157157     if (CClient::getRank()==0) 
    158158     { 
    159        info(80)<<"Write data base Registry"<<endl<<globalRegistry->toString()<<endl ; 
     159       //info(80)<<"Write data base Registry"<<endl<<globalRegistry->toString()<<endl ; 
    160160       globalRegistry->toFile("xios_registry.bin") ; 
    161161       delete globalRegistry ; 
  • XIOS/dev/branch_yushan/src/server.cpp

    r1110 r1126  
    373373       int flag ; 
    374374       static void* buffer ; 
    375        //#pragma omp threadprivate(buffer) 
     375       #pragma omp threadprivate(buffer) 
    376376 
    377377       static MPI_Request request ; 
    378        //#pragma omp threadprivate(request) 
     378       #pragma omp threadprivate(request) 
    379379 
    380380       static bool recept=false ; 
    381        //#pragma omp threadprivate(recept) 
     381       #pragma omp threadprivate(recept) 
    382382        
    383383       int rank ; 
  • XIOS/dev/branch_yushan/src/test/test_complete.f90

    r1115 r1126  
    236236!#################################################################################### 
    237237 
    238     !DO ts=1,24*10 
    239     DO ts=1,24 
     238    DO ts=1,24*2 
     239    !DO ts=1,24 
    240240 
    241241      CALL xios_get_handle("atmosphere",ctx_hdl) 
  • XIOS/dev/branch_yushan/src/test/test_complete_omp.f90

    r1115 r1126  
    5656  CALL MPI_COMM_SIZE(comm,size_loc,ierr) 
    5757 
    58   size_loc = size*omp_get_num_threads() 
     58  size_loc = size_loc*omp_get_num_threads() 
    5959  rank = rank*omp_get_num_threads() + omp_get_thread_num() 
    6060 
     
    106106  CALL xios_set_axis_attr("axis_atm",n_glo=llm ,value=lval) ; 
    107107 
    108  
    109108  CALL xios_set_domain_attr("domain_atm",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj, type='curvilinear') 
    110109  CALL xios_set_domain_attr("domain_atm",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4) 
     
    181180!!! Initialisation des coordonnes globales et locales pour la grille indexee (1 point sur 2) 
    182181 
    183 !    nb_pt=ni*nj/2 
    184 !    ALLOCATE(kindex(nb_pt),field_A_srf(nb_pt,llm)) 
    185 !    DO i=1,nb_pt 
    186 !      kindex(i)=2*i-1 
    187 !    ENDDO 
    188 !    field_A_srf(1:nb_pt,:)=RESHAPE(field_A_glo(ibegin+1:iend+1:2,jbegin+1:jend+1,:),(/ nb_pt,llm /)) 
    189  
    190 !  CALL xios_context_initialize("surface",comm) 
    191  
    192 !  CALL xios_get_handle("surface",ctx_hdl) 
    193 !  CALL xios_set_current_context(ctx_hdl) 
    194  
    195 !  CALL xios_define_calendar(type="Gregorian", & 
    196 !                            start_date=xios_date(2000, 01, 01, 00, 00, 00), & 
    197 !                            time_origin=xios_date(1999, 01, 01, 15, 00, 00)) 
    198  
    199 !  CALL xios_set_axis_attr("axis_srf",n_glo=llm ,value=lval) 
    200 !  CALL xios_set_domain_attr("domain_srf",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj, type='curvilinear') 
    201 !  CALL xios_set_domain_attr("domain_srf",data_dim=1, data_ibegin=0, data_ni=nb_pt) 
    202 !  CALL xios_set_domain_attr("domain_srf",data_i_index=kindex) 
    203 !  CALL xios_set_domain_attr("domain_srf",lonvalue_2D=lon,latvalue_2D=lat) 
     182    nb_pt=ni*nj/2 
     183    ALLOCATE(kindex(nb_pt),field_A_srf(nb_pt,llm)) 
     184    DO i=1,nb_pt 
     185      kindex(i)=2*i-1 
     186    ENDDO 
     187    field_A_srf(1:nb_pt,:)=RESHAPE(field_A_glo(ibegin+1:iend+1:2,jbegin+1:jend+1,:),(/ nb_pt,llm /)) 
     188 
     189  CALL xios_context_initialize("surface",comm) 
     190 
     191 
     192  CALL xios_get_handle("surface",ctx_hdl) 
     193  CALL xios_set_current_context(ctx_hdl) 
     194 
     195  CALL xios_define_calendar(type="Gregorian", & 
     196                            start_date=xios_date(2000, 01, 01, 00, 00, 00), & 
     197                            time_origin=xios_date(1999, 01, 01, 15, 00, 00)) 
     198 
     199  CALL xios_set_axis_attr("axis_srf",n_glo=llm ,value=lval) 
     200  CALL xios_set_domain_attr("domain_srf",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj, type='curvilinear') 
     201  CALL xios_set_domain_attr("domain_srf",data_dim=1, data_ibegin=0, data_ni=nb_pt) 
     202  CALL xios_set_domain_attr("domain_srf",data_i_index=kindex) 
     203  CALL xios_set_domain_attr("domain_srf",lonvalue_2D=lon,latvalue_2D=lat) 
    204204 
    205205!!! Cration d un nouveau champ 
    206206 
    207  ! CALL xios_get_handle("field_definition",fieldgroup_hdl) 
    208 !  CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B_srf") 
     207  CALL xios_get_handle("field_definition",fieldgroup_hdl) 
     208  CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B_srf") 
    209209 
    210210!!! Heritage des attributs d un autre champ 
    211211 
    212 !  CALL xios_set_attr(field_hdl,field_ref="field_A_srf",name="field_B_srf") 
     212  CALL xios_set_attr(field_hdl,field_ref="field_A_srf",name="field_B_srf") 
    213213 
    214214!!! Affectation de ce nouveau champ au fichier avec un nouveau nom 
    215215 
    216 !  CALL xios_get_handle("output_surface",file_hdl) 
    217 !  CALL xios_add_child(file_hdl,field_hdl) 
    218 !  CALL xios_set_attr(field_hdl,field_ref="field_B_srf",name="field_C_srf") 
     216  CALL xios_get_handle("output_surface",file_hdl) 
     217  CALL xios_add_child(file_hdl,field_hdl) 
     218  CALL xios_set_attr(field_hdl,field_ref="field_B_srf",name="field_C_srf") 
    219219 
    220220!!! Definition du timestep 
    221221 
    222 !  dtime%second=1800 
    223 !  CALL xios_set_timestep(timestep=dtime) 
     222  dtime%second=1800 
     223  CALL xios_set_timestep(timestep=dtime) 
    224224 
    225225!!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalit) 
    226226 
    227 !  ni=0 ; lonvalue(:,:)=0 
    228 !  CALL xios_get_domain_attr("domain_srf",ni=ni,lonvalue_2D=lonvalue) 
     227  ni=0 ; lonvalue(:,:)=0 
     228  CALL xios_get_domain_attr("domain_srf",ni=ni,lonvalue_2D=lonvalue) 
    229229 
    230230  !PRINT *,"ni",ni 
     
    233233!!! Fin de la definition du contexte SRF 
    234234 
    235 !  CALL xios_close_context_definition() 
    236  
    237 !  print *, "xios_close_context_definition(surface)"  
     235  CALL xios_get_handle("surface",ctx_hdl) 
     236  CALL xios_set_current_context(ctx_hdl) 
     237 
     238  CALL xios_close_context_definition() 
     239 
     240  print *, "xios_close_context_definition(surface)", rank, size_loc  
     241 
    238242 
    239243 
     
    242246!#################################################################################### 
    243247 
    244     !DO ts=1,24*10 
    245     DO ts=1,24 
    246  
    247       !CALL xios_get_handle("atmosphere",ctx_hdl) 
    248       !CALL xios_set_current_context(ctx_hdl) 
     248    DO ts=1,24*2 
     249    !DO ts=1,24 
     250 
     251      CALL xios_get_handle("atmosphere",ctx_hdl) 
     252      CALL xios_set_current_context(ctx_hdl) 
    249253 
    250254!!! Mise a jour du pas de temps 
     
    258262!!! On change de contexte 
    259263 
    260 !      CALL xios_get_handle("surface",ctx_hdl) 
    261 !      CALL xios_set_current_context(ctx_hdl) 
     264      CALL xios_get_handle("surface",ctx_hdl) 
     265      CALL xios_set_current_context(ctx_hdl) 
    262266 
    263267!!! Mise a jour du pas de temps 
    264268 
    265  !     CALL xios_update_calendar(ts) 
     269      CALL xios_update_calendar(ts) 
    266270 
    267271!!! On donne la valeur du champ srf 
    268272 
    269  !     CALL xios_send_field("field_A_srf",field_A_srf) 
     273      CALL xios_send_field("field_A_srf",field_A_srf) 
    270274 
    271275      CALL wait_us(5000) ; 
     
    282286!!! Fin des contextes 
    283287 
    284  
    285 !    CALL xios_get_handle("surface",ctx_hdl)  
    286  
    287 !    CALL xios_set_current_context(ctx_hdl) 
    288  
    289 !    CALL xios_context_finalize() 
    290  
    291 !    print *, "xios_context_finalize(surface)"  
    292  
    293      !CALL xios_get_handle("atmosphere",ctx_hdl) 
    294  
    295      !CALL xios_set_current_context(ctx_hdl) 
     288     CALL xios_get_handle("surface",ctx_hdl)  
     289 
     290     CALL xios_set_current_context(ctx_hdl) 
    296291 
    297292     CALL xios_context_finalize() 
    298293 
     294     print *, "xios_context_finalize(surface)"  
     295 
     296     CALL xios_get_handle("atmosphere",ctx_hdl) 
     297 
     298     CALL xios_set_current_context(ctx_hdl) 
     299 
     300     CALL xios_context_finalize() 
     301 
    299302     print *, "xios_context_finalize(atmosphere)" 
    300303 
     
    308311 
    309312    DEALLOCATE(lon, lat, field_A_atm, lonvalue) 
    310 !    DEALLOCATE(kindex, field_A_srf) 
    311  
    312      print *, "Client : xios_finalize " 
    313  
    314     !$omp master 
     313    DEALLOCATE(kindex, field_A_srf) 
     314 
     315    print *, "Client : xios_finalize " 
     316 
     317    !$omp barrier 
     318 
     319    !$omp master  
    315320    CALL MPI_COMM_FREE(comm, ierr) 
    316321    !$omp end master 
     
    318323    !$omp barrier 
    319324 
    320     print*, "MPI_COMM_FREE OK", rank, size_loc 
     325    
    321326 
    322327  !$omp end parallel 
Note: See TracChangeset for help on using the changeset viewer.