Changeset 884


Ignore:
Timestamp:
Feb 1, 2008, 1:17:58 PM (16 years ago)
Author:
Laurent Fairhead
Message:

Modifs pour faire tourner le meme executable en force ou couple JG
LF

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

Legend:

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

    r811 r884  
    88
    99  SUBROUTINE Init_const_mpi
    10   IMPLICIT NONE
     10    USE IOIPSL
     11
     12    IMPLICIT NONE
    1113    INCLUDE 'mpif.h'
    12     INTEGER :: ierr
    13     INTEGER :: comp_id
    14  
     14    INTEGER             :: ierr
     15    INTEGER             :: comp_id
     16    CHARACTER(len = 6)  :: ocean
     17
     18!$OMP MASTER
     19    ocean = 'force '
     20    CALL getin('OCEAN', ocean)
     21!$OMP END
     22
     23    IF (ocean=='couple') THEN
    1524#ifdef CPP_COUPLE
    16        call prism_init_comp_proto (comp_id, 'lmdz.x', ierr)
    17        call prism_get_localcomm_proto(COMM_LMDZ,ierr)
    18 #else     
    19       call MPI_INIT(ierr)
    20       COMM_LMDZ=MPI_COMM_WORLD
     25       CALL prism_init_comp_proto (comp_id, 'lmdz.x', ierr)
     26       CALL prism_get_localcomm_proto(COMM_LMDZ,ierr)
    2127#endif
     28    ELSE
     29       CALL MPI_INIT(ierr)
     30       COMM_LMDZ=MPI_COMM_WORLD
     31    END IF
    2232
    2333    MPI_REAL_LMDZ=MPI_REAL8
  • LMDZ4/trunk/libf/dyn3dpar/parallel.F90

    r811 r884  
    137137    use mod_prism_proto
    138138#endif
    139     implicit none
    140 
    141 #include "dimensions.h"
    142 #include "paramet.h"
     139      use surface_data, only : ocean
     140      implicit none
     141
     142      include "dimensions.h"
     143      include "paramet.h"
    143144      integer :: ierr
    144145      integer :: i
     
    149150      deallocate(jj_nb_para)
    150151
     152      if (ocean == 'couple') then
    151153#ifdef CPP_COUPLE
    152      call prism_terminate_proto(ierr)
    153      IF (ierr .ne. PRISM_Ok) THEN
    154        call abort_gcm('Finalize_parallel',' Probleme dans prism_terminate_proto ',1)
    155      endif
    156 #else         
    157       call MPI_FINALIZE(ierr)
    158 #endif
     154         call prism_terminate_proto(ierr)
     155         IF (ierr .ne. PRISM_Ok) THEN
     156            call abort_gcm('Finalize_parallel',' Probleme dans prism_terminate_proto ',1)
     157         endif
     158#endif
     159      else
     160         call MPI_FINALIZE(ierr)
     161      end if
    159162     
    160163    end subroutine Finalize_parallel
Note: See TracChangeset for help on using the changeset viewer.