aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhaas <rhaas@e296648e-0e4f-0410-bd07-d597d9acff87>2012-10-13 01:25:24 +0000
committerrhaas <rhaas@e296648e-0e4f-0410-bd07-d597d9acff87>2012-10-13 01:25:24 +0000
commit55e95e4557524afce0caf9fd5a015c9c8fdf051b (patch)
tree100432f323d8c4b31d22f11faf3672c2e4f9d6ee
parentbdf875745ae407bf4f8ffbfdccfaf803e0e64101 (diff)
use OmpenMP threadprivate variable attribute for SAVE variables in pointwise
routines git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/Exact/trunk@278 e296648e-0e4f-0410-bd07-d597d9acff87
-rw-r--r--src/boost.F776
-rw-r--r--src/gauge.F7738
-rw-r--r--src/initialize.F7738
-rw-r--r--src/metrics/Alvi.F771
-rw-r--r--src/metrics/Bertotti.F771
-rw-r--r--src/metrics/Bianchi_I.F771
-rw-r--r--src/metrics/Goedel.F771
-rw-r--r--src/metrics/Gowdy_wave.F771
-rw-r--r--src/metrics/bowl.F771
9 files changed, 46 insertions, 42 deletions
diff --git a/src/boost.F77 b/src/boost.F77
index babe398..6b993ea 100644
--- a/src/boost.F77
+++ b/src/boost.F77
@@ -70,6 +70,8 @@ c static local variables describing Lorentz transformation
save partial_Mx_wrt_Cx
save partial_Cx_wrt_Mx
save R
+c$omp threadprivate (firstcall, gamma, vv, parallel, perp,
+c$omp+ partial_Mx_wrt_Cx,partial_Cx_wrt_Mx, R)
c coordinates and 4-metric
CCTK_REAL Cx(0:3)
@@ -141,8 +143,6 @@ c
c compute Lorentz transformation information on first call
c
if (firstcall) then
-c$omp critical
- if (firstcall) then
c boost velocity
vv(1) = boost_vx
@@ -294,8 +294,6 @@ c Mbetax(i) + R(j,i) Nbetax(j) [correct]
firstcall = .false.
end if
-c$omp end critical
- end if
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
diff --git a/src/gauge.F77 b/src/gauge.F77
index 361321a..3735455 100644
--- a/src/gauge.F77
+++ b/src/gauge.F77
@@ -88,25 +88,25 @@ C
if ( set_lapse .or. set_shift .or. set_dtlapse .or. set_dtshift) then
-C.omp parallel do private (
-C.omp$ i, j, k,
-C.omp$ tt, xx, yy, zz,
-C.omp$ alptmp, dtalptmp, axtmp, aytmp, aztmp,
-C.omp$ betaxtmp, betaytmp, betaztmp,
-C.omp$ dtbetaxtmp, dtbetaytmp, dtbetaztmp,
-C.omp$ bxxtmp, bxytmp, bxztmp,
-C.omp$ byxtmp, byytmp, byztmp,
-C.omp$ bzxtmp, bzytmp, bzztmp,
-C.omp$ dxgxxtmp, dxgyytmp, dxgzztmp,
-C.omp$ dxgxytmp, dxgyztmp, dxgxztmp,
-C.omp$ dygxxtmp, dygyytmp, dygzztmp,
-C.omp$ dygxytmp, dygyztmp, dygxztmp,
-C.omp$ dzgxxtmp, dzgyytmp, dzgzztmp,
-C.omp$ dzgxytmp, dzgyztmp, dzgxztmp,
-C.omp$ exact_psi,
-C.omp$ exact_psix, exact_psiy, exact_psiz,
-C.omp$ exact_psixx, exact_psiyy, exact_psizz,
-C.omp$ exact_psixy, exact_psiyz, exact_psixz)
+C$omp parallel do private (
+C$omp$ i, j, k,
+C$omp$ tt, xx, yy, zz,
+C$omp$ alptmp, dtalptmp, axtmp, aytmp, aztmp,
+C$omp$ betaxtmp, betaytmp, betaztmp,
+C$omp$ dtbetaxtmp, dtbetaytmp, dtbetaztmp,
+C$omp$ bxxtmp, bxytmp, bxztmp,
+C$omp$ byxtmp, byytmp, byztmp,
+C$omp$ bzxtmp, bzytmp, bzztmp,
+C$omp$ dxgxxtmp, dxgyytmp, dxgzztmp,
+C$omp$ dxgxytmp, dxgyztmp, dxgxztmp,
+C$omp$ dygxxtmp, dygyytmp, dygzztmp,
+C$omp$ dygxytmp, dygyztmp, dygxztmp,
+C$omp$ dzgxxtmp, dzgyytmp, dzgzztmp,
+C$omp$ dzgxytmp, dzgyztmp, dzgxztmp,
+C$omp$ exact_psi,
+C$omp$ exact_psix, exact_psiy, exact_psiz,
+C$omp$ exact_psixx, exact_psiyy, exact_psizz,
+C$omp$ exact_psixy, exact_psiyz, exact_psixz)
do k=1,nz
do j=1,ny
do i=1,nx
diff --git a/src/initialize.F77 b/src/initialize.F77
index 28022d7..a6bc967 100644
--- a/src/initialize.F77
+++ b/src/initialize.F77
@@ -60,25 +60,25 @@ C Set data pointwise.
ny = cctk_lsh(2)
nz = cctk_lsh(3)
-C.omp parallel do private(
-C.omp$ i, j, k,
-C.omp$ tt, xx, yy, zz,
-C.omp$ alpjunk, dtalpjunk, axjunk, ayjunk, azjunk,
-C.omp$ betaxjunk, betayjunk, betazjunk,
-C.omp$ dtbetaxjunk, dtbetayjunk, dtbetazjunk,
-C.omp$ bxxjunk, bxyjunk, bxzjunk,
-C.omp$ byxjunk, byyjunk, byzjunk,
-C.omp$ bzxjunk, bzyjunk, bzzjunk,
-C.omp$ dxgxxjunk, dxgyyjunk, dxgzzjunk,
-C.omp$ dxgxyjunk, dxgyzjunk, dxgxzjunk,
-C.omp$ dygxxjunk, dygyyjunk, dygzzjunk,
-C.omp$ dygxyjunk, dygyzjunk, dygxzjunk,
-C.omp$ dzgxxjunk, dzgyyjunk, dzgzzjunk,
-C.omp$ dzgxyjunk, dzgyzjunk, dzgxzjunk,
-C.omp$ exact_psi,
-C.omp$ exact_psix, exact_psiy, exact_psiz,
-C.omp$ exact_psixx, exact_psiyy, exact_psizz,
-C.omp$ exact_psixy, exact_psiyz, exact_psixz)
+C$omp parallel do private(
+C$omp$ i, j, k,
+C$omp$ tt, xx, yy, zz,
+C$omp$ alpjunk, dtalpjunk, axjunk, ayjunk, azjunk,
+C$omp$ betaxjunk, betayjunk, betazjunk,
+C$omp$ dtbetaxjunk, dtbetayjunk, dtbetazjunk,
+C$omp$ bxxjunk, bxyjunk, bxzjunk,
+C$omp$ byxjunk, byyjunk, byzjunk,
+C$omp$ bzxjunk, bzyjunk, bzzjunk,
+C$omp$ dxgxxjunk, dxgyyjunk, dxgzzjunk,
+C$omp$ dxgxyjunk, dxgyzjunk, dxgxzjunk,
+C$omp$ dygxxjunk, dygyyjunk, dygzzjunk,
+C$omp$ dygxyjunk, dygyzjunk, dygxzjunk,
+C$omp$ dzgxxjunk, dzgyyjunk, dzgzzjunk,
+C$omp$ dzgxyjunk, dzgyzjunk, dzgxzjunk,
+C$omp$ exact_psi,
+C$omp$ exact_psix, exact_psiy, exact_psiz,
+C$omp$ exact_psixx, exact_psiyy, exact_psizz,
+C$omp$ exact_psixy, exact_psiyz, exact_psixz)
do k=1,nz
do j=1,ny
do i=1,nx
diff --git a/src/metrics/Alvi.F77 b/src/metrics/Alvi.F77
index cda692f..046602a 100644
--- a/src/metrics/Alvi.F77
+++ b/src/metrics/Alvi.F77
@@ -34,6 +34,7 @@ c static locals
CCTK_REAL m1,m2,b
data firstcall /.true./
save firstcall, m1,m2,b
+c$omp threadprivate (firstcall, m1,m2,b)
c locals
CCTK_REAL rin1,rin2,rout,x1,x2, r1, r2, r3, results(10)
diff --git a/src/metrics/Bertotti.F77 b/src/metrics/Bertotti.F77
index b6f6ab2..b1e6c8b 100644
--- a/src/metrics/Bertotti.F77
+++ b/src/metrics/Bertotti.F77
@@ -35,6 +35,7 @@ c static local variables
logical firstcall
data firstcall /.true./
save firstcall, baza
+c$omp threadprivate (firstcall, baza)
c local variables
CCTK_REAL baza
diff --git a/src/metrics/Bianchi_I.F77 b/src/metrics/Bianchi_I.F77
index 41eb14b..4775dbd 100644
--- a/src/metrics/Bianchi_I.F77
+++ b/src/metrics/Bianchi_I.F77
@@ -38,6 +38,7 @@ c local static variables
CCTK_REAL arad
data firstcall /.true./
save firstcall, arad
+c$omp threadprivate (firstcall, arad)
c local variables
CCTK_REAL bx, by
diff --git a/src/metrics/Goedel.F77 b/src/metrics/Goedel.F77
index 7663bc8..d69f43d 100644
--- a/src/metrics/Goedel.F77
+++ b/src/metrics/Goedel.F77
@@ -38,6 +38,7 @@ c local static variables
CCTK_REAL arad
data firstcall /.true./
save firstcall, arad
+c$omp threadprivate (firstcall, arad)
C This is a vacuum spacetime with no cosmological constant
diff --git a/src/metrics/Gowdy_wave.F77 b/src/metrics/Gowdy_wave.F77
index cfb3354..efdb938 100644
--- a/src/metrics/Gowdy_wave.F77
+++ b/src/metrics/Gowdy_wave.F77
@@ -44,6 +44,7 @@ c local static variables
CCTK_REAL Bessel_J0, Bessel_J1
data firstcall /.true./
save firstcall, amp, PI, twoPI, Bessel_J0, Bessel_J1
+c$omp threadprivate (firstcall, amp, PI, twoPI, Bessel_J0, Bessel_J1)
c local variables
CCTK_REAL Bessel_J0_t, Bessel_J1_t
diff --git a/src/metrics/bowl.F77 b/src/metrics/bowl.F77
index d4b2da6..15ca326 100644
--- a/src/metrics/bowl.F77
+++ b/src/metrics/bowl.F77
@@ -87,6 +87,7 @@ c local static variables
CCTK_REAL t0,st
data firstcall /.true./
save firstcall,evolve,type,a,c,s,dx,dy,dz,t0,st
+c$omp threadprivate (firstcall,evolve,type,a,c,s,dx,dy,dz,t0,st)
c local variables
integer type