Changeset 3225


Ignore:
Timestamp:
Feb 19, 2024, 11:38:05 AM (10 months ago)
Author:
emillour
Message:

Mars PCM:
Remove interactive checking with XIOS whether a field should be sent to it;
some yet unresolved issues arise when using this in mixed MPI-OpenMP mode...
EM

Location:
trunk/LMDZ.MARS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/changelog.txt

    r3224 r3225  
    45074507Follow-up of r3217, remove some unused "use ..." in leapfrog_nogcm which
    45084508cause problems when compiling gcm in parallel mode
     4509
     4510== 19/02/2024 == EM
     4511Remove interactive checking with XIOS whether a field should be sent to it;
     4512some yet unresolved issues arise when using this in mixed MPI-OpenMP mode...
  • trunk/LMDZ.MARS/libf/phymars/write_output_mod.F90

    r3169 r3225  
    3535real,         intent(in) :: field
    3636
     37logical :: is_active ! For XIOS, should this field be sent or not
     38
    3739call writediagfi(ngrid,field_name,title,units,0,(/field/))
    3840#ifdef CPP_XIOS
    39     ! only send the field to xios if the user asked for it
    40     if (xios_is_active_field(field_name)) call send_xios_field(field_name,field)
     41!is_active=xios_is_active_field(field_name)
     42is_active=.true.
     43    ! only send the field to xios if the user asked for it
     44    if (is_active) call send_xios_field(field_name,field)
    4145#endif
    4246
     
    6367real, dimension(:), intent(in) :: field
    6468
     69logical :: is_active ! For XIOS, should this field be sent or not
     70
    6571call writediagfi(ngrid,field_name,title,units,2,field)
    6672#ifdef CPP_XIOS
    67     ! only send the field to xios if the user asked for it
    68     if (xios_is_active_field(field_name)) call send_xios_field(field_name,field)
     73!is_active=xios_is_active_field(field_name)
     74is_active=.true.
     75    ! only send the field to xios if the user asked for it
     76    if (is_active) call send_xios_field(field_name,field)
    6977#endif
    7078
     
    93101character(*),         intent(in) :: units
    94102real, dimension(:,:), intent(in) :: field
     103
     104logical :: is_active ! For XIOS, should this field be sent or not
    95105
    96106if (size(field,2) == nsoilmx) then
     
    101111
    102112#ifdef CPP_XIOS
    103     ! only send the field to xios if the user asked for it
    104     if (xios_is_active_field(field_name)) call send_xios_field(field_name,field)
     113!is_active=xios_is_active_field(field_name)
     114is_active=.true.
     115    ! only send the field to xios if the user asked for it
     116    if (is_active) call send_xios_field(field_name,field)
    105117#endif
    106118
     
    127139integer,      intent(in) :: field
    128140
     141logical :: is_active ! For XIOS, should this field be sent or not
     142
    129143call writediagfi(ngrid,field_name,title,units,0,(/real(field)/))
    130144#ifdef CPP_XIOS
    131     ! only send the field to xios if the user asked for it
    132     if (xios_is_active_field(field_name)) call send_xios_field(field_name,(/real(field)/))
     145!is_active=xios_is_active_field(field_name)
     146is_active=.true.
     147    ! only send the field to xios if the user asked for it
     148    if (is_active) call send_xios_field(field_name,(/real(field)/))
    133149#endif
    134150
     
    155171integer, dimension(:), intent(in) :: field
    156172
     173logical :: is_active ! For XIOS, should this field be sent or not
     174
    157175call writediagfi(ngrid,field_name,title,units,2,real(field))
    158176#ifdef CPP_XIOS
    159     ! only send the field to xios if the user asked for it
    160     if (xios_is_active_field(field_name)) call send_xios_field(field_name,real(field))
     177!is_active=xios_is_active_field(field_name)
     178is_active=.true.
     179    ! only send the field to xios if the user asked for it
     180    if (is_active) call send_xios_field(field_name,real(field))
    161181#endif
    162182
     
    185205character(*),            intent(in) :: units
    186206integer, dimension(:,:), intent(in) :: field
     207
     208logical :: is_active ! For XIOS, should this field be sent or not
    187209
    188210if (size(field,2) == nsoilmx) then
     
    192214endif
    193215#ifdef CPP_XIOS
    194     ! only send the field to xios if the user asked for it
    195     if (xios_is_active_field(field_name)) call send_xios_field(field_name,real(field))
     216!is_active=xios_is_active_field(field_name)
     217is_active=.true.
     218    ! only send the field to xios if the user asked for it
     219    if (is_active) call send_xios_field(field_name,real(field))
    196220#endif
    197221
     
    219243! Local argument used to convert logical to real array
    220244real, dimension(1) :: field_real
     245logical :: is_active ! For XIOS, should this field be sent or not
    221246
    222247field_real = 0.
     
    225250call writediagfi(ngrid,field_name,title,units,0,field_real)
    226251#ifdef CPP_XIOS
    227     ! only send the field to xios if the user asked for it
    228     if (xios_is_active_field(field_name)) call send_xios_field(field_name,field_real)
     252!is_active=xios_is_active_field(field_name)
     253is_active=.true.
     254    ! only send the field to xios if the user asked for it
     255    if (is_active) call send_xios_field(field_name,field_real)
    229256#endif
    230257
     
    252279! Local argument used to convert logical to real
    253280real, dimension(ngrid) :: field_real
     281logical :: is_active ! For XIOS, should this field be sent or not
    254282
    255283field_real = 0.
     
    258286call writediagfi(ngrid,field_name,title,units,2,field_real)
    259287#ifdef CPP_XIOS
    260     ! only send the field to xios if the user asked for it
    261     if (xios_is_active_field(field_name)) call send_xios_field(field_name,field_real)
     288!is_active=xios_is_active_field(field_name)
     289is_active=.true.
     290    ! only send the field to xios if the user asked for it
     291    if (is_active) call send_xios_field(field_name,field_real)
    262292#endif
    263293
     
    288318! Local argument used to convert logical to real
    289319real, allocatable, dimension(:,:) :: field_real
     320logical :: is_active ! For XIOS, should this field be sent or not
    290321
    291322allocate(field_real(size(field,1),size(field,2)))
     
    300331
    301332#ifdef CPP_XIOS
    302     ! only send the field to xios if the user asked for it
    303     if (xios_is_active_field(field_name)) call send_xios_field(field_name,field_real)
     333!is_active=xios_is_active_field(field_name)
     334is_active=.true.
     335    ! only send the field to xios if the user asked for it
     336    if (is_active) call send_xios_field(field_name,field_real)
    304337#endif
    305338
  • trunk/LMDZ.MARS/libf/phymars/xios_output_mod.F90

    r3169 r3225  
    309309 FUNCTION xios_is_active_field(field_id)
    310310 USE xios, only: xios_field_is_active
    311  USE mod_phys_lmdz_para, only: bcast_omp
     311 USE mod_phys_lmdz_omp_transfert, only: bcast_omp
    312312 IMPLICIT NONE
    313313   LOGICAL ::  xios_is_active_field
     
    317317 ! to be in the output file(s)
    318318
     319!$OMP BARRIER
    319320!$OMP MASTER
    320321   xios_is_active_field = xios_field_is_active(field_id)
Note: See TracChangeset for help on using the changeset viewer.