Changeset 2124 for LMDZ5/trunk/libf


Ignore:
Timestamp:
Sep 19, 2014, 7:51:02 PM (10 years ago)
Author:
lguez
Message:

In guide_main, there is the line:

f_out=((MOD(itau,iguide_sav).EQ.0).AND.guide_sav)

The Fortran standard says that the result of mod(a, p) with p = 0 is
processor dependent. With ifort (on Ada at IDRIS), it produces a
run-time error. This is now fixed. The user must still choose
iguide_sav=0 in order to write only once.

Location:
LMDZ5/trunk/libf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3d/guide_mod.F90

    r2025 r2124  
    109109    ! frequences f>0: fx/jour; f<0: tous les f jours; f=0: 1 seule fois.
    110110    IF (iguide_sav.GT.0) THEN
    111         iguide_sav=day_step/iguide_sav
    112     ELSE
    113         iguide_sav=day_step*iguide_sav
     111       iguide_sav=day_step/iguide_sav
     112    ELSE if (iguide_sav == 0) then
     113       iguide_sav = huge(0)
     114    else
     115       iguide_sav=day_step*iguide_sav
    114116    ENDIF
    115117
  • LMDZ5/trunk/libf/dyn3dmem/guide_loc_mod.F90

    r2039 r2124  
    114114    ! frequences f>0: fx/jour; f<0: tous les f jours; f=0: 1 seule fois.
    115115    IF (iguide_sav.GT.0) THEN
    116         iguide_sav=day_step/iguide_sav
     116       iguide_sav=day_step/iguide_sav
     117    ELSE if (iguide_sav == 0) then
     118       iguide_sav = huge(0)
    117119    ELSE
    118         iguide_sav=day_step*iguide_sav
     120       iguide_sav=day_step*iguide_sav
    119121    ENDIF
    120122
  • LMDZ5/trunk/libf/dyn3dpar/guide_p_mod.F90

    r2100 r2124  
    113113    ! frequences f>0: fx/jour; f<0: tous les f jours; f=0: 1 seule fois.
    114114    IF (iguide_sav.GT.0) THEN
    115         iguide_sav=day_step/iguide_sav
     115       iguide_sav=day_step/iguide_sav
     116    ELSE if (iguide_sav == 0) then
     117       iguide_sav = huge(0)
    116118    ELSE
    117         iguide_sav=day_step*iguide_sav
     119       iguide_sav=day_step*iguide_sav
    118120    ENDIF
    119121
Note: See TracChangeset for help on using the changeset viewer.