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/tridia_solver.f90

    r1217 r1221  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! dummy argument tri in 1d-routines replaced by tri_for_1d because of name
     23! conflict with arry tri in module arrays_3d
    2324!
    2425! Former revisions:
     
    382383
    383384
    384     SUBROUTINE tridia_1dd( ddx2, ddy2, nx, ny, j, ar, tri )
     385    SUBROUTINE tridia_1dd( ddx2, ddy2, nx, ny, j, ar, tri_for_1d )
    385386
    386387!------------------------------------------------------------------------------!
     
    408409
    409410       REAL, DIMENSION(0:nx,1:nz)     ::  ar
    410        REAL, DIMENSION(5,0:nx,0:nz-1) ::  tri
     411       REAL, DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d
    411412
    412413
     
    424425       DO  k = 0, nz-1
    425426          DO  i = 0,nx
    426              tri(2,i,k) = ddzu_pres(k+1) * ddzw(k+1)
    427              tri(3,i,k) = ddzu_pres(k+2) * ddzw(k+1)
     427             tri_for_1d(2,i,k) = ddzu_pres(k+1) * ddzw(k+1)
     428             tri_for_1d(3,i,k) = ddzu_pres(k+2) * ddzw(k+1)
    428429          ENDDO
    429430       ENDDO
     
    433434       IF ( j <= nnyh )  THEN
    434435#if defined( __intel11 )
    435           CALL maketri_1dd( j, tri )
     436          CALL maketri_1dd( j, tri_for_1d )
    436437#else
    437438          CALL maketri_1dd( j )
     
    439440       ELSE
    440441#if defined( __intel11 )
    441           CALL maketri_1dd( ny+1-j, tri )
     442          CALL maketri_1dd( ny+1-j, tri_for_1d )
    442443#else
    443444          CALL maketri_1dd( ny+1-j )
     
    445446       ENDIF
    446447#if defined( __intel11 )
    447        CALL split_1dd( tri )
     448       CALL split_1dd( tri_for_1d )
    448449#else
    449450       CALL split_1dd
    450451#endif
    451        CALL substi_1dd( ar, tri )
     452       CALL substi_1dd( ar, tri_for_1d )
    452453
    453454    CONTAINS
    454455
    455456#if defined( __intel11 )
    456        SUBROUTINE maketri_1dd( j, tri )
     457       SUBROUTINE maketri_1dd( j, tri_for_1d )
    457458#else
    458459       SUBROUTINE maketri_1dd( j )
     
    473474
    474475#if defined( __intel11 )
    475           REAL, DIMENSION(5,0:nx,0:nz-1) ::  tri
     476          REAL, DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d
    476477#endif
    477478
     
    502503                a = -1.0 * ddzu_pres(k+2) * ddzw(k+1)
    503504                c = -1.0 * ddzu_pres(k+1) * ddzw(k+1)
    504                 tri(1,i,k) = a + c - l(i)
     505                tri_for_1d(1,i,k) = a + c - l(i)
    505506             ENDDO
    506507          ENDDO
    507508          IF ( ibc_p_b == 1 )  THEN
    508509             DO  i = 0, nx
    509                 tri(1,i,0) = tri(1,i,0) + tri(2,i,0)
     510                tri_for_1d(1,i,0) = tri_for_1d(1,i,0) + tri_for_1d(2,i,0)
    510511             ENDDO
    511512          ENDIF
    512513          IF ( ibc_p_t == 1 )  THEN
    513514             DO  i = 0, nx
    514                 tri(1,i,nz-1) = tri(1,i,nz-1) + tri(3,i,nz-1)
     515                tri_for_1d(1,i,nz-1) = tri_for_1d(1,i,nz-1) + tri_for_1d(3,i,nz-1)
    515516             ENDDO
    516517          ENDIF
     
    520521
    521522#if defined( __intel11 )
    522        SUBROUTINE split_1dd( tri )
     523       SUBROUTINE split_1dd( tri_for_1d )
    523524#else
    524525       SUBROUTINE split_1dd
     
    534535
    535536#if defined( __intel11 )
    536           REAL, DIMENSION(5,0:nx,0:nz-1) ::  tri
     537          REAL, DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d
    537538#endif
    538539
     
    541542!--       Splitting
    542543          DO  i = 0, nx
    543              tri(4,i,0) = tri(1,i,0)
     544             tri_for_1d(4,i,0) = tri_for_1d(1,i,0)
    544545          ENDDO
    545546          DO  k = 1, nz-1
    546547             DO  i = 0, nx
    547                 tri(5,i,k) = tri(2,i,k) / tri(4,i,k-1)
    548                 tri(4,i,k) = tri(1,i,k) - tri(3,i,k-1) * tri(5,i,k)
     548                tri_for_1d(5,i,k) = tri_for_1d(2,i,k) / tri_for_1d(4,i,k-1)
     549                tri_for_1d(4,i,k) = tri_for_1d(1,i,k) - tri_for_1d(3,i,k-1) * tri_for_1d(5,i,k)
    549550             ENDDO
    550551          ENDDO
     
    553554
    554555
    555        SUBROUTINE substi_1dd( ar, tri )
     556       SUBROUTINE substi_1dd( ar, tri_for_1d )
    556557
    557558!------------------------------------------------------------------------------!
     
    565566          REAL, DIMENSION(0:nx,nz)       ::  ar
    566567          REAL, DIMENSION(0:nx,0:nz-1)   ::  ar1
    567           REAL, DIMENSION(5,0:nx,0:nz-1) ::  tri
     568          REAL, DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d
    568569
    569570!
     
    574575          DO  k = 1, nz-1
    575576             DO  i = 0, nx
    576                 ar1(i,k) = ar(i,k+1) - tri(5,i,k) * ar1(i,k-1)
     577                ar1(i,k) = ar(i,k+1) - tri_for_1d(5,i,k) * ar1(i,k-1)
    577578             ENDDO
    578579          ENDDO
     
    584585!--       the model domain.
    585586          DO  i = 0, nx
    586              ar(i,nz) = ar1(i,nz-1) / ( tri(4,i,nz-1) + 1.0E-20 )
     587             ar(i,nz) = ar1(i,nz-1) / ( tri_for_1d(4,i,nz-1) + 1.0E-20 )
    587588          ENDDO
    588589          DO  k = nz-2, 0, -1
    589590             DO  i = 0, nx
    590                 ar(i,k+1) = ( ar1(i,k) - tri(3,i,k) * ar(i,k+2) ) &
    591                             / tri(4,i,k)
     591                ar(i,k+1) = ( ar1(i,k) - tri_for_1d(3,i,k) * ar(i,k+2) ) &
     592                            / tri_for_1d(4,i,k)
    592593             ENDDO
    593594          ENDDO
Note: See TracChangeset for help on using the changeset viewer.