Changeset 3613 for trunk


Ignore:
Timestamp:
Feb 7, 2025, 4:58:43 PM (24 hours ago)
Author:
afalco
Message:

Pluto: fixes for OpenMP.
AF

Location:
trunk
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/arch/arch-ifort_MESOIPSL.fcm

    r3079 r3613  
    55%MAKE                make
    66%FPP                 mpif90 -E
    7 %FPP_FLAGS           
     7%FPP_FLAGS
    88%CPP_FLAGS           -P
    99%FPP_DEF             NC_DOUBLE LAPACK FFT_MKL
     
    1616%C_OPTIM             -O3
    1717%MPI_FFLAGS
    18 %OMP_FFLAGS          -qopenmp 
     18%OMP_FFLAGS          -qopenmp
    1919%BASE_LD             -i4 -r8 -auto -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread
    2020%MPI_LD
    21 %OMP_LD              -qopenmp 
     21%OMP_LD              -qopenmp
  • trunk/LMDZ.PLUTO/libf/phypluto/callcorrk.F90

    r3592 r3613  
    221221
    222222      ! local variable
    223       REAL dpp  ! intermediate
     223      REAL, save :: dpp  ! intermediate
     224!$OMP THREADPRIVATE(dpp)
    224225
    225226      integer ok ! status (returned by NetCDF functions)
     
    461462               reffrad(:,:,1) = mp2m_rc_sph(:,:) * exp(5.*sig**2 / 2.)
    462463            elsewhere
    463                reffrad(:,:,1) = 0d0     
     464               reffrad(:,:,1) = 0d0
    464465            endwhere
    465466            if (exp(sig**2) - 1 > 0.1) then
    466467               nueffrad(:,:,1) = exp(sig**2) - 1
    467468            else
    468                nueffrad(:,:,1) = 0.1   
     469               nueffrad(:,:,1) = 0.1
    469470            endif
    470471            ! Fractal aerosols
     
    478479               nueffrad(:,:,2) = exp(sig**2) - 1
    479480            else
    480                nueffrad(:,:,2) = 0.1   
     481               nueffrad(:,:,2) = 0.1
    481482            endif
    482            
     483
    483484         else
    484485            do iaer=1,naerkind
     
    724725         end do
    725726         qvar(1)=qvar(2)
    726      
     727
    727728      else
    728729         do k=1,L_LEVELS
     
    736737
    737738      DO l=1,nlayer
    738          muvarrad(2*l)   = muvar(ig,nlayer+2-l)   
     739         muvarrad(2*l)   = muvar(ig,nlayer+2-l)
    739740         muvarrad(2*l+1) = (muvar(ig,nlayer+2-l)+muvar(ig,max(nlayer+1-l,1)))/2
    740741      END DO
     
    949950            nfluxtopv       = 0.0d0
    950951            fluxtopvdn      = 0.0d0
     952            nfluxtopv_nu(:) = 0.0d0
    951953            nfluxoutv_nu(:) = 0.0d0
    952954            nfluxgndv_nu(:) = 0.0d0
     955            fmnetv_nu(:,:)=0.0
    953956            do l=1,L_NLAYRAD
    954957               fmnetv(l)=0.0d0
    955                fmnetv_nu(l,:)=0.0d0
    956958               fluxupv(l)=0.0d0
    957959               fluxdnv(l)=0.0d0
  • trunk/LMDZ.PLUTO/libf/phypluto/callcorrk_pluto_mod.F90

    r3585 r3613  
    1414      use radinc_h
    1515      use radcommon_h
    16       use ioipsl_getincom
     16      use ioipsl_getin_p_mod, only: getin_p
    1717      use suaer_corrk_mod, only: suaer_corrk
    1818      use radii_mod, only: su_aer_radii,haze_reffrad_fix
     
    6868      REAL zzlev(ngrid,nlayer)             ! Altitude at the layer boundaries.
    6969      REAL pplev(ngrid,nlayer+1)           ! pres. level at GCM layer boundaries
    70  
     70
    7171      REAL pt(ngrid,nlayer)               ! air temperature (K)
    7272      REAL tsurf(ngrid)                     ! surface temperature (K)
     
    223223
    224224         if (is_master) print*, "callcorrk: Correlated-k data folder:",trim(datadir)
    225          call getin("corrkdir",corrkdir)
     225         call getin_p("corrkdir",corrkdir)
    226226         print*, "corrkdir = ",corrkdir
    227227         write( tmp1, '(i3)' ) L_NSPECTI
     
    248248               reffrad(:,:,1) = mp2m_rc_sph(:,:) * exp(5.*sig**2 / 2.)
    249249            ELSEWHERE
    250                reffrad(:,:,1) = 0d0         
     250               reffrad(:,:,1) = 0d0
    251251            ENDWHERE
    252252            nueffrad(:,:,1) = exp(sig**2) - 1
     
    259259            ENDWHERE
    260260            nueffrad(:,:,2) = exp(sig**2) - 1
    261            
     261
    262262           else
    263263            do iaer=1,naerkind
  • trunk/LMDZ.PLUTO/libf/phypluto/condense_n2.F90

    r3585 r3613  
    145145  SAVE ccond
    146146
    147   LOGICAL firstcall
    148   SAVE firstcall
     147  LOGICAL,SAVE :: firstcall=.true.
     148!$OMP THREADPRIVATE(firstcall)
    149149  REAL SSUM
    150150  EXTERNAL SSUM
  • trunk/LMDZ.PLUTO/libf/phypluto/diffusion_h.F90

    r3455 r3613  
    44       implicit none
    55
    6        real*8 Pdiff
    7        real*8 tdiffmin
    8        real*8 dzres
    9 !$OMP THREADPRIVATE(Pdiff,tdiffmin,dzres)
    10        parameter (Pdiff=1.)      ! pressure below which diffusion is computed
    11        parameter (tdiffmin=5d0)
    12        parameter (dzres=2d0)     ! grid resolution (km) for diffusion
     6       real*8, parameter :: Pdiff = 1. ! pressure below which diffusion is computed
     7       real*8, parameter :: tdiffmin = 5d0
     8       real*8, parameter :: dzres = 2d0 ! grid resolution (km) for diffusion
    139
    1410       end module diffusion_h
  • trunk/LMDZ.PLUTO/libf/phypluto/lymalpha.F90

    r3247 r3613  
    22      use datafile_mod
    33      use comcstfi_mod, only: pi
     4      use mod_phys_lmdz_para, only : is_master, bcast
     5
    46      implicit none
    57
     
    3335      REAL :: vectls
    3436      REAL :: vectflux
    35       LOGICAL firstcall
    36       SAVE firstcall
    37       DATA firstcall/.true./
     37      LOGICAL,SAVE :: firstcall=.true.
     38!$OMP THREADPRIVATE(firstcall)
    3839
    3940      !!read lyman alpha flux
     
    4344      character(len=100) :: file_path
    4445      real,save :: lsdat(Nfine),fluxdat(Nfine)
     46!$OMP THREADPRIVATE(lsdat,fluxdat)
     47
    4548
    4649!---------------- INPUT ------------------------------------------------
     
    4952        firstcall=.false.
    5053        file_path=trim(datadir)//'/sol_uv_flux.txt'
    51         print*,file_path
     54        if (is_master) print*,file_path
    5255        open(222,file=file_path,form='formatted')
     56
     57        if (is_master) then
    5358        do ifine=1,Nfine
    5459           read(222,*) lsdat(ifine), fluxdat(ifine)
    5560        enddo
    5661        close(222)
     62        endif ! is_master
     63
     64        call bcast(lsdat)
     65        call bcast(fluxdat)
    5766      ENDIF
    5867
     68
    5969      CALL interp_line(lsdat,fluxdat,Nfine,pls*180./pi,pflux,1)
    60       !write(*,*) 'flux=',pflux
     70      !if (is_master) write(*,*) 'flux=',pflux
    6171
    6272
  • trunk/LMDZ.PLUTO/libf/phypluto/phys_state_var_mod.F90

    r3572 r3613  
    7878      real,allocatable,dimension(:,:,:),save :: nueffrad ! Aerosol effective radius variance. By RW
    7979      real,allocatable,dimension(:,:,:),save :: reffrad
     80!$OMP THREADPRIVATE(nueffrad,reffrad)
    8081
    8182      real,dimension(:,:),allocatable,save :: dEzdiff   ! Turbulent diffusion heating (W.m-2)
  • trunk/LMDZ.PLUTO/libf/phypluto/suaer_corrk.F90

    r3585 r3613  
    136136                       TRIM(aersprop_file)
    137137            write(*,*)'Suaer fractal aerosols optical properties, using: ', &
    138                        TRIM(aerfprop_file) 
     138                       TRIM(aerfprop_file)
    139139         endif
    140140         ! Visible
     
    149149            lamrefir(iaer)  = 2.E-6    ! Reference wavelength for opacity IR (in the LEISA range)
    150150         enddo ! end iaer=1,naerkind
    151          
    152       else 
     151
     152      else
    153153         do iaer=1,naerkind
    154154            if (iaer.eq.1) then
Note: See TracChangeset for help on using the changeset viewer.