Ignore:
Timestamp:
03/08/17 16:55:00 (7 years ago)
Author:
yushan
Message:

server mode OK tested with test_complete

Location:
XIOS/dev/branch_yushan/src/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan/src/test/test_client.f90

    r1057 r1067  
    3636  CALL MPI_INIT(ierr) 
    3737  CALL init_wait 
     38 
     39  CALL MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr) 
     40  if(rank < 2) then 
    3841   
    3942  CALL xios_initialize(id,return_comm=comm) 
     
    162165  CALL xios_finalize() 
    163166 
     167   else 
     168 
     169   CALL xios_init_server 
     170   
     171   endif 
     172     
     173 
    164174  CALL MPI_FINALIZE(ierr) 
    165175 
  • XIOS/dev/branch_yushan/src/test/test_complete.f90

    r1058 r1067  
    1010 
    1111  CHARACTER(len=*),PARAMETER :: id="client" 
    12   INTEGER :: comm 
     12  INTEGER :: comm, comm2 
    1313  TYPE(xios_duration)  :: dtime 
    1414  TYPE(xios_context) :: ctx_hdl 
     
    4848!########################################################################### 
    4949 
    50 !!! Initialisation des coordonnées globales et locales pour la grille réguliÚre 
     50!!! Initialisation des coordonnes globales et locales pour la grille rgulire 
    5151 
    5252  DO j=1,nj_glo 
     
    8080 
    8181  CALL xios_context_initialize("atmosphere",comm) 
     82  print*, "init context atmosphere comm = ", comm 
     83 
    8284  CALL xios_get_handle("atmosphere",ctx_hdl) 
    8385  CALL xios_set_current_context(ctx_hdl) 
     
    103105  CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 
    104106 
    105 !!! Création d un nouveau champ 
     107!!! Cration d un nouveau champ 
    106108 
    107109  CALL xios_get_handle("field_definition",fieldgroup_hdl) 
     
    123125  CALL xios_set_timestep(timestep=dtime) 
    124126 
    125 !!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalité) 
     127!!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalit) 
    126128 
    127129  ni=0 ; lonvalue(:,:)=0 
     
    162164!########################################################################### 
    163165 
    164 !!! Initialisation des coordonnées globales et locales pour la grille indexee (1 point sur 2) 
     166!!! Initialisation des coordonnes globales et locales pour la grille indexee (1 point sur 2) 
    165167 
    166168    nb_pt=ni*nj/2 
     
    172174 
    173175  CALL xios_context_initialize("surface",comm) 
     176  print*, "init context surface comm = ", comm 
     177 
    174178  CALL xios_get_handle("surface",ctx_hdl) 
    175179  CALL xios_set_current_context(ctx_hdl) 
     
    185189  CALL xios_set_domain_attr("domain_srf",lonvalue_2D=lon,latvalue_2D=lat) 
    186190 
    187 !!! Création d un nouveau champ 
     191!!! Cration d un nouveau champ 
    188192 
    189193  CALL xios_get_handle("field_definition",fieldgroup_hdl) 
     
    205209  CALL xios_set_timestep(timestep=dtime) 
    206210 
    207 !!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalité) 
     211!!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalit) 
    208212 
    209213  ni=0 ; lonvalue(:,:)=0 
     
    217221  CALL xios_close_context_definition() 
    218222 
    219   print *, "xios_close_context_definition(surface)"  
     223 print *, "xios_close_context_definition(surface)"  
    220224 
    221225 
     
    224228!#################################################################################### 
    225229 
    226     !DO ts=1,24*10 
    227     DO ts=1,24 
     230    DO ts=1,24*10 
     231    !DO ts=1,24 
    228232 
    229233      CALL xios_get_handle("atmosphere",ctx_hdl) 
     
    264268!!! Fin des contextes 
    265269 
    266     print *, "start : xios_context_finalize(surface)" 
     270    !print *, "start : xios_context_finalize(surface)" 
    267271 
    268272    CALL xios_get_handle("surface",ctx_hdl)  
    269     print *, "xios_get_handle OK" 
     273    !print *, "xios_get_handle (surface) OK" 
    270274    CALL xios_set_current_context(ctx_hdl) 
    271     print *, "xios_set_current_context OK" 
     275    !print *, "xios_set_current_context (surface) OK" 
    272276    CALL xios_context_finalize() 
    273277 
    274278    print *, "xios_context_finalize(surface)"  
    275279 
    276     CALL xios_get_handle("atmosphere",ctx_hdl) 
    277     CALL xios_set_current_context(ctx_hdl) 
    278     CALL xios_context_finalize() 
     280     CALL xios_get_handle("atmosphere",ctx_hdl) 
     281!     !print *, "xios_get_handle (atmosphere) OK" 
     282     CALL xios_set_current_context(ctx_hdl) 
     283!     !print *, "xios_set_current_context (atmosphere) OK" 
     284     CALL xios_context_finalize() 
    279285 
    280286    print *, "xios_context_finalize(atmosphere)" 
    281287 
    282288    DEALLOCATE(lon, lat, field_A_atm, lonvalue) 
    283     DEALLOCATE(kindex, field_A_srf) 
     289   ! DEALLOCATE(kindex, field_A_srf) 
    284290 
    285291!!! Fin de XIOS 
Note: See TracChangeset for help on using the changeset viewer.