! 717行开始
! do k = mesh%full_kds, mesh%full_kde
! do j = mesh%full_jds_no_pole, mesh%full_jde_no_pole + merge(0, 1, mesh%has_north_pole())
! do i = mesh%half_ids - 1, mesh%half_ide
! mfx_lon%d(i,j,k) = dmg_lon%d(i,j,k) * u_lon%d(i,j,k)
! end do
! end do
! end do
call vdmul((mesh%half_ide-mesh%half_ids+2)*(mesh%full_jde_no_pole+merge(0,1,mesh%has_north_pole())-mesh%full_jds_no_pole+1)*(mesh%full_kde-mesh%full_kds+1), dmg_lon%d, u_lon%d, mfx_lon%d)
! do k = mesh%full_kds, mesh%full_kde
! do j = mesh%half_jds - merge(0, 1, mesh%has_south_pole()), mesh%half_jde
! do i = mesh%full_ids, mesh%full_ide + 1
! mfy_lat%d(i,j,k) = dmg_lat%d(i,j,k) * v_lat%d(i,j,k)
! end do
! end do
! end do
call vdmul((mesh%full_ide-mesh%full_ids+1)*(mesh%half_jde-mesh%half_jds+merge(0, 1, mesh%has_south_pole())+1)*(mesh%full_kde-mesh%full_kds+1),dmg_lat%d, v_lat%d, mfy_lat%d)
该函数占用约15.6%,经过OneMKL的vdmul函数替换处理(注释为Before):
实测平均会比原来慢1s左右
如果再后面继续引入vddiv函数,还会再慢数十秒,故类似思路(vdmul,vdiv)可以暂时搁置