Opened 4 years ago

Closed 17 months ago

#353 closed defect (fixed)

non index restput_p_rXd and restget_p_rXd subroutines use index scatter/gather

Reported by: ajornet Owned by: jgipsl
Priority: major Milestone: ORCHIDEE 4.0
Component: Driver files Version: trunc
Keywords: scatter gather restart Cc:

Description

Subroutines restput_p_rXd and restget_p_rXd are meant to be used for non index variables (e.g: variable(iim, jjm, pft, ...)) vs the index ones (e.g: variable(nbps, pft, ...)). For that reason, scatter/gather calls should have the same behaviour.

Currently:
scatter/gather -> index soubroutines

Should be moved to:
scatter2D_mpi/gather2D_mpi -> non index subroutines

For example:

  SUBROUTINE restput_p_r1d (fid,vname_q,iim,jjm,llm,itau,var)
    IMPLICIT NONE
!-
    INTEGER :: fid
    CHARACTER(LEN=*) :: vname_q
    INTEGER :: iim, jjm, llm, itau
    REAL :: var(:)
    !-----------------------------
    REAL, ALLOCATABLE, DIMENSION(:) :: temp_g

    IF (is_root_prc) THEN
      ALLOCATE( temp_g(iim*jjm*llm) )
    ELSE
      ALLOCATE( temp_g(1) )
    ENDIF

!    CALL gather(var,temp_g) --> original
    CALL gather2D_mpi(var,temp_g)
    IF (is_root_prc) THEN
       CALL restput (fid,vname_q,iim,jjm,llm,itau,temp_g)
    ENDIF
    DEALLOCATE( temp_g )

  END SUBROUTINE restput_p_r1d

This modification has an impact in dim2_driver.f90:

     var_name = 'petAcoef'
     IF (is_root_prc) THEN
        ALLOCATE(petAcoef_g(iim_g,jjm_g))
     ELSE
        ALLOCATE(petAcoef_g(0,1))
     ENDIF
     CALL gather2D_mpi( petAcoef, petAcoef_g)
     IF(is_root_prc) CALL restput (rest_id, var_name, iim_g, jjm_g, 1, istp_old, petAcoef_g)
     DEALLOCATE(petAcoef_g)

to:

 CALL restput_p (rest_id, 'petAcoef', iim_g, jjm_g, 1, istp_old, petAcoef)

Change History (6)

comment:1 Changed 4 years ago by ajornet

comment:2 Changed 4 years ago by jgipsl

  • Milestone changed from orchidee_1_9_6 to ORCHIDEE 3.0
  • Owner changed from somebody to jgipsl
  • Status changed from new to assigned

comment:3 Changed 3 years ago by jgipsl

  • Status changed from assigned to accepted

comment:4 Changed 2 years ago by jgipsl

  • Milestone changed from ORCHIDEE 3.0 to ORCHIDEE 4.0

comment:5 Changed 17 months ago by ajornet

Commited at revision [6190/trunk/ORCHIDEE]

comment:6 Changed 17 months ago by ajornet

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.