Changeset 2118 for palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
- Timestamp:
- Jan 17, 2017 4:38:49 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r2101 r2118 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! OpenACC directives and related code removed 23 23 ! 24 24 ! Former revisions: … … 163 163 !> 164 164 !> @todo (re)move large_scale_forcing actions 165 !> @todo check/optimize OpenMP and OpenACCdirectives165 !> @todo check/optimize OpenMP directives 166 166 !------------------------------------------------------------------------------! 167 167 MODULE surface_layer_fluxes_mod … … 472 472 473 473 !$OMP PARALLEL DO PRIVATE( k ) 474 !$acc kernels loop present( nzb_s_inner, u, uv_total, v ) private( j, k )475 474 DO i = nxl, nxr 476 475 DO j = nys, nyn … … 492 491 ! 493 492 !-- Values of uv_total need to be exchanged at the ghost boundaries 494 !$acc update host( uv_total )495 493 CALL exchange_horiz_2d( uv_total ) 496 !$acc update device( uv_total )497 494 498 495 END SUBROUTINE calc_uv_total … … 522 519 IF ( TRIM( most_method ) /= 'circular' ) THEN 523 520 524 !$acc data present( nzb_s_inner, pt, q, qsws, rib, shf, uv_total, vpt, zu, zw )525 526 521 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 527 !$acc kernels loop private( j, k, z_mo )528 522 DO i = nxl, nxr 529 523 DO j = nys, nyn … … 564 558 ENDDO 565 559 ENDDO 566 !$acc end data567 560 568 561 ENDIF … … 574 567 575 568 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 576 !# WARNING: does not work on GPU so far because of DO-loop with577 !# undetermined iterations578 !!!!!!$acc kernels loop579 569 DO i = nxl, nxr 580 570 DO j = nys, nyn … … 695 685 696 686 !$OMP PARALLEL DO PRIVATE( k, l, z_mo ) FIRSTPRIVATE( l_bnd ) LASTPRIVATE( l_bnd ) 697 !# WARNING: does not work on GPU so far because of DO WHILE construct698 !!!!!!$acc kernels loop699 687 DO i = nxl, nxr 700 688 DO j = nys, nyn … … 736 724 737 725 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 738 !$acc kernels loop present( nzb_s_inner, ol, pt, pt1, q, ql, qs, qv1, ts, us, vpt, zu, zw ) private( j, k, z_mo )739 726 DO i = nxl, nxr 740 727 DO j = nys, nyn … … 775 762 !-- Values of ol at ghost point locations are needed for the evaluation 776 763 !-- of usws and vsws. 777 !$acc update host( ol )778 764 CALL exchange_horiz_2d( ol ) 779 !$acc update device( ol )780 765 781 766 END SUBROUTINE calc_ol … … 788 773 789 774 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 790 !$acc kernels loop present( nzb_s_inner, ol, us, uv_total, zu, zw, z0 ) private( j, k, z_mo )791 775 DO i = nxlg, nxrg 792 776 DO j = nysg, nyng … … 811 795 IMPLICIT NONE 812 796 813 !$acc kernels loop present( nzb_s_inner, pt, pt1, pt_d_t, q, ql, qv1 ) private( j, k )814 797 DO i = nxlg, nxrg 815 798 DO j = nysg, nyng … … 828 811 IMPLICIT NONE 829 812 830 !831 !-- Data information for accelerators832 !$acc data present( e, nrsws, nzb_u_inner, nzb_v_inner, nzb_s_inner, pt ) &833 !$acc present( q, qs, qsws, qrsws, shf, ts, u, us, usws, v ) &834 !$acc present( vpt, vsws, zu, zw, z0, z0h )835 813 ! 836 814 !-- Compute theta* … … 840 818 !-- For a given heat flux in the surface layer: 841 819 !$OMP PARALLEL DO 842 !$acc kernels loop private( j, k )843 820 DO i = nxlg, nxrg 844 821 DO j = nysg, nyng … … 858 835 IF ( large_scale_forcing .AND. lsf_surf ) THEN 859 836 !$OMP PARALLEL DO 860 !$acc kernels loop private( j, k )861 837 DO i = nxlg, nxrg 862 838 DO j = nysg, nyng … … 868 844 869 845 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 870 !$acc kernels loop present( nzb_s_inner, ol, pt, pt1, ts, zu, zw, z0h ) private( j, k, z_mo )871 846 DO i = nxlg, nxrg 872 847 DO j = nysg, nyng … … 898 873 !-- For a given water flux in the surface layer 899 874 !$OMP PARALLEL DO 900 !$acc kernels loop private( j )901 875 DO i = nxlg, nxrg 902 876 DO j = nysg, nyng … … 912 886 IF ( large_scale_forcing .AND. lsf_surf ) THEN 913 887 !$OMP PARALLEL DO 914 !$acc kernels loop private( j, k )915 888 DO i = nxlg, nxrg 916 889 DO j = nysg, nyng … … 922 895 923 896 !$OMP PARALLEL DO PRIVATE( e_s, k, z_mo ) 924 !$acc kernels loop independent present( nzb_s_inner, ol, pt, q, qs, qv1, zu, zw, z0q ) private( e_s, j, k, z_mo )925 897 DO i = nxlg, nxrg 926 !$acc loop independent927 898 DO j = nysg, nyng 928 899 … … 965 936 !-- For a given water flux in the surface layer 966 937 !$OMP PARALLEL DO 967 !$acc kernels loop private( j )968 938 DO i = nxlg, nxrg 969 939 DO j = nysg, nyng … … 981 951 982 952 !$OMP PARALLEL DO PRIVATE( k, z_mo ) 983 !$acc kernels loop independent present( nr, nrs, nzb_s_inner, ol, qr, qrs, zu, zw, z0q ) private( j, k, z_mo )984 953 DO i = nxlg, nxrg 985 !$acc loop independent986 954 DO j = nysg, nyng 987 955 … … 1002 970 1003 971 ENDIF 1004 !$acc end data1005 972 1006 973 END SUBROUTINE calc_scaling_parameters … … 1020 987 !-- First compute the corresponding component of u* and square it. 1021 988 !$OMP PARALLEL DO PRIVATE( k, ol_mid, z_mo ) 1022 !$acc kernels loop present( nzb_u_inner, ol, u, us, usws, zu, zw, z0 ) private( j, k, z_mo )1023 989 DO i = nxl, nxr 1024 990 DO j = nys, nyn … … 1048 1014 !-- First compute the corresponding component of u* and square it. 1049 1015 !$OMP PARALLEL DO PRIVATE( k, ol_mid, z_mo ) 1050 !$acc kernels loop present( nzb_v_inner, ol, v, us, vsws, zu, zw, z0 ) private( j, k, ol_mid, z_mo )1051 1016 DO i = nxl, nxr 1052 1017 DO j = nys, nyn … … 1075 1040 ! 1076 1041 !-- Exchange the boundaries for the momentum fluxes (is this still required?) 1077 !$acc update host( usws, vsws )1078 1042 CALL exchange_horiz_2d( usws ) 1079 1043 CALL exchange_horiz_2d( vsws ) 1080 !$acc update device( usws, vsws )1081 1044 1082 1045 ! … … 1086 1049 .NOT. urban_surface ) THEN 1087 1050 !$OMP PARALLEL DO 1088 !$acc kernels loop independent present( shf, ts, us )1089 1051 DO i = nxlg, nxrg 1090 !$acc loop independent1091 1052 DO j = nysg, nyng 1092 1053 k = nzb_s_inner(j,i) … … 1103 1064 .OR. .NOT. land_surface ) ) THEN 1104 1065 !$OMP PARALLEL DO 1105 !$acc kernels loop independent present( qs, qsws, us )1106 1066 DO i = nxlg, nxrg 1107 !$acc loop independent1108 1067 DO j = nysg, nyng 1109 1068 k = nzb_s_inner(j,i) … … 1120 1079 .OR. .NOT. land_surface ) ) THEN 1121 1080 !$OMP PARALLEL DO 1122 !$acc kernels loop independent present( qs, qsws, us )1123 1081 DO i = nxlg, nxrg 1124 !$acc loop independent1125 1082 DO j = nysg, nyng 1126 1083 ssws(j,i) = -ss(j,i) * us(j,i) … … 1134 1091 IF ( cloud_physics .AND. microphysics_seifert ) THEN 1135 1092 !$OMP PARALLEL DO 1136 !$acc kernels loop independent present( nrs, nrsws, qrs, qrsws, us )1137 1093 DO i = nxlg, nxrg 1138 !$acc loop independent1139 1094 DO j = nysg, nyng 1140 1095 qrsws(j,i) = -qrs(j,i) * us(j,i) … … 1148 1103 IF ( ibc_e_b == 2 ) THEN 1149 1104 !$OMP PARALLEL DO 1150 !$acc kernels loop independent present( e, nzb_s_inner, us )1151 1105 DO i = nxlg, nxrg 1152 !$acc loop independent1153 1106 DO j = nysg, nyng 1154 1107 k = nzb_s_inner(j,i)
Note: See TracChangeset
for help on using the changeset viewer.