Changeset 1747
- Timestamp:
- Feb 8, 2016 12:25:53 PM (9 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r1692 r1747 20 20 # Current revisions: 21 21 # ------------------ 22 # 22 # dependencies for routine palm updated 23 23 # 24 24 # Former revisions: … … 419 419 package_parin.o: modules.o mod_kinds.o land_surface_model.o\ 420 420 plant_canopy_model.o radiation_model.o 421 palm.o: modules.o cpulog.o ls_forcing.o mod_kinds.o nudging.o 421 palm.o: modules.o cpulog.o ls_forcing.o mod_kinds.o nudging.o\ 422 surface_layer_fluxes.o 422 423 parin.o: modules.o cpulog.o mod_kinds.o progress_bar.o 423 424 plant_canopy_model.o: modules.o mod_kinds.o -
palm/trunk/SOURCE/flow_statistics.f90
r1739 r1747 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! small bugfixes for accelerator version 22 22 ! 23 23 ! Former revisions: … … 1658 1658 ONLY : average_count_pr, cloud_droplets, cloud_physics, do_sum, & 1659 1659 dt_3d, g, humidity, icloud_scheme, kappa, large_scale_forcing, & 1660 large_scale_subsidence, max_pr_user, message_string, ocean,&1661 passive_scalar, precipitation, simulated_time,&1660 large_scale_subsidence, max_pr_user, message_string, neutral, & 1661 ocean, passive_scalar, precipitation, simulated_time, & 1662 1662 use_subsidence_tendencies, use_surface_fluxes, use_top_fluxes, & 1663 1663 ws_scheme_mom, ws_scheme_sca … … 3009 3009 sums_ll(k,1) = sums_ll(k,1) + 0.5_wp * w(k,j,i) * ( & 3010 3010 ( 0.25_wp * ( u(k,j,i)+u(k+1,j,i)+u(k,j,i+1)+u(k+1,j,i+1) ) & 3011 - 0.5_wp * ( hom(k,1,1,sr) + hom(k+1,1,1,sr) ) )**2& &3011 - 0.5_wp * ( hom(k,1,1,sr) + hom(k+1,1,1,sr) ) )**2& 3012 3012 + ( 0.25_wp * ( v(k,j,i)+v(k+1,j,i)+v(k,j+1,i)+v(k+1,j+1,i) ) & 3013 - 0.5_wp * ( hom(k,1,2,sr) + hom(k+1,1,2,sr) ) )**2& &3013 - 0.5_wp * ( hom(k,1,2,sr) + hom(k+1,1,2,sr) ) )**2& 3014 3014 + w(k,j,i)**2 ) 3015 3015 -
palm/trunk/SOURCE/palm.f90
r1683 r1747 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! openacc-adjustment for new surface layer parameterization 22 22 ! 23 23 ! Former revisions: … … 145 145 ONLY: hom, rmask, weight_pres, weight_substep 146 146 147 USE surface_layer_fluxes_mod, & 148 ONLY: pt1, qv1, uv_total 149 147 150 #if defined( __openacc ) 148 151 USE OPENACC … … 312 315 !$acc data copyin( d, diss, e, e_p, kh, km, p, pt, pt_p, q, ql, tend, te_m, tpt_m, tu_m, tv_m, tw_m, u, u_p, v, vpt, v_p, w, w_p ) & 313 316 !$acc copyin( tri, tric, dzu, ddzu, ddzw, dd2zu, l_grid, l_wall, ptdf_x, ptdf_y, pt_init, rdf, rdf_sc, ref_state, ug, u_init, vg, v_init, zu, zw ) & 314 !$acc copyin( hom, qs, qsws, qswst, rif, rif_wall, shf, ts, tswst, us, usws, uswst, vsws, vswst, z0, z0h ) &317 !$acc copyin( hom, ol, pt1, qs, qsws, qswst, qv1, rif_wall, shf, ts, tswst, us, usws, uswst, uv_total, vsws, vswst, z0, z0h ) & 315 318 !$acc copyin( fxm, fxp, fym, fyp, fwxm, fwxp, fwym, fwyp, nzb_diff_s_inner, nzb_diff_s_outer, nzb_diff_u ) & 316 319 !$acc copyin( nzb_diff_v, nzb_s_inner, nzb_s_outer, nzb_u_inner ) & -
palm/trunk/SOURCE/surface_layer_fluxes.f90
r1710 r1747 18 18 !--------------------------------------------------------------------------------! 19 19 ! Current revisions: 20 ! ----------------- 21 ! 20 ! ------------------ 21 ! adjustments for OpenACC usage 22 22 ! 23 23 ! Former revisions: … … 168 168 PRIVATE 169 169 170 PUBLIC init_surface_layer_fluxes, surface_layer_fluxes170 PUBLIC init_surface_layer_fluxes, pt1, qv1, surface_layer_fluxes, uv_total 171 171 172 172 INTERFACE init_surface_layer_fluxes … … 406 406 407 407 408 !$OMP PARALLEL DO PRIVATE( k , z_mo)409 !$acc kernels loop 408 !$OMP PARALLEL DO PRIVATE( k ) 409 !$acc kernels loop present( nzb_s_inner, u, uv_total, v ) private( j, k ) 410 410 DO i = nxl, nxr 411 411 DO j = nys, nyn … … 455 455 ol_u !< Upper bound of L for Newton iteration 456 456 457 458 457 IF ( TRIM( most_method ) /= 'circular' ) THEN 459 458 459 !$acc data present( nzb_s_inner, pt, q, qsws, rib, shf, uv_total, vpt, zu, zw ) 460 460 461 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 461 !$acc kernels loop 462 !$acc kernels loop private( j, k, z_mo ) 462 463 DO i = nxl, nxr 463 464 DO j = nys, nyn … … 498 499 ENDDO 499 500 ENDDO 501 !$acc end data 500 502 501 503 ENDIF … … 507 509 508 510 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 509 !$acc kernels loop 511 !# WARNING: does not work on GPU so far 512 !!!!!!$acc kernels loop 510 513 DO i = nxl, nxr 511 514 DO j = nys, nyn … … 626 629 627 630 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 628 !$acc kernels loop 631 !# WARNING: does not work on GPU so far 632 !!!!!!$acc kernels loop 629 633 DO i = nxl, nxr 630 634 DO j = nys, nyn … … 668 672 669 673 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 670 !$acc kernels loop 674 !$acc kernels loop present( nzb_s_inner, ol, pt, pt1, q, ql, qs, qv1, ts, us, vpt, zu, zw ) private( j, k, z_mo ) 671 675 DO i = nxl, nxr 672 676 DO j = nys, nyn … … 719 723 720 724 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 721 !$acc kernels loop 725 ! ### WARNING: does not work on GPU because of function calls 726 !!!!!$acc kernels loop 727 !$acc update host( ol, uv_total ) 722 728 DO i = nxlg, nxrg 723 729 DO j = nysg, nyng … … 733 739 ENDDO 734 740 ENDDO 741 !$acc update device( us ) 735 742 736 743 END SUBROUTINE calc_us … … 742 749 IMPLICIT NONE 743 750 751 !$acc kernels loop present( nzb_s_inner, pt, pt1, pt_d_t, q, ql, qv1 ) private( j, k ) 744 752 DO i = nxlg, nxrg 745 753 DO j = nysg, nyng … … 770 778 !-- For a given heat flux in the surface layer: 771 779 !$OMP PARALLEL DO 772 !$acc kernels loop 780 !$acc kernels loop private( j ) 773 781 DO i = nxlg, nxrg 774 782 DO j = nysg, nyng … … 787 795 IF ( large_scale_forcing .AND. lsf_surf ) THEN 788 796 !$OMP PARALLEL DO 789 !$acc kernels loop 797 !$acc kernels loop private( j, k ) 790 798 DO i = nxlg, nxrg 791 799 DO j = nysg, nyng … … 797 805 798 806 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 799 !$acc kernels loop 807 ! ### WARNING: leads to severe compile error 808 !!!!$acc kernels loop 800 809 DO i = nxlg, nxrg 801 810 DO j = nysg, nyng … … 827 836 !-- For a given water flux in the Prandtl layer: 828 837 !$OMP PARALLEL DO 829 !$acc kernels loop 838 !$acc kernels loop private( j ) 830 839 DO i = nxlg, nxrg 831 840 DO j = nysg, nyng … … 840 849 IF ( large_scale_forcing .AND. lsf_surf ) THEN 841 850 !$OMP PARALLEL DO 842 !$acc kernels loop 851 !$acc kernels loop private( j, k ) 843 852 DO i = nxlg, nxrg 844 853 DO j = nysg, nyng … … 850 859 851 860 !$OMP PARALLEL DO PRIVATE( e_s, k, z_mo ) 852 !$acc kernels loop independent 861 ! ### WARNING: leads to severe compile error 862 !!!!$acc kernels loop independent 853 863 DO i = nxlg, nxrg 854 ! $acc loop independent864 !!!!$acc loop independent 855 865 DO j = nysg, nyng 856 866 … … 892 902 893 903 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 894 !$acc kernels loop independent 904 ! ### WARNING: leads to severe compile error 905 !!!!!$acc kernels loop independent 895 906 DO i = nxlg, nxrg 896 ! $acc loop independent907 !!!!$acc loop independent 897 908 DO j = nysg, nyng 898 909 … … 913 924 914 925 ENDIF 926 !$acc end data 915 927 916 928 END SUBROUTINE calc_scaling_parameters … … 930 942 !-- First compute the corresponding component of u* and square it. 931 943 !$OMP PARALLEL DO PRIVATE( k, ol_mid, z_mo ) 932 !$acc kernels loop 944 ! ### WARNING: leads to severe compile error 945 !!!!!$acc kernels loop 946 !$acc update host( ol, u, us, v ) 933 947 DO i = nxl, nxr 934 948 DO j = nys, nyn … … 957 971 !-- First compute the corresponding component of u* and square it. 958 972 !$OMP PARALLEL DO PRIVATE( k, ol_mid, z_mo ) 959 !$acc kernels loop 973 ! ### WARNING: leads to severe compile error 974 !!!!!!$acc kernels loop 960 975 DO i = nxl, nxr 961 976 DO j = nys, nyn … … 983 998 ! 984 999 !-- Exchange the boundaries for the momentum fluxes (is this still required?) 985 ! $acc update host( usws, vsws )1000 !!!!!!!!$acc update host( usws, vsws ) 986 1001 CALL exchange_horiz_2d( usws ) 987 1002 CALL exchange_horiz_2d( vsws ) … … 993 1008 skip_time_do_lsm .OR. .NOT. land_surface ) ) THEN 994 1009 !$OMP PARALLEL DO 995 !$acc kernels loop independent 1010 !$acc kernels loop independent present( shf, ts, us ) 996 1011 DO i = nxlg, nxrg 997 1012 !$acc loop independent … … 1009 1024 land_surface ) ) THEN 1010 1025 !$OMP PARALLEL DO 1011 !$acc kernels loop independent 1026 !$acc kernels loop independent present( qs, qsws, us ) 1012 1027 DO i = nxlg, nxrg 1013 1028 !$acc loop independent … … 1024 1039 precipitation ) THEN 1025 1040 !$OMP PARALLEL DO 1026 !$acc kernels loop independent 1041 !$acc kernels loop independent present( nrs, nrsws, qrs, qrsws, us ) 1027 1042 DO i = nxlg, nxrg 1028 1043 !$acc loop independent … … 1038 1053 IF ( ibc_e_b == 2 ) THEN 1039 1054 !$OMP PARALLEL DO 1040 !$acc kernels loop independent 1055 !$acc kernels loop independent present( e, nzb_s_inner, us ) 1041 1056 DO i = nxlg, nxrg 1042 1057 !$acc loop independent … … 1050 1065 ENDDO 1051 1066 ENDIF 1052 !$acc end data1053 1067 1054 1068 END SUBROUTINE calc_surface_fluxes -
palm/trunk/SOURCE/swap_timelevel.f90
r1683 r1747 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! explicit loops in nopointer case to omit craypointer option of pgi compiler 22 22 ! 23 23 ! Former revisions: … … 94 94 neutral, ocean, passive_scalar, precipitation, timestep_count 95 95 96 USE indices, & 97 ONLY: nxlg, nxrg, nyng, nysg, nzb, nzt 96 98 IMPLICIT NONE 99 100 INTEGER :: i, j, k !: loop indices 97 101 98 102 ! … … 106 110 107 111 !$acc kernels present( pt, pt_p, u, u_p, v, v_p, w, w_p ) 108 u = u_p 109 v = v_p 110 w = w_p 111 pt = pt_p 112 !$acc loop independent 113 DO i = nxlg, nxrg 114 !$acc loop independent 115 DO j = nysg, nyng 116 !$acc loop independent 117 DO k = nzb, nzt+1 118 u(k,j,i) = u_p(k,j,i) 119 v(k,j,i) = v_p(k,j,i) 120 w(k,j,i) = w_p(k,j,i) 121 pt(k,j,i) = pt_p(k,j,i) 122 ENDDO 123 ENDDO 124 ENDDO 125 ! u = u_p 126 ! v = v_p 127 ! w = w_p 128 ! pt = pt_p 112 129 !$acc end kernels 113 130 IF ( .NOT. constant_diffusion ) THEN 114 131 !$acc kernels present( e, e_p ) 115 e = e_p 132 !$acc loop independent 133 DO i = nxlg, nxrg 134 !$acc loop independent 135 DO j = nysg, nyng 136 !$acc loop independent 137 DO k = nzb, nzt+1 138 e(k,j,i) = e_p(k,j,i) 139 ENDDO 140 ENDDO 141 ENDDO 142 ! e = e_p 116 143 !$acc end kernels 117 144 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.