Ignore:
Timestamp:
Jul 1, 2010, 11:02:53 AM (14 years ago)
Author:
Laurent Fairhead
Message:

Merged LMDZ4V5.0-dev branch changes r1292:r1399 to trunk.

Validation:
Validation consisted in compiling the HEAD revision of the trunk,
LMDZ4V5.0-dev branch and the merged sources and running different
configurations on local and SX8 machines comparing results.

Local machine: bench configuration, 32x24x11, gfortran

  • IPSLCM5A configuration (comparison between trunk and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent
  • MH07 configuration, new physics package (comparison between LMDZ4V5.0-dev branch and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent

SX8 machine (brodie), 96x95x39 on 4 processors:

  • IPSLCM5A configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent
  • MH07 configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent

Changes to the makegcm and create_make_gcm scripts to take into account
main programs in F90 files


Fusion de la branche LMDZ4V5.0-dev (r1292:r1399) au tronc principal

Validation:
La validation a consisté à compiler la HEAD de le trunk et de la banche
LMDZ4V5.0-dev et les sources fusionnées et de faire tourner le modéle selon
différentes configurations en local et sur SX8 et de comparer les résultats

En local: 32x24x11, config bench/gfortran

  • pour une config IPSLCM5A (comparaison tronc/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux (à part sur RN et Pb)
    • fichiers histoire égaux
  • pour une config nlle physique (MH07) (comparaison LMDZ4v5.0-dev/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux
    • fichiers histoire équivalents

Sur brodie, 96x95x39 sur 4 proc:

  • pour une config IPSLCM5A:
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc
  • pour une config MH07
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc

Changement sur makegcm et create_make-gcm pour pouvoir prendre en compte des
programmes principaux en *F90

Location:
LMDZ4/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk

  • LMDZ4/trunk/libf/filtrez/mod_fft_fftw.F90

    r986 r1403  
     1!
     2! $Id$
     3!
     4
    15MODULE mod_fft_fftw
    26
    37#ifdef FFT_FFTW
    48
    5   REAL,SAVE,ALLOCATABLE    :: Table_forward(:)
    6   REAL,SAVE,ALLOCATABLE    :: Table_backward(:)
    7   REAL,SAVE                :: scale_factor
    8   INTEGER,SAVE             :: vsize
    9   INTEGER,PARAMETER        :: inc=1
     9  REAL, SAVE                   :: scale_factor
     10  INTEGER, SAVE                :: vsize
     11  INTEGER, PARAMETER           :: inc=1
    1012 
    11   INTEGER,SAVE            :: plan_forward
    12   INTEGER,SAVE            :: plan_backward
     13  INTEGER*8, ALLOCATABLE, DIMENSION(:), SAVE :: plan_forward
     14  INTEGER*8, ALLOCATABLE, DIMENSION(:), SAVE :: plan_backward
    1315 
    1416CONTAINS
    1517 
    16   SUBROUTINE Init_fft(iim)
     18  SUBROUTINE Init_fft(iim,nvectmax)
    1719  IMPLICIT NONE
    18 #include <rfftw.h>
     20#include <fftw3.f>
    1921    INTEGER :: iim
    20     REAL    :: rtmp=1.
    21     COMPLEX*16 :: ctmp
    22     INTEGER :: itmp=1
    23     INTEGER :: isign=0
    24     INTEGER :: ierr
     22    INTEGER :: nvectmax
     23
     24    INTEGER :: itmp
     25
     26    INTEGER               :: rank
     27    INTEGER               :: howmany
     28    INTEGER               :: istride, idist
     29    INTEGER               :: ostride, odist
     30    INTEGER, DIMENSION(1) :: n_array, inembed, onembed
     31
     32    REAL,    DIMENSION(iim+1,nvectmax) :: dbidon
     33    COMPLEX, DIMENSION(iim/2+1,nvectmax) :: cbidon
     34
     35    vsize = iim
     36    scale_factor = 1./SQRT(1.*vsize)
     37
     38    dbidon = 0
     39    cbidon = 0
     40
     41    ALLOCATE(plan_forward(nvectmax))
     42    ALLOCATE(plan_backward(nvectmax))
    2543   
    26     vsize=iim
    27     scale_factor=1./SQRT(1.*vsize)
    28     ALLOCATE(Table_forward(2*vsize+64))
    29     ALLOCATE(Table_backward(2*vsize+64))
     44    WRITE(*,*)"!---------------------!"
     45    WRITE(*,*)"!                     !"
     46    WRITE(*,*)"! INITIALISATION FFTW !"
     47    WRITE(*,*)"!                     !"
     48    WRITE(*,*)"!---------------------!"
    3049   
    31 !    CALL DZFFTM(isign,vsize,itmp,scale_factor,rtmp,vsize+inc,ctmp,vsize/2+1,table_forward,rtmp,ierr)
    32    
    33 !    CALL ZDFFTM(isign,vsize,itmp,scale_factor,ctmp,vsize/2+1,rtmp,vsize+inc,table_backward,rtmp,ierr)
     50! On initialise tous les plans
     51    DO itmp = 1, nvectmax
     52       rank       = 1
     53       n_array(1) = iim
     54       howmany    = itmp
     55       inembed(1) = iim + 1 ; onembed(1) = iim/2 + 1
     56       istride    = 1       ; ostride    = 1
     57       idist      = iim + 1 ; odist      = iim/2 + 1
    3458
    35     CALL rfftw_f77_create_plan(plan_forward,iim,FFTW_REAL_TO_COMPLEX,FFTW_ESTIMATE)
    36     CALL rfftw_f77_create_plan(plan_backward,iim,FFTW_COMPLEX_TO_REAL,FFTW_ESTIMATE)
    37    
     59       CALL dfftw_plan_many_dft_r2c(plan_forward(itmp), rank, n_array, howmany, &
     60            & dbidon, inembed, istride, idist, &
     61            & cbidon, onembed, ostride, odist, &
     62            & FFTW_ESTIMATE)
     63
     64       rank       = 1
     65       n_array(1) = iim
     66       howmany    = itmp
     67       inembed(1) = iim/2 + 1 ; onembed(1) = iim + 1
     68       istride    = 1         ; ostride    = 1
     69       idist      = iim/2 + 1 ; odist      = iim + 1
     70       CALL dfftw_plan_many_dft_c2r(plan_backward(itmp), rank, n_array, howmany, &
     71            & cbidon, inembed, istride, idist, &
     72            & dbidon, onembed, ostride, odist, &
     73            & FFTW_ESTIMATE)
     74
     75    ENDDO
     76
     77    WRITE(*,*)"!-------------------------!"
     78    WRITE(*,*)"!                         !"
     79    WRITE(*,*)"! FIN INITIALISATION FFTW !"
     80    WRITE(*,*)"!                         !"
     81    WRITE(*,*)"!-------------------------!"
     82
    3883  END SUBROUTINE Init_fft
    3984 
     
    4186  SUBROUTINE fft_forward(vect,TF_vect,nb_vect)
    4287    IMPLICIT NONE
    43 #include <rfftw.h>
    44     INTEGER,INTENT(IN)  :: nb_vect
    45     REAL,INTENT(IN)     :: vect(vsize+inc,nb_vect)
    46     COMPLEX*16,INTENT(OUT) :: TF_vect(vsize/2+1,nb_vect)
    47     REAL                :: work(4*vsize*nb_vect)
    48     INTEGER             :: ierr
    49     INTEGER, PARAMETER :: isign=-1
    50  
    51 !    CALL DZFFTM(isign,vsize,nb_vect,scale_factor,vect,vsize+inc,TF_vect,vsize/2+1,table_forward,work,ierr)
    52      CALL rfftwnd_f77_real_to_complex(plan_forward,nb_vect,vect, 1, vsize+inc , TF_vect, 1, vsize/2+1); 
    53    
     88#include <fftw3.f>
     89    INTEGER,INTENT(IN)     :: nb_vect
     90    REAL,INTENT(IN)        :: vect(vsize+inc,nb_vect)
     91    COMPLEX,INTENT(OUT) :: TF_vect(vsize/2+1,nb_vect)
     92
     93    CALL dfftw_execute_dft_r2c(plan_forward(nb_vect),vect,TF_vect)
     94
     95    TF_vect = scale_factor * TF_vect
     96
    5497  END SUBROUTINE fft_forward
    5598 
    5699  SUBROUTINE fft_backward(TF_vect,vect,nb_vect)
    57100    IMPLICIT NONE
    58 #include <rfftw.h>
    59     INTEGER,INTENT(IN)  :: nb_vect
    60     REAL,INTENT(OUT)    :: vect(vsize+inc,nb_vect)
    61     COMPLEX*16,INTENT(IN ) :: TF_vect(vsize/2+1,nb_vect)
    62     REAL                :: work(4*vsize*nb_vect)
    63     INTEGER             :: ierr
    64     INTEGER, PARAMETER :: isign=1
    65  
    66 !    CALL ZDFFTM(isign,vsize,nb_vect,scale_factor,TF_vect,vsize/2+1,vect,vsize+inc,table_backward,work,ierr)
    67     CALL rfftwnd_f77_complex_to_real(plan_forward,nb_vect,TF_vect, 1, vsize/2+1 , vect, 1, vsize+inc); 
     101#include <fftw3.f>
     102    INTEGER,INTENT(IN)     :: nb_vect
     103    REAL,INTENT(OUT)       :: vect(vsize+inc,nb_vect)
     104    COMPLEX,INTENT(IN ) :: TF_vect(vsize/2+1,nb_vect)
     105
     106    CALL dfftw_execute_dft_c2r(plan_backward(nb_vect),TF_vect,vect)
     107
     108    vect = scale_factor * vect
    68109
    69110  END SUBROUTINE fft_backward
     
    72113 
    73114END MODULE mod_fft_fftw
    74 
Note: See TracChangeset for help on using the changeset viewer.