New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 6748 for branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90 – NEMO

Ignore:
Timestamp:
2016-06-28T11:53:56+02:00 (8 years ago)
Author:
mocavero
Message:

GYRE hybrid parallelization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90

    r6140 r6748  
    146146      ! N.B. tmask has already the right boundary conditions since mbathy is ok 
    147147      ! 
    148       tmask(:,:,:) = 0._wp 
     148!$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
    149149      DO jk = 1, jpk 
    150150         DO jj = 1, jpj 
    151151            DO ji = 1, jpi 
     152               tmask(ji,jj,jk) = 0._wp 
    152153               IF( REAL( mbathy(ji,jj) - jk, wp ) + 0.1_wp >= 0._wp )   tmask(ji,jj,jk) = 1._wp 
    153154            END DO   
     
    156157       
    157158      ! (ISF) define barotropic mask and mask the ice shelf point 
     159!$OMP PARALLEL WORKSHARE 
    158160      ssmask(:,:)=tmask(:,:,1) ! at this stage ice shelf is not masked 
    159        
     161!$OMP END PARALLEL WORKSHARE       
     162!$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
    160163      DO jk = 1, jpk 
    161164         DO jj = 1, jpj 
     
    170173      ! Interior domain mask (used for global sum) 
    171174      ! -------------------- 
     175!$OMP PARALLEL WORKSHARE 
    172176      tmask_i(:,:) = ssmask(:,:)            ! (ISH) tmask_i = 1 even on the ice shelf 
    173177 
    174178      tmask_h(:,:) = 1._wp                 ! 0 on the halo and 1 elsewhere 
     179!$OMP END PARALLEL WORKSHARE 
    175180      iif = jpreci                         ! ??? 
    176181      iil = nlci - jpreci + 1 
     
    206211      ! 2. Ocean/land mask at u-,  v-, and z-points (computed from tmask) 
    207212      ! ------------------------------------------- 
     213!$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
    208214      DO jk = 1, jpk 
    209215         DO jj = 1, jpjm1 
     
    219225      END DO 
    220226      ! (ISF) MIN(1,SUM(umask)) is here to check if you have effectively at least 1 wet cell at u point 
     227!$OMP PARALLEL DO schedule(static) private(jj, ji) 
    221228      DO jj = 1, jpjm1 
    222229         DO ji = 1, fs_jpim1   ! vector loop 
     
    241248      wumask(:,:,1) = umask(:,:,1) 
    242249      wvmask(:,:,1) = vmask(:,:,1) 
     250!$OMP PARALLEL DO schedule(static) private(jk) 
    243251      DO jk = 2, jpk                   ! interior values 
    244252         wmask (:,:,jk) = tmask(:,:,jk) * tmask(:,:,jk-1) 
     
    249257      ! Lateral boundary conditions on velocity (modify fmask) 
    250258      ! ---------------------------------------      
     259!$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
    251260      DO jk = 1, jpk 
    252261         zwf(:,:) = fmask(:,:,jk)          
Note: See TracChangeset for help on using the changeset viewer.