Changeset 75


Ignore:
Timestamp:
06/28/16 18:04:12 (8 years ago)
Author:
dumas
Message:

OpenMP parallelization in remplimat-shelves-tabTu.f90 and simplified compilation options

Location:
trunk/SOURCES
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SOURCES/Ant40_files/lect-anteis_mod.f90

    r46 r75  
    3737 
    3838    integer :: ios 
     39    ! pour les lectures ncdf 
     40    real*8, dimension(:,:),   pointer    :: tab               !< tableau 2d real pointer 
    3941 
    4042    namelist/topo_file/topo_ref,topo_dep,grid_topo,ghf_fich 
     
    101103    ! voir init_iso et a avoir une surface de reference pour les temperatures 
    102104    ! lecture adaptee aux fichiers ZBL.dat ou netcdf ou grd 
    103     call lect_input(1,'Bsoc',1,Bsoc0,topo_ref,file_ncdf)    ! socle 
    104     call lect_input(1,'S',1,S0,topo_ref,file_ncdf)          ! surface 
    105     call lect_input(1,'H',1,H0,topo_ref,file_ncdf)          ! epaisseur 
     105!    call lect_input(1,'Bsoc',1,Bsoc0,topo_ref,file_ncdf)    ! socle 
     106!    call lect_input(1,'S',1,S0,topo_ref,file_ncdf)          ! surface 
     107!    call lect_input(1,'H',1,H0,topo_ref,file_ncdf)          ! epaisseur 
     108 
     109! lecture pour eviter plantage avec compile -O0 
     110     call Read_Ncdf_var('Bsoc',topo_ref,tab) 
     111     Bsoc0(:,:)  = tab(:,:) 
     112     call Read_Ncdf_var('S',topo_ref,tab) 
     113     S0(:,:)  = tab(:,:) 
     114     call Read_Ncdf_var('H',topo_ref,tab) 
     115     H0(:,:)  = tab(:,:) 
    106116!cdc correction point pole sud : 
    107117!    S0(71,71)=(S0(71,70)+S0(71,72)+S0(70,71)+S0(72,71))/4. 
     
    127137    !     --------------------------- 
    128138    ! lecture adaptee aux fichiers ZBL.dat ou netcdf ou grd 
    129     call lect_input(1,'Bsoc',1,Bsoc,topo_dep,file_ncdf)    ! socle 
    130     call lect_input(1,'S',1,S,topo_dep,file_ncdf)          ! surface 
    131     call lect_input(1,'H',1,H,topo_dep,file_ncdf)          ! epaisseur 
     139!    call lect_input(1,'Bsoc',1,Bsoc,topo_dep,file_ncdf)    ! socle 
     140!    call lect_input(1,'S',1,S,topo_dep,file_ncdf)          ! surface 
     141!    call lect_input(1,'H',1,H,topo_dep,file_ncdf)          ! epaisseur 
     142    ! lecture pour eviter plantage avec compile -O0 
     143     call Read_Ncdf_var('Bsoc',topo_dep,tab) 
     144     Bsoc(:,:)  = tab(:,:) 
     145     call Read_Ncdf_var('S',topo_dep,tab) 
     146     S(:,:)  = tab(:,:) 
     147     call Read_Ncdf_var('H',topo_dep,tab) 
     148     H(:,:)  = tab(:,:) 
     149     
    132150!    S(71,71)=(S(71,70)+S(71,72)+S(70,71)+S(72,71))/4. 
    133151!    Bsoc(71,71)=(Bsoc(71,70)+Bsoc(71,72)+Bsoc(70,71)+Bsoc(72,71))/4. 
     
    242260!    close(88) 
    243261 
    244     call lect_input(1,'ghf',1,ghf,ghf_fich,file_ncdf) 
     262!    call lect_input(1,'ghf',1,ghf,ghf_fich,file_ncdf) 
     263    ! pour eviter plantage -O0 
     264    call Read_Ncdf_var('ghf',ghf_fich,tab) 
     265    ghf(:,:)  = tab(:,:) 
    245266 
    246267    ! pour passer les flux des mW/m2 au J/m2/an       
  • trunk/SOURCES/Fichiers-parametres/Makefile.tof-lsce3130.inc

    r72 r75  
    2828 
    2929# librairies 
    30         NCDF_INC  = $(NETCDFHOME)/include 
     30        NCDF_INC  = -I$(NETCDFHOME)/include 
    3131        NCDF_LIB  = -L$(NETCDFHOME)/lib -lnetcdf -lnetcdff 
    3232 
    3333# utilisation de MKL : 
    3434        ifeq ($(mkl_c), 1) 
    35                 MKL_LIB = -L$MKLROOT/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread 
    36                 export $MKL_LIB 
     35                MKL_LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm  # MKL parallele 
     36#               MKL_LIB =  -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm           # MKL sequentiel 
     37                MKL_INC = -I$(MKLROOT)/include 
    3738        endif 
    3839 
    3940        IFORT= ifort 
    4041 
    41         ARITHMi    = -O2 -fp-model precise  -heap-arrays -traceback -mcmodel=medium  #-openmp #  -warn -traceback   -CB  -g  # options pour une meilleure arithmetique 
     42        ARITHMi = -O2 -fp-model precise 
    4243                                                                      # (normalement reproductible) 
    4344    ifeq ($(debug), 1) 
    44                 ARITHM    = $(ARITHMi) -CB -g -p -traceback -warn all -openmp 
     45                ARITHM    = $(ARITHMi) -CB -g -p -traceback -warn all  #-openmp 
    4546        else 
    4647                ARITHM    = $(ARITHMi) -diag-disable warn 
     
    5051# ARITHM = -03                    # trop brutal ne pas utiliser 
    5152 
    52         FT        = $(IFORT) $(ARITHM) #-traceback   -CB  #-g #-pg  # -g # -pg -ipo !aurel : j'ai enleve -CB 
     53        FT        = $(IFORT) $(ARITHM) $(MKL_INC) #-traceback   -CB  #-g #-pg  # -g # -pg -ipo !aurel : j'ai enleve -CB 
    5354        LK        = $(IFORT) $(ARITHM) -i_dynamic # -traceback   -CB # -g  #-pg   #-g #  -pg 
    54         NETCDFINCLUDE = -I$(NCDF_INC) 
    5555        F_NETCDF  = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) # -traceback  -CB   #-g #-pg -ipo # -g 
    5656        #FT        = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) # -traceback  -CB  #-g #-pg -ipo # -g 
     
    7979        FT        = $(IFORT) $(ARITHM) -c 
    8080        LK        = $(IFORT) $(ARITHM) 
    81         NETCDFINCLUDE = -I$(NCDF_INC) 
    8281        F_NETCDF  = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) 
    8382endif 
  • trunk/SOURCES/Makefile.grisli.inc

    r68 r75  
    341341        echo 'entree fichier parametre par commande echo job' 
    342342 
    343          $(FT) $(NETCDFINCLUDE) -c initial-phy-2-job.f90 
     343         $(FT) $(NCDF_INC) -c initial-phy-2-job.f90 
    344344else     
    345345        echo ' fichier parametre defini par runname' 
    346          $(FT) $(NETCDFINCLUDE) -c initial-phy-2.f90 
     346         $(FT) $(NCDF_INC) -c initial-phy-2.f90 
    347347endif 
    348348 
    349349# Hemin40_files : 
    350350%.o: Hemin40_files/%.f90 
    351         $(FT) $(NETCDFINCLUDE) -c Hemin40_files/$*.f90 
     351        $(FT) $(NCDF_INC) -c Hemin40_files/$*.f90 
    352352 
    353353# Hemin15_files 
    354354%.o: Hemin15_files/%.f90 
    355         $(FT) $(NETCDFINCLUDE) -c Hemin15_files/$*.f90 
     355        $(FT) $(NCDF_INC) -c Hemin15_files/$*.f90 
    356356         
    357357# Antarctique_general_files 
    358358%.o: Antarctique_general_files/%.f90 
    359         $(FT) $(NETCDFINCLUDE) -c Antarctique_general_files/$*.f90 
     359        $(FT) $(NCDF_INC) -c Antarctique_general_files/$*.f90 
    360360         
    361361# GrIce2sea_files 
    362362%.o: GrIce2sea_files/%.f90 
    363         $(FT) $(NETCDFINCLUDE) -c GrIce2sea_files/$*.f90 
     363        $(FT) $(NCDF_INC) -c GrIce2sea_files/$*.f90 
    364364         
    365365# Ant40_files 
    366366%.o: Ant40_files/%.f90 
    367         $(FT) $(NETCDFINCLUDE) -c Ant40_files/$*.f90 
     367        $(FT) $(NCDF_INC) -c Ant40_files/$*.f90 
    368368         
    369369# ANT15-LBq_files 
    370370%.o: ANT15-LBq_files/%.f90 
    371         $(FT) $(NETCDFINCLUDE) -c ANT15-LBq_files/$*.f90 
     371        $(FT) $(NCDF_INC) -c ANT15-LBq_files/$*.f90 
    372372         
    373373# Greeneem_files/Greeneem15_files 
    374374%.o: Greeneem_files/Greeneem15_files/%.f90 
    375         $(FT) $(NETCDFINCLUDE) -c Greeneem_files/Greeneem15_files/$*.f90 
     375        $(FT) $(NCDF_INC) -c Greeneem_files/Greeneem15_files/$*.f90 
    376376         
    377377# Greeneem_files 
    378378%.o: Greeneem_files/%.f90 
    379         $(FT) $(NETCDFINCLUDE) -c Greeneem_files/$*.f90 
     379        $(FT) $(NCDF_INC) -c Greeneem_files/$*.f90 
    380380                 
    381381# Draggings_modules 
    382382%.o: Draggings_modules/%.f90 
    383         $(FT) $(NETCDFINCLUDE) -c Draggings_modules/$*.f90 
     383        $(FT) $(NCDF_INC) -c Draggings_modules/$*.f90 
    384384         
    385385# Snowball_files 
    386386%.o: Snowball_files/%.f90 
    387         $(FT) $(NETCDFINCLUDE) -c Snowball_files/$*.f90 
     387        $(FT) $(NCDF_INC) -c Snowball_files/$*.f90 
    388388         
    389389         
    390390# subroutines communes : 
    391391%.o: %.f90 
    392         $(FT) $(NETCDFINCLUDE) -c $*.f90 
     392        $(FT) $(NCDF_INC) -c $*.f90 
    393393         
    394394# New-remplimat : 
    395395%.o : New-remplimat/%.f90 
    396         $(FT) $(NETCDFINCLUDE) -c New-remplimat/$*.f90 
     396        $(FT) $(NCDF_INC) -c New-remplimat/$*.f90 
    397397         
    398398# Netcdf-routines : 
    399399%.o: Netcdf-routines/%.f90 
    400         $(FT) $(NETCDFINCLUDE) -c Netcdf-routines/$*.f90 
     400        $(FT) $(NCDF_INC) -c Netcdf-routines/$*.f90 
    401401         
    402402#toy_recul : 
    403403%.o: Recul_force_grounding_line/%.f90 
    404         $(FT) $(NETCDFINCLUDE) -c Recul_force_grounding_line/$*.f90 
     404        $(FT) $(NCDF_INC) -c Recul_force_grounding_line/$*.f90 
    405405         
    406406#Temperature : 
    407407%.o : Temperature-routines/%.f90 
    408         $(FT) $(NETCDFINCLUDE) -c Temperature-routines/$*.f90 
     408        $(FT) $(NCDF_INC) -c Temperature-routines/$*.f90 
    409409         
    410410# BLAS : 
  • trunk/SOURCES/New-remplimat/remplimat-shelves-tabTu.f90

    r74 r75  
    10431043subroutine Mu_Mv 
    10441044 
     1045!$ USE OMP_LIB 
    10451046!---------------------------------------------------------   
    10461047! Pour déterminer  Mu, Mv, Nu, Nv les colonnes de L2 
     
    10501051! pourrait être dans un autre fichier 
    10511052 
     1053implicit none 
     1054 
    10521055if (itracebug.eq.1)  call tracebug(' Mu_Mv') 
    10531056 
     1057!$OMP PARALLEL 
     1058!$OMP DO PRIVATE(ilmin,ilmax,jlmin,jlmax) 
    10541059Col_U: do j=ny1,ny2   ! balaye tous les noeuds U 
    10551060   do i=nx1+1,nx2 
     
    10771082   end do 
    10781083end do Col_U 
    1079  
     1084!$OMP END DO 
     1085 
     1086!$OMP DO PRIVATE(ilmin,ilmax,jlmin,jlmax) 
    10801087Col_V: do j=ny1+1,ny2   ! balaye tous les noeuds V 
    10811088   do i=nx1,nx2 
     
    11021109   end do 
    11031110end do Col_V 
     1111!$OMP END DO 
     1112!$OMP END PARALLEL 
    11041113 
    11051114return 
     
    11101119subroutine okmat0        
    11111120 
     1121!$ USE OMP_LIB  
    11121122! pourrais être dans un autre fichier avec un appel (nx1,nx2,ny1,ny2) 
    11131123 
     
    11171127! et qui ne dépendent d'aucun noeud (ligne Tu,Tv nulle sauf diagonale) 
    11181128 
    1119  
     1129implicit none 
    11201130 
    11211131! tableaux de travail 
     
    11371147pvi_ghost=40.*pvimin 
    11381148!pvi_ghost=10.*pvimin   ! condition trop faible  : pas de ghost 
    1139  
     1149!$OMP PARALLEL 
     1150!$OMP WORKSHARE 
    11401151ok_umat(:,:) =.false. 
    11411152ok_vmat(:,:) =.false. 
    11421153ghost_x(:,:) =.false.  
    11431154ghost_y(:,:) =.false. 
    1144  
    1145  
     1155!$OMP END WORKSHARE 
     1156 
     1157!$OMP DO PRIVATE(Mloc,Nloc,Tuloc,Tvloc,Suloc,Svloc) 
    11461158do j=ny1,ny2 
    11471159   do i=nx1,nx2 
     
    12401252   end do 
    12411253end do 
    1242  
     1254!$OMP END DO  
    12431255 
    12441256! on enleve les lignes 1 decalees 
     1257!$OMP WORKSHARE 
    12451258ok_umat(1,:)=.false. 
    12461259ok_vmat(:,1)=.false. 
     1260!$OMP END WORKSHARE 
     1261!$OMP END PARALLEL 
    12471262 
    12481263! sortie Netcdf pour verifier ok_umat 
    1249 where (ok_umat(:,:)) 
    1250    debug_3D(:,:,39)=1 
    1251 elsewhere 
    1252    debug_3D(:,:,39)=0 
    1253 end where 
    1254  
    1255 where (ok_vmat(:,:)) 
    1256    debug_3D(:,:,40)=1 
    1257 elsewhere 
    1258    debug_3D(:,:,40)=0 
    1259 end where 
    1260  
    1261 ! sortie Netcdf pour verifier ghost 
    1262 where (ghost_x(:,:)) 
    1263    debug_3D(:,:,41)=1 
    1264 elsewhere 
    1265    debug_3D(:,:,41)=0 
    1266  
    1267 end where 
    1268  
    1269 where (ghost_y(:,:)) 
    1270    debug_3D(:,:,42)=1 
    1271 elsewhere 
    1272    debug_3D(:,:,42)=0 
    1273 end where 
     1264!~ where (ok_umat(:,:)) 
     1265!~    debug_3D(:,:,39)=1 
     1266!~ elsewhere 
     1267!~    debug_3D(:,:,39)=0 
     1268!~ end where 
     1269!~  
     1270!~ where (ok_vmat(:,:)) 
     1271!~    debug_3D(:,:,40)=1 
     1272!~ elsewhere 
     1273!~    debug_3D(:,:,40)=0 
     1274!~ end where 
     1275!~  
     1276!~ ! sortie Netcdf pour verifier ghost 
     1277!~ where (ghost_x(:,:)) 
     1278!~    debug_3D(:,:,41)=1 
     1279!~ elsewhere 
     1280!~    debug_3D(:,:,41)=0 
     1281!~  
     1282!~ end where 
     1283!~  
     1284!~ where (ghost_y(:,:)) 
     1285!~    debug_3D(:,:,42)=1 
     1286!~ elsewhere 
     1287!~    debug_3D(:,:,42)=0 
     1288!~ end where 
    12741289 
    12751290if (itracebug.eq.1)  call tracebug(' Sortie  Okmat') 
     
    12791294!-------------------------------------------------------------------------------------- 
    12801295subroutine ghost_identite                           ! mise a identite des noeuds fantomes 
    1281  
     1296!$ USE OMP_LIB 
     1297 
     1298implicit none 
     1299 
     1300!$OMP PARALLEL 
     1301!$OMP DO 
    12821302do j=ny1,ny2 
    12831303   do i=nx1,nx2 
     
    13001320   end do 
    13011321end do 
     1322!$OMP END DO 
     1323!$OMP END PARALLEL 
    13021324 
    13031325return 
     
    13061328 
    13071329subroutine ghost_remove                   ! met a 0 les Tuij ... qui corresponde a des ghost 
    1308  
     1330!$ USE OMP_LIB 
     1331 
     1332implicit none 
     1333 
     1334!$OMP PARALLEL 
     1335!$OMP DO PRIVATE(ilmin,ilmax,jlmin,jlmax) 
    13091336do j=ny1,ny2 
    1310    do i=nx1,nx2 
     1337  do i=nx1,nx2 
    13111338 
    13121339!u_ghost:       if (ok_umat(i,j)) then 
    13131340 
    13141341 
    1315                ilmin=max(-1,nx1+1-i)  ! pour avoir i+il entre nx1+1 et nx2 
    1316                ilmax=min(1,nx2-i) 
    1317  
    1318                jlmin=max(-1,ny1-j)    ! pour avoir j+jl entre ny1 et ny2 
    1319                jlmax=min(1,ny2-j) 
    1320  
    1321  
    1322  
    1323                do jl = jlmin , jlmax      ! balaye tous les coefficients d'un noeud U de -1 a 1 
    1324                   do il = ilmin , ilmax   !                                           de -1 a 1  
    1325  
    1326                      if (ghost_x(i+il,j+jl)) then 
    1327                         Tu(i,j,il,jl)=0. 
    1328                         Su(i,j,il,jl)=0. 
    1329                      end if 
    1330  
    1331                   end do 
    1332                end do 
     1342    ilmin=max(-1,nx1+1-i)  ! pour avoir i+il entre nx1+1 et nx2 
     1343    ilmax=min(1,nx2-i) 
     1344 
     1345    jlmin=max(-1,ny1-j)    ! pour avoir j+jl entre ny1 et ny2 
     1346    jlmax=min(1,ny2-j) 
     1347 
     1348    do jl = jlmin , jlmax      ! balaye tous les coefficients d'un noeud U de -1 a 1 
     1349      do il = ilmin , ilmax   !                                           de -1 a 1  
     1350        if (ghost_x(i+il,j+jl)) then 
     1351          Tu(i,j,il,jl)=0. 
     1352          Su(i,j,il,jl)=0. 
     1353        end if 
     1354    end do 
     1355    end do 
    13331356!            end if u_ghost 
    13341357 
    13351358!v_ghost:   if (ok_vmat(i,j)) then 
    13361359 
    1337                ilmin=max(-1,nx1-i)      ! pour avoir i+il entre nx1 et nx2 
    1338                ilmax=min(1,nx2-i) 
    1339  
    1340                jlmin=max(-1,ny1+1-j)    ! pour avoir j+jl entre ny1+1 et ny2 
    1341                jlmax=min(1,ny2-j) 
    1342  
    1343                do jl = jlmin , jlmax      ! balaye tous les coefficients d'un noeud U de -1 a 1 
    1344                   do il = ilmin , ilmax   !                                           de -1 a 1  
    1345                      if (ghost_y(i+il,j+jl)) then 
    1346                         Tv(i,j,il,jl)=0. 
    1347                         Sv(i,j,il,jl)=0. 
    1348                      end if 
    1349                   end do 
    1350                end do 
    1351  
     1360    ilmin=max(-1,nx1-i)      ! pour avoir i+il entre nx1 et nx2 
     1361    ilmax=min(1,nx2-i) 
     1362 
     1363    jlmin=max(-1,ny1+1-j)    ! pour avoir j+jl entre ny1+1 et ny2 
     1364    jlmax=min(1,ny2-j) 
     1365 
     1366    do jl = jlmin , jlmax      ! balaye tous les coefficients d'un noeud U de -1 a 1 
     1367      do il = ilmin , ilmax   !                                           de -1 a 1  
     1368        if (ghost_y(i+il,j+jl)) then 
     1369          Tv(i,j,il,jl)=0. 
     1370          Sv(i,j,il,jl)=0. 
     1371        end if 
     1372      end do 
     1373    end do 
    13521374!            end if v_ghost 
    1353           
    1354          end do 
    1355       end do 
    1356     end subroutine ghost_remove 
     1375  end do 
     1376end do 
     1377!$OMP END DO 
     1378!$OMP END PARALLEL 
     1379end subroutine ghost_remove 
    13571380!---------------------------------------------------------------------------------------- 
    13581381subroutine calc_beta(uxgiven,uygiven)         ! calcule betamx et betamy 
    1359                                               ! a partir du champ de vitesse 
     1382!$USE OMP_LIB                                 ! a partir du champ de vitesse 
    13601383                                              ! uxprec, uyprec 
    13611384implicit none 
     
    13661389real                   :: betamin = 10.       ! minimum value on grounded point (in Pa an /m) 
    13671390 
    1368 debug_3D(:,:,69)=uxgiven(:,:) 
    1369 debug_3D(:,:,70)=uygiven(:,:) 
     1391!debug_3D(:,:,69)=uxgiven(:,:) 
     1392!debug_3D(:,:,70)=uygiven(:,:) 
    13701393 
    13711394                    
    13721395if (itracebug.eq.1)  call tracebug(' Subroutine calc_beta') 
    13731396 
     1397!$OMP PARALLEL 
     1398!$OMP DO 
    13741399do j=ny1+1,ny2-1  
    13751400   do i=nx1+1,nx2-1 
     
    13841409                                      +Tv(i,j,il,jl)*uygiven(i+il,j+jl))  
    13851410 
    1386             debug_3D(i,j,82)=debug_3D(i,j,82) + (Tu(i,j,il,jl)*uxgiven(i+il,j+jl) &  
    1387                                       +Tv(i,j,il,jl)*uygiven(i+il,j+jl))  
     1411!            debug_3D(i,j,82)=debug_3D(i,j,82) + (Tu(i,j,il,jl)*uxgiven(i+il,j+jl) &  
     1412!                                      +Tv(i,j,il,jl)*uygiven(i+il,j+jl))  
    13881413 
    13891414         end do 
    13901415      end do 
    13911416 
    1392       debug_3D(i,j,82)=debug_3D(i,j,82)/dx/dx   ! longitudinal stress computed from velocities 
     1417!      debug_3D(i,j,82)=debug_3D(i,j,82)/dx/dx   ! longitudinal stress computed from velocities 
    13931418 
    13941419 
     
    14161441   
    14171442      betamy(i,j)=-opposy(i,j) 
    1418       debug_3D(i,j,36) = opposy(i,j)/dx/dx      ! driving stress ou pression hydrostatique (Pa) 
     1443!      debug_3D(i,j,36) = opposy(i,j)/dx/dx      ! driving stress ou pression hydrostatique (Pa) 
    14191444      do jl=-1,1 
    14201445         do il=-1,1 
     
    14231448                                      +Sv(i,j,il,jl)*uygiven(i+il,j+jl)) 
    14241449 
    1425             debug_3D(i,j,83)=debug_3D(i,j,83) + (Su(i,j,il,jl)*uxgiven(i+il,j+jl) &  
    1426                                       +Sv(i,j,il,jl)*uygiven(i+il,j+jl)) 
     1450!            debug_3D(i,j,83)=debug_3D(i,j,83) + (Su(i,j,il,jl)*uxgiven(i+il,j+jl) &  
     1451!                                      +Sv(i,j,il,jl)*uygiven(i+il,j+jl)) 
    14271452 
    14281453          
     
    14301455      end do 
    14311456 
    1432       debug_3D(i,j,83)=debug_3D(i,j,83) /dx/dx  ! longitudinal stress computed from velocities 
     1457!      debug_3D(i,j,83)=debug_3D(i,j,83) /dx/dx  ! longitudinal stress computed from velocities 
    14331458 
    14341459!  fonctionne même quand frotmx n'est pas nul 
     
    14531478   end do 
    14541479end do 
    1455  
     1480!$OMP END DO 
     1481!$OMP END PARALLEL 
    14561482! loop to spread negative beta on the neighbours 
    14571483 
     
    14721498 
    14731499! average 
    1474     beta_centre(:,:)=0. 
    1475     do j=2,ny-1 
    1476        do i=2,nx-1 
    1477           beta_centre(i,j) = ((betamx(i,j)+betamx(i+1,j)) & 
    1478                + (betamy(i,j)+betamy(i,j+1)))*0.25 
    1479        end do 
    1480     end do 
    1481  
     1500!$OMP PARALLEL 
     1501!$OMP WORKSHARE 
     1502beta_centre(:,:)=0. 
     1503!$OMP END WORKSHARE 
     1504!$OMP DO 
     1505do j=2,ny-1 
     1506  do i=2,nx-1 
     1507    beta_centre(i,j) = ((betamx(i,j)+betamx(i+1,j)) & 
     1508          + (betamy(i,j)+betamy(i,j+1)))*0.25 
     1509  end do 
     1510end do 
     1511!$OMP END DO 
     1512!$OMP END PARALLEL 
    14821513 
    14831514 
Note: See TracChangeset for help on using the changeset viewer.