Ignore:
Timestamp:
Jun 10, 2016 12:06:59 PM (5 years ago)
Author:
suehring
Message:

Rename multigrid into multigrid_noopt and multigrid_fast into multigrid, subroutines poismg is renamed into poismg_noopt and poismg_fast_mod into poismg_mod

File:
1 moved

Legend:

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

    r1930 r1931  
    1 !> @file poismg.f90
     1!> @file poismg_noopt.f90
    22!--------------------------------------------------------------------------------!
    33! This file is part of PALM.
     
    1919! Current revisions:
    2020! -----------------
    21 !
     21! Rename subroutines and cpu-measure log points to indicate _noopt version
    2222!
    2323! Former revisions:
     
    129129!> @todo Further work required.
    130130!------------------------------------------------------------------------------!
    131  SUBROUTINE poismg( r )
     131 SUBROUTINE poismg_noopt( r )
    132132 
    133133
     
    162162
    163163
    164     CALL cpu_log( log_point_s(29), 'poismg', 'start' )
     164    CALL cpu_log( log_point_s(29), 'poismg_noopt', 'start' )
    165165!
    166166!-- Initialize arrays and variables used in this subroutine
     
    206206               mgcycles < maximum_mgcycles )
    207207 
    208        CALL next_mg_level( d, p_loc, p3, r)
     208       CALL next_mg_level_noopt( d, p_loc, p3, r)
    209209
    210210!
     
    212212!--    cycles to be performed
    213213       IF ( maximum_mgcycles == 0 )  THEN
    214           CALL resid( d, p_loc, r )
     214          CALL resid_noopt( d, p_loc, r )
    215215          maxerror = SUM( r(nzb+1:nzt,nys:nyn,nxl:nxr)**2 )
    216216
     
    232232       IF ( mgcycles > 1000  .AND.  mg_cycles == -1 )  THEN
    233233          message_string = 'no sufficient convergence within 1000 cycles'
    234           CALL message( 'poismg', 'PA0283', 1, 2, 0, 6, 0 )
     234          CALL message( 'poismg_noopt', 'PA0283', 1, 2, 0, 6, 0 )
    235235       ENDIF
    236236
     
    244244    grid_level = 0
    245245
    246     CALL cpu_log( log_point_s(29), 'poismg', 'stop' )
    247 
    248  END SUBROUTINE poismg
     246    CALL cpu_log( log_point_s(29), 'poismg_noopt', 'stop' )
     247
     248 END SUBROUTINE poismg_noopt
    249249
    250250
     
    254254!> Computes the residual of the perturbation pressure.
    255255!------------------------------------------------------------------------------!
    256  SUBROUTINE resid( f_mg, p_mg, r )
     256 SUBROUTINE resid_noopt( f_mg, p_mg, r )
    257257
    258258
     
    391391
    392392
    393  END SUBROUTINE resid
     393 END SUBROUTINE resid_noopt
    394394
    395395
     
    400400!> scheme.
    401401!------------------------------------------------------------------------------!
    402  SUBROUTINE restrict( f_mg, r )
     402 SUBROUTINE restrict_noopt( f_mg, r )
    403403
    404404
     
    607607
    608608
    609 END SUBROUTINE restrict
     609END SUBROUTINE restrict_noopt
    610610
    611611
     
    616616!> to the next finer grid.
    617617!------------------------------------------------------------------------------!
    618  SUBROUTINE prolong( p, temp )
     618 SUBROUTINE prolong_noopt( p, temp )
    619619
    620620
     
    722722
    723723 
    724  END SUBROUTINE prolong
     724 END SUBROUTINE prolong_noopt
    725725
    726726
     
    731731!> 3D-Red-Black decomposition (GS-RB) is used.
    732732!------------------------------------------------------------------------------!
    733  SUBROUTINE redblack( f_mg, p_mg )
     733 SUBROUTINE redblack_noopt( f_mg, p_mg )
    734734
    735735
     
    821821          IF ( .NOT. unroll )  THEN
    822822
    823              CALL cpu_log( log_point_s(36), 'redblack_no_unroll', 'start' )
     823             CALL cpu_log( log_point_s(36), 'redblack_no_unroll_noopt', 'start' )
    824824
    825825!
     
    923923                ENDDO
    924924             ENDDO
    925              CALL cpu_log( log_point_s(36), 'redblack_no_unroll', 'stop' )
     925             CALL cpu_log( log_point_s(36), 'redblack_no_unroll_noopt', 'stop' )
    926926
    927927          ELSE
     
    929929!
    930930!--          Loop unrolling along y, only one i loop for better cache use
    931              CALL cpu_log( log_point_s(38), 'redblack_unroll', 'start' )
     931             CALL cpu_log( log_point_s(38), 'redblack_unroll_noopt', 'start' )
    932932             DO  ic = nxl_mg(l), nxr_mg(l), 2
    933933                DO  jc = nys_mg(l), nyn_mg(l), 4
     
    10901090                ENDDO
    10911091             ENDDO
    1092              CALL cpu_log( log_point_s(38), 'redblack_unroll', 'stop' )
     1092             CALL cpu_log( log_point_s(38), 'redblack_unroll_noopt', 'stop' )
    10931093
    10941094          ENDIF
     
    11741174
    11751175
    1176  END SUBROUTINE redblack
     1176 END SUBROUTINE redblack_noopt
    11771177
    11781178
     
    11831183!> Gather subdomain data from all PEs.
    11841184!------------------------------------------------------------------------------!
    1185  SUBROUTINE mg_gather( f2, f2_sub )
     1185 SUBROUTINE mg_gather_noopt( f2, f2_sub )
    11861186
    11871187    USE control_parameters,                                                    &
     
    12221222
    12231223#if defined( __parallel )
    1224     CALL cpu_log( log_point_s(34), 'mg_gather', 'start' )
     1224    CALL cpu_log( log_point_s(34), 'mg_gather_noopt', 'start' )
    12251225
    12261226    f2_l = 0.0_wp
     
    12551255                        nwords, MPI_REAL, MPI_SUM, comm2d, ierr )
    12561256
    1257     CALL cpu_log( log_point_s(34), 'mg_gather', 'stop' )
     1257    CALL cpu_log( log_point_s(34), 'mg_gather_noopt', 'stop' )
    12581258#endif
    12591259   
    1260  END SUBROUTINE mg_gather
     1260 END SUBROUTINE mg_gather_noopt
    12611261
    12621262
     
    12681268!>       non-blocking communication
    12691269!------------------------------------------------------------------------------!
    1270  SUBROUTINE mg_scatter( p2, p2_sub )
     1270 SUBROUTINE mg_scatter_noopt( p2, p2_sub )
    12711271
    12721272    USE control_parameters,                                                    &
     
    13001300
    13011301#if defined( __parallel )
    1302     CALL cpu_log( log_point_s(35), 'mg_scatter', 'start' )
     1302    CALL cpu_log( log_point_s(35), 'mg_scatter_noopt', 'start' )
    13031303
    13041304    p2_sub = p2(:,mg_loc_ind(3,myid)-1:mg_loc_ind(4,myid)+1, &
    13051305                  mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1)
    13061306
    1307     CALL cpu_log( log_point_s(35), 'mg_scatter', 'stop' )
     1307    CALL cpu_log( log_point_s(35), 'mg_scatter_noopt', 'stop' )
    13081308#endif
    13091309   
    1310  END SUBROUTINE mg_scatter
     1310 END SUBROUTINE mg_scatter_noopt
    13111311
    13121312
     
    13211321!> but leads to an increase in computing time.
    13221322!------------------------------------------------------------------------------!
    1323  RECURSIVE SUBROUTINE next_mg_level( f_mg, p_mg, p3, r )
     1323 RECURSIVE SUBROUTINE next_mg_level_noopt( f_mg, p_mg, p3, r )
    13241324
    13251325    USE control_parameters,                                                    &
     
    13831383       ngsrb = 2 * ngsrb
    13841384
    1385        CALL redblack( f_mg, p_mg )
     1385       CALL redblack_noopt( f_mg, p_mg )
    13861386
    13871387       ngsrb = ngsrb / 2
     
    13941394!
    13951395!--    Solution on the actual grid level
    1396        CALL redblack( f_mg, p_mg )
     1396       CALL redblack_noopt( f_mg, p_mg )
    13971397
    13981398!
    13991399!--    Determination of the actual residual
    1400        CALL resid( f_mg, p_mg, r )
     1400       CALL resid_noopt( f_mg, p_mg, r )
    14011401
    14021402!
     
    14411441                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) )
    14421442
    1443           CALL restrict( f2_sub, r )
     1443          CALL restrict_noopt( f2_sub, r )
    14441444
    14451445!
     
    14571457!
    14581458!--       Gather all arrays from the subdomains on PE0
    1459           CALL mg_gather( f2, f2_sub )
     1459          CALL mg_gather_noopt( f2, f2_sub )
    14601460
    14611461!
     
    15021502       ELSE
    15031503
    1504           CALL restrict( f2, r )
     1504          CALL restrict_noopt( f2, r )
    15051505
    15061506       ENDIF
     
    15101510!
    15111511!--    Repeat the same procedure till the coarsest grid is reached
    1512        CALL next_mg_level( f2, p2, p3, r )
     1512       CALL next_mg_level_noopt( f2, p2, p3, r )
    15131513
    15141514    ENDIF
     
    15311531                    mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1) )
    15321532
    1533           CALL mg_scatter( p2, p2_sub )
     1533          CALL mg_scatter_noopt( p2, p2_sub )
    15341534
    15351535!
     
    16011601          ENDIF
    16021602
    1603           CALL prolong( p2_sub, p3 )
     1603          CALL prolong_noopt( p2_sub, p3 )
    16041604
    16051605!
     
    16161616       ELSE
    16171617
    1618           CALL prolong( p2, p3 )
     1618          CALL prolong_noopt( p2, p3 )
    16191619
    16201620       ENDIF
     
    16331633!
    16341634!--    Relaxation of the new solution
    1635        CALL redblack( f_mg, p_mg )
     1635       CALL redblack_noopt( f_mg, p_mg )
    16361636
    16371637    ENDIF
     
    16521652
    16531653!
    1654 !-- Reset counter for the next call of poismg
     1654!-- Reset counter for the next call of poismg_noopt
    16551655    grid_level_count(grid_level) = 0
    16561656
     
    16681668 20 CONTINUE
    16691669
    1670  END SUBROUTINE next_mg_level
     1670 END SUBROUTINE next_mg_level_noopt
Note: See TracChangeset for help on using the changeset viewer.