Changes between Version 19 and Version 20 of DevelopmentActivities/Xios


Ignore:
Timestamp:
2014-02-21T08:59:44+01:00 (10 years ago)
Author:
jgipsl
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevelopmentActivities/Xios

    v19 v20  
    113113}}} 
    114114 
     115 * Change main makefile to compile mpi_omp instead of mpi, change on 3 lignes with makeorchidee_fcm and makelmez_fcm 
     116 
    115117 * Compile as usuall 
    116118{{{ 
     
    121123* Lance 
    122124Use all xml files found in modipsl/modeles/LMDZ/DefLists except iodef.xml.  
     125 
     126= LMDZOR with OpenMP = 
     127Do as above but : 
     128 * take revision 1729 of LMDZ and update some files :  
     129 
     130{{{ 
     131cd modipsl/modeles/LMDZ 
     132svn update -r 1905 libf/phylmd/mod_synchro_omp.F90 
     133svn update -r 1905 libf/phylmd/mod_phys_lmdz_omp_transfert.F90 
     134svn update -r 1986 bld.cfg  
     135svn update -r 1986 makelmdz_fcm 
     136svn update -r 1986 arch/arch-X64_CURIE.path 
     137}}} 
     138 
     139 * Add initialization of XIOS in LMDZ/libf/dyn3dpar/mod_const_mpi.F90, change the subroutine Init_MPI to the following :  
     140{{{ 
     141  SUBROUTINE Init_mpi 
     142 
     143#ifdef CPP_IOIPSL 
     144    USE IOIPSL 
     145#else 
     146! if not using IOIPSL, we still need to use (a local version of) getin 
     147    USE ioipsl_getincom 
     148#endif 
     149 
     150#ifdef CPP_XIOS 
     151    USE XIOS 
     152#endif 
     153  IMPLICIT NONE 
     154#ifdef CPP_MPI 
     155     INCLUDE 'mpif.h' 
     156#endif 
     157    INTEGER             :: ierr 
     158    INTEGER             :: thread_required 
     159    INTEGER             :: thread_provided 
     160    LOGICAL             :: xios_orchidee_ok 
     161    CHARACTER(len=*),PARAMETER      :: id="client"           !! Id for initialization of ORCHIDEE in XIOS 
     162 
     163 
     164    xios_orchidee_ok=.FALSE. 
     165    CALL getin('XIOS_ORCHIDEE_OK ',xios_orchidee_ok) 
     166    WRITE(*,*)'In LMDZ: xios_orchidee_ok=',xios_orchidee_ok 
     167 
     168#ifdef CPP_MPI 
     169!$OMP MASTER 
     170      thread_required=MPI_THREAD_SERIALIZED 
     171 
     172      CALL MPI_INIT_THREAD(thread_required,thread_provided,ierr) 
     173      IF (thread_provided < thread_required) THEN 
     174        PRINT *,'Warning : The multithreaded level of MPI librairy do not provide the requiered level',  & 
     175                ' in mod_const_mpi::Init_const_mpi' 
     176      ENDIF 
     177 
     178      IF ( xios_orchidee_ok) THEN 
     179#ifdef CPP_XIOS 
     180         PRINT*,'Before calling xios_initialize in LMDZ' 
     181         CALL xios_initialize(id,return_comm=COMM_LMDZ) 
     182#endif 
     183      ELSE 
     184         COMM_LMDZ=MPI_COMM_WORLD 
     185      END IF 
     186 
     187      MPI_REAL_LMDZ=MPI_REAL8 
     188!$OMP END MASTER 
     189#endif 
     190 
     191   END SUBROUTINE Init_mpi 
     192}}} 
     193 
     194 * before compiling, add in LMDZ/arch/arch-X64_CURIE.fcm so that 
     195{{{ 
     196%PROD_FFLAGS         -O3 -fp-model precise 
     197%OMP_FFLAGS          -openmp -openmp-threadprivate compat 
     198%OMP_LD              -openmp -openmp-threadprivate compat 
     199}}} 
     200 
     201 * in ORCHIDEE, add openmp compiling directives in ORCHIDEE/arch/arch-X64_CURIE.fcm 
     202{{{ 
     203%OMP_FFLAGS          -openmp -openmp-threadprivate compat 
     204%OMP_LD              -openmp -openmp-threadprivate compat 
     205}}} 
     206 
    123207 
    124208= Implementation =