Changeset 1860 for LMDZ5/trunk


Ignore:
Timestamp:
Sep 5, 2013, 12:52:02 PM (11 years ago)
Author:
Ehouarn Millour
Message:

Implement in dyn3dpar the modifications that were made in the dyn3dmem dynamics (r1858-1859) about setting size of omp_chunk.
EM

Location:
LMDZ5/trunk/libf/dyn3dpar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3dpar/conf_gcm.F

    r1823 r1860  
    1616      use mod_filtre_fft, ONLY : use_filtre_fft
    1717      use mod_hallo, ONLY : use_mpi_alloc
    18       USE parallel_lmdz, ONLY : omp_chunk
    1918      USE infotrac, ONLY : type_trac
    2019      use assert_m, only: assert
     
    906905      use_mpi_alloc=.FALSE.
    907906      CALL getin('use_mpi_alloc',use_mpi_alloc)
    908 
    909 !Config  Key  = omp_chunk
    910 !Config  Desc = taille des blocs openmp
    911 !Config  Def  = 1
    912 !Config  Help = defini la taille des packets d'it�ration openmp
    913 !Config         distribu�e � chaque t�che lors de l'entr�e dans une
    914 !Config         boucle parall�lis�e
    915  
    916       omp_chunk=1
    917       CALL getin('omp_chunk',omp_chunk)
    918907
    919908!Config key = ok_strato
     
    1004993      write(lunout,*)' use_filtre_fft = ', use_filtre_fft
    1005994      write(lunout,*)' use_mpi_alloc = ', use_mpi_alloc
    1006       write(lunout,*)' omp_chunk = ', omp_chunk
    1007995      write(lunout,*)' ok_strato = ', ok_strato
    1008996      write(lunout,*)' ok_gradsfile = ', ok_gradsfile
  • LMDZ5/trunk/libf/dyn3dpar/parallel_lmdz.F90

    r1852 r1860  
    44  MODULE parallel_lmdz
    55  USE mod_const_mpi
     6#ifdef CPP_IOIPSL
     7      use IOIPSL, only: getin
     8#else
     9! if not using IOIPSL, we still need to use (a local version of) getin
     10      use ioipsl_getincom, only: getin
     11#endif   
    612   
    713    LOGICAL,SAVE :: using_mpi=.TRUE.
     
    155161        omp_size=OMP_GET_NUM_THREADS()
    156162!$OMP END MASTER
     163!$OMP BARRIER
    157164        omp_rank=OMP_GET_THREAD_NUM()   
     165
     166!Config  Key  = omp_chunk
     167!Config  Desc = taille des blocs openmp
     168!Config  Def  = 1
     169!Config  Help = defini la taille des packets d'it�ration openmp
     170!Config         distribue a chaque tache lors de l'entree dans une
     171!Config         boucle parallelisee
     172
     173!$OMP MASTER
     174      omp_chunk=(llm+1)/omp_size
     175      IF (MOD(llm+1,omp_size)/=0) omp_chunk=omp_chunk+1
     176      CALL getin('omp_chunk',omp_chunk)
     177!$OMP END MASTER
     178!$OMP BARRIER       
    158179#else   
    159180        omp_size=1
Note: See TracChangeset for help on using the changeset viewer.