Ignore:
Timestamp:
Oct 6, 2008, 10:43:22 AM (16 years ago)
Author:
Laurent Fairhead
Message:
  • Modifs sur le parallelisme: masquage dans la physique
  • Inclusion strato
  • mise en coherence etat0
  • le mode offline fonctionne maintenant en parallele,
  • les fichiers de la dynamiques sont correctement sortis et peuvent etre reconstruit avec rebuild
  • la version parallele de la dynamique peut s'executer sans MPI (sur 1 proc)
  • L'OPENMP fonctionne maintenant sans la parallelisation MPI.

YM
LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk/libf/dyn3dpar/mod_const_para.F90

    r985 r1000  
    1111
    1212    IMPLICIT NONE
     13#ifdef CPP_MPI
    1314    INCLUDE 'mpif.h'
     15#endif
    1416    INTEGER             :: ierr
    1517    INTEGER             :: comp_id
     
    3032       CALL prism_get_localcomm_proto(COMM_LMDZ,ierr)
    3133!$OMP END MASTER
     34#ifdef CPP_MPI
     35      COMM_LMDZ=MPI_COMM_WORLD
     36      MPI_REAL_LMDZ=MPI_REAL8
     37#endif
    3238#endif
    3339    ELSE
     40      CALL init_mpi
     41    ENDIF
     42
     43  END SUBROUTINE Init_const_mpi
     44 
     45  SUBROUTINE Init_mpi
     46  IMPLICIT NONE
     47#ifdef CPP_MPI
     48     INCLUDE 'mpif.h'
     49#endif
     50    INTEGER             :: ierr
     51    INTEGER             :: thread_required
     52    INTEGER             :: thread_provided
     53
     54#ifdef CPP_MPI
    3455!$OMP MASTER
    35        thread_required=MPI_THREAD_SERIALIZED
    36        CALL MPI_INIT_THREAD(thread_required,thread_provided,ierr)
    37        IF (thread_provided < thread_required) THEN
    38          CALL abort_gcm('The multithreaded level of MPI librairy do not provide the requiered level', &
    39                         'mod_const_mpi::Init_const_mpi',1)
    40        ENDIF
    41        COMM_LMDZ=MPI_COMM_WORLD
     56      thread_required=MPI_THREAD_SERIALIZED
     57
     58      CALL MPI_INIT_THREAD(thread_required,thread_provided,ierr)
     59      IF (thread_provided < thread_required) THEN
     60        PRINT *,'Warning : The multithreaded level of MPI librairy do not provide the requiered level',  &
     61                ' in mod_const_mpi::Init_const_mpi'
     62      ENDIF
     63      COMM_LMDZ=MPI_COMM_WORLD
     64      MPI_REAL_LMDZ=MPI_REAL8
    4265!$OMP END MASTER
    43     END IF
     66#endif
    4467
    45     MPI_REAL_LMDZ=MPI_REAL8
    46   END SUBROUTINE Init_const_mpi
    47 
     68   END SUBROUTINE Init_mpi
     69   
    4870END MODULE mod_const_mpi
Note: See TracChangeset for help on using the changeset viewer.