Ignore:
Timestamp:
Sep 10, 2013 8:59:13 AM (8 years ago)
Author:
raasch
Message:

New:


openACC porting of reduction operations
additional 3D-flag arrays for replacing the 2D-index arrays nzb_s_inner and nzb_diff_s_inner
(flow_statistics, init_grid, init_3d_model, modules, palm, pres, time_integration)

Changed:


for PGI/openACC performance reasons set default compile options for openACC to "-ta=nocache",
and set environment variable PGI_ACC_SYNCHRONOUS=1
(MAKE.inc.pgi.openacc, palm_simple_run)

wall_flags_0 changed to 32bit INTEGER, additional array wall_flags_00 introduced to hold
bits 32-63
(advec_ws, init_grid, modules, palm)

Errors:


dummy argument tri in 1d-routines replaced by tri_for_1d because of name
conflict with arry tri in module arrays_3d
(tridia_solver)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/init_grid.f90

    r1093 r1221  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! wall_flags_00 introduced to hold bits 32-63,
     23! additional 3D-flag arrays for replacing the 2D-index array nzb_s_inner in
     24! loops optimized for openACC (pres + flow_statistics)
    2325!
    2426! Former revisions:
     
    387389              nzb_diff_v(nysg:nyng,nxlg:nxrg),                              &
    388390              nzb_2d(nysg:nyng,nxlg:nxrg),                                  &
     391              rflags_s_inner(nzb:nzt+2,nysg:nyng,nxlg:nxrg),                &
     392              rflags_invers(nysg:nyng,nxlg:nxrg,nzb:nzt+2),                 &
    389393              wall_e_x(nysg:nyng,nxlg:nxrg),                                &
    390394              wall_e_y(nysg:nyng,nxlg:nxrg),                                &
     
    403407    nzb_v_inner = nzb;  nzb_v_outer = nzb
    404408    nzb_w_inner = nzb;  nzb_w_outer = nzb
     409
     410    rflags_s_inner = 1.0
     411    rflags_invers  = 1.0
    405412
    406413!
     
    854861         
    855862       ENDIF
     863!
     864!--    Set flag arrays to be used for masking of grid points
     865       DO  i = nxlg, nxrg
     866          DO  j = nysg, nyng
     867             DO  k = nzb, nzt+1
     868                IF ( k <= nzb_s_inner(j,i) )  rflags_s_inner(k,j,i) = 0.0
     869                IF ( k <= nzb_s_inner(j,i) )  rflags_invers(j,i,k)  = 0.0
     870             ENDDO
     871          ENDDO
     872       ENDDO
    856873#endif
    857874    ENDIF
     
    11071124!
    11081125!-- Allocate flags needed for masking walls.
    1109     ALLOCATE( wall_flags_0(nzb:nzt,nys:nyn,nxl:nxr) )
    1110     wall_flags_0 = 0
     1126    ALLOCATE( wall_flags_0(nzb:nzt,nys:nyn,nxl:nxr), &
     1127              wall_flags_00(nzb:nzt,nys:nyn,nxl:nxr) )
     1128    wall_flags_0  = 0
     1129    wall_flags_00 = 0
    11111130
    11121131    IF ( scalar_advec == 'ws-scheme' )  THEN
     
    13111330                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 31 )
    13121331                ELSE
    1313                    wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 32 )
     1332                   wall_flags_00(k,j,i) = IBSET( wall_flags_00(k,j,i), 0 )
    13141333                ENDIF
    13151334!
     
    13251344!--                because flux_t(nzb_w_inner(j,i)) is used for the tendency
    13261345!--                at k == nzb_w_inner(j,i)+1.
    1327                    wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 33 )
     1346                   wall_flags_00(k,j,i) = IBSET( wall_flags_00(k,j,i), 1 )
    13281347                   flag_set = .TRUE.
    13291348                ELSEIF ( k == nzb_w_inner(j,i) + 2 .OR. k == nzt - 1 )  THEN
    1330                    wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 34 )
     1349                   wall_flags_00(k,j,i) = IBSET( wall_flags_00(k,j,i), 2 )
    13311350                   flag_set = .TRUE.
    13321351                ELSEIF ( k > nzb_w_inner(j,i) .AND. .NOT. flag_set )  THEN
    1333                    wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 35 )
     1352                   wall_flags_00(k,j,i) = IBSET( wall_flags_00(k,j,i), 3 )
    13341353                ENDIF
    13351354
Note: See TracChangeset for help on using the changeset viewer.