Ignore:
Timestamp:
Mar 28, 2013, 12:41:27 PM (11 years ago)
Author:
Ehouarn Millour
Message:

Added test to stop if in OpenMP mode and trying to use adjust=y (which is not cleanly implemented); adjust=y should only be used in MPI mode (or in mixed MPI/OpenMP mode with only 1 thread).
EM

File:
1 edited

Legend:

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

    r1697 r1734  
    6161      LOGICAL  fxyhypbb, ysinuss
    6262      INTEGER i
    63      
     63      character(len=*),parameter :: modname="conf_gcm"
     64      character (len=80) :: abort_message
     65#ifdef CPP_OMP
     66      integer,external :: OMP_GET_NUM_THREADS
     67#endif
    6468c
    6569c  -------------------------------------------------------------------
     
    9094c   initialisations:
    9195c   ----------------
    92       adjust=.false.
    93       call getin('adjust',adjust)
    94      
    95       itaumax=0
    96       call getin('itaumax',itaumax);
    97       if (itaumax<=0) itaumax=HUGE(itaumax)
    9896     
    9997!Config  Key  = lunout
     
    108106     &          STATUS='unknown',FORM='formatted')
    109107      ENDIF
     108
     109      adjust=.false.
     110      call getin('adjust',adjust)
     111
     112#ifdef CPP_OMP
     113      ! adjust=y not implemented in case of OpenMP threads...
     114!$OMP PARALLEL
     115      if ((OMP_GET_NUM_THREADS()>1).and.adjust) then
     116        write(lunout,*)'conf_gcm: Error, adjust should be set to n'
     117     &,' when running with OpenMP threads'
     118        abort_message = 'Wrong value for adjust'
     119        call abort_gcm(modname,abort_message,1)
     120      endif
     121!$OMP END PARALLEL         
     122#endif
     123
     124      itaumax=0
     125      call getin('itaumax',itaumax);
     126      if (itaumax<=0) itaumax=HUGE(itaumax)
    110127
    111128!Config  Key  = prt_level
Note: See TracChangeset for help on using the changeset viewer.