[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 418)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Mon Aug 27 14:19:44 CDT 2012
User: rhaas
Date: 2012/08/27 02:19 PM
Modified:
/trunk/src/
GRHydro_UpdateMask.F90, GRHydro_UpdateMaskM.F90
Log:
GRHydro: add OpenMP parallelization to IntialAtmosphereReset
From: Roland Haas <roland.haas at physics.gatech.edu>
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_UpdateMask.F90
Delta lines: +7 -0
===================================================================
--- trunk/src/GRHydro_UpdateMask.F90 2012-08-27 19:19:40 UTC (rev 417)
+++ trunk/src/GRHydro_UpdateMask.F90 2012-08-27 19:19:44 UTC (rev 418)
@@ -201,6 +201,7 @@
CCTK_INT :: i,j,k
+ !$OMP PARALLEL DO PRIVATE(i,j,k)
do k = 1, cctk_lsh(3)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)
@@ -211,6 +212,7 @@
end do
end do
end do
+ !$OMP END PARALLEL DO
call CCTK_INFO("Setting up the atmosphere mask: points with rho<rho_min are set to be atmosphere")
@@ -445,6 +447,7 @@
rho_min = rho_min * initial_atmosphere_factor
endif
+!$OMP PARALLEL DO PRIVATE(det,keytemp,i,j,k,anyerr,keyerr)
do k = 1, cctk_lsh(3)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)
@@ -477,6 +480,7 @@
temperature(i,j,k),y_e(i,j,k))
y_e_con(i,j,k) = dens(i,j,k) * y_e(i,j,k)
else
+ keytemp = 0
call EOS_Omni_press(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
rho(i,j,k),eps(i,j,k),xtemp,xye,press(i,j,k),keyerr,anyerr)
call EOS_Omni_EpsFromPress(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
@@ -518,6 +522,7 @@
temperature_p(i,j,k),y_e_p(i,j,k))
y_e_con_p(i,j,k) = dens_p(i,j,k) * y_e_p(i,j,k)
else
+ keytemp = 0
call EOS_Omni_press(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
rho_p(i,j,k),eps_p(i,j,k),xtemp,xye,press_p(i,j,k),keyerr,anyerr)
call EOS_Omni_EpsFromPress(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
@@ -559,6 +564,7 @@
temperature_p_p(i,j,k),y_e_p_p(i,j,k))
y_e_con_p_p(i,j,k) = dens_p_p(i,j,k) * y_e_p_p(i,j,k)
else
+ keytemp = 0
call EOS_Omni_press(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
rho_p_p(i,j,k),eps_p_p(i,j,k),xtemp,xye,press_p_p(i,j,k),keyerr,anyerr)
call EOS_Omni_EpsFromPress(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
@@ -576,6 +582,7 @@
end do
end do
end do
+!$OMP END PARALLEL DO
end subroutine GRHydro_InitialAtmosphereReset
File [modified]: GRHydro_UpdateMaskM.F90
Delta lines: +6 -0
===================================================================
--- trunk/src/GRHydro_UpdateMaskM.F90 2012-08-27 19:19:40 UTC (rev 417)
+++ trunk/src/GRHydro_UpdateMaskM.F90 2012-08-27 19:19:44 UTC (rev 418)
@@ -161,6 +161,7 @@
end do
end do
end do
+!$OMP END PARALLEL DO
!!$ call GRHydro_BoundariesM(CCTK_PASS_FTOF)
#undef faulty_gxx
@@ -316,6 +317,7 @@
rho_min = rho_min * initial_atmosphere_factor
endif
+!$OMP PARALLEL DO PRIVATE(det,keytemp,i,j,k,anyerr,keyerr)
do k = 1, cctk_lsh(3)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)
@@ -350,6 +352,7 @@
else
+ keytemp = 0
call EOS_Omni_press(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
rho(i,j,k),eps(i,j,k),xtemp,xye,press(i,j,k),keyerr,anyerr)
call EOS_Omni_EpsFromPress(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
@@ -396,6 +399,7 @@
else
+ keytemp = 0
call EOS_Omni_press(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
rho_p(i,j,k),eps_p(i,j,k),xtemp,xye,press_p(i,j,k),keyerr,anyerr)
call EOS_Omni_EpsFromPress(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
@@ -444,6 +448,7 @@
else
+ keytemp = 0
call EOS_Omni_press(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
rho_p_p(i,j,k),eps_p_p(i,j,k),xtemp,xye,press_p_p(i,j,k),keyerr,anyerr)
call EOS_Omni_EpsFromPress(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
@@ -464,6 +469,7 @@
end do
end do
end do
+!$OMP END PARALLEL DO
write(*,*) " GRHydro_InitialAtmosphereReset"
!!$ call GRHydro_BoundariesM(CCTK_PASS_FTOF)
More information about the Commits
mailing list