aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Reisswig <reisswig@scriwalker.(none)>2012-10-20 21:09:44 -0700
committerChristian Reisswig <reisswig@scriwalker.(none)>2012-10-20 21:09:44 -0700
commit2d5752398c5844a24f3146792b2e93510552c19e (patch)
tree525c1b0db3100835813f0be56df9e3e092afbca3
parent99611bcd03cf925e917e001f481290ae63a8e0d8 (diff)
parent3c632022ce8df411a5b5007d4505e1d46e05e0e3 (diff)
Merge branch 'master' of carpetcode.org:carpet
-rw-r--r--Carpet/CarpetIOASCII/src/ioascii.cc6
-rw-r--r--Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d..asc8
-rw-r--r--Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d.x.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d..asc8
-rw-r--r--Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.x.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.xy.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d..asc8
-rw-r--r--Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.x.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xy.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xyz.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d..asc8
-rw-r--r--Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d.x.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d..asc8
-rw-r--r--Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.x.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.xy.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d..asc8
-rw-r--r--Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.x.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xy.asc8
-rw-r--r--Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xyz.asc8
-rw-r--r--Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc33
-rw-r--r--Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh11
-rw-r--r--Carpet/CarpetIOHDF5/src/OutputSlice.cc53
-rw-r--r--Carpet/LoopControl/param.ccl2
23 files changed, 158 insertions, 91 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc
index 0a966d5dd..9c420b892 100644
--- a/Carpet/CarpetIOASCII/src/ioascii.cc
+++ b/Carpet/CarpetIOASCII/src/ioascii.cc
@@ -1377,14 +1377,10 @@ namespace CarpetIOASCII {
}
}
os << "\t" << col++ << ":time";
- if (not compact_format) {
+ if (not compact_format or grouptype == CCTK_GF) {
for (int d=0; d<dim; ++d) {
os << (d==0 ? "\t" : " ") << col++ << ":" << coords[d];
}
- } else {
- for (int d=0; d<min(dim,groupdim); ++d) {
- os << (d==0 ? "\t" : " ") << col++ << ":" << coords[d];
- }
}
os << "\t" << col << ":data" << eol;
if (one_file_per_group) {
diff --git a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d..asc b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d..asc
index 6c67b79db..e90edfdaf 100644
--- a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d..asc
+++ b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d..asc
@@ -1,11 +1,11 @@
# 0D ASCII output created by CarpetIOASCII
-# created on erik-schnetters-macbook-pro.local by eschnett on Dec 05 2011 at 20:09:35-0500
-# parameter filename: "/Users/eschnett/Cvanilla/arrangements/Carpet/CarpetIOASCII/test/compact.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:23-0700
+# parameter filename: "compact.par"
#
# INTERPTOARRAY::ARRAYS1D (interptoarray::arrays1d)
#
-# column format: 1:it 2:ix 3:time 4:x 5:data
-# data columns: 5:arrays1d[0]
+# column format: 1:it 2:ix 3:time 4:data
+# data columns: 4:arrays1d[0]
0 0 0 0.0535714285714286
1 0 1 0.0535714285714286
2 0 2 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d.x.asc b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d.x.asc
index 30ea00538..097e4bb07 100644
--- a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d.x.asc
+++ b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays1d.x.asc
@@ -1,11 +1,11 @@
# 1D ASCII output created by CarpetIOASCII
-# created on erik-schnetters-macbook-pro.local by eschnett on Dec 05 2011 at 20:09:35-0500
-# parameter filename: "/Users/eschnett/Cvanilla/arrangements/Carpet/CarpetIOASCII/test/compact.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:23-0700
+# parameter filename: "compact.par"
#
# INTERPTOARRAY::ARRAYS1D x (interptoarray::arrays1d)
#
-# column format: 1:it 2:ix 3:time 4:x 5:data
-# data columns: 5:arrays1d[0]
+# column format: 1:it 2:ix 3:time 4:data
+# data columns: 4:arrays1d[0]
0 0 0 0.0535714285714286
0 1 0 0.0535714285714286
0 2 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d..asc b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d..asc
index 19b3e7db2..bb73812da 100644
--- a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d..asc
+++ b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d..asc
@@ -1,11 +1,11 @@
# 0D ASCII output created by CarpetIOASCII
-# created on erik-schnetters-macbook-pro.local by eschnett on Dec 05 2011 at 20:09:35-0500
-# parameter filename: "/Users/eschnett/Cvanilla/arrangements/Carpet/CarpetIOASCII/test/compact.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:23-0700
+# parameter filename: "compact.par"
#
# INTERPTOARRAY::ARRAYS2D (interptoarray::arrays2d)
#
-# column format: 1:it 2:ix 3:iy 4:time 5:x 6:y 7:data
-# data columns: 7:arrays2d[0]
+# column format: 1:it 2:ix 3:iy 4:time 5:data
+# data columns: 5:arrays2d[0]
0 0 0 0 0.0535714285714286
1 0 0 1 0.0535714285714286
2 0 0 2 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.x.asc b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.x.asc
index 10a99596d..0ab381895 100644
--- a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.x.asc
+++ b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.x.asc
@@ -1,11 +1,11 @@
# 1D ASCII output created by CarpetIOASCII
-# created on erik-schnetters-macbook-pro.local by eschnett on Dec 05 2011 at 20:09:35-0500
-# parameter filename: "/Users/eschnett/Cvanilla/arrangements/Carpet/CarpetIOASCII/test/compact.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:23-0700
+# parameter filename: "compact.par"
#
# INTERPTOARRAY::ARRAYS2D x (interptoarray::arrays2d)
#
-# column format: 1:it 2:ix 3:iy 4:time 5:x 6:y 7:data
-# data columns: 7:arrays2d[0]
+# column format: 1:it 2:ix 3:iy 4:time 5:data
+# data columns: 5:arrays2d[0]
0 0 0 0 0.0535714285714286
0 1 0 0 0.0535714285714286
0 2 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.xy.asc b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.xy.asc
index 4b1ccd470..e36db4d52 100644
--- a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.xy.asc
+++ b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays2d.xy.asc
@@ -1,11 +1,11 @@
# 2D ASCII output created by CarpetIOASCII
-# created on erik-schnetters-macbook-pro.local by eschnett on Dec 05 2011 at 20:09:35-0500
-# parameter filename: "/Users/eschnett/Cvanilla/arrangements/Carpet/CarpetIOASCII/test/compact.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:23-0700
+# parameter filename: "compact.par"
#
# INTERPTOARRAY::ARRAYS2D x y (interptoarray::arrays2d)
#
-# column format: 1:it 2:ix 3:iy 4:time 5:x 6:y 7:data
-# data columns: 7:arrays2d[0]
+# column format: 1:it 2:ix 3:iy 4:time 5:data
+# data columns: 5:arrays2d[0]
0 0 0 0 0.0535714285714286
0 1 0 0 0.0535714285714286
0 2 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d..asc b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d..asc
index b813a0d30..eaecf1007 100644
--- a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d..asc
+++ b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d..asc
@@ -1,11 +1,11 @@
# 0D ASCII output created by CarpetIOASCII
-# created on erik-schnetters-macbook-pro.local by eschnett on Dec 05 2011 at 20:09:35-0500
-# parameter filename: "/Users/eschnett/Cvanilla/arrangements/Carpet/CarpetIOASCII/test/compact.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:23-0700
+# parameter filename: "compact.par"
#
# INTERPTOARRAY::ARRAYS3D (interptoarray::arrays3d)
#
-# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:x 7:y 8:z 9:data
-# data columns: 9:arrays3d[0]
+# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:data
+# data columns: 6:arrays3d[0]
0 0 0 0 0 0.0535714285714286
1 0 0 0 1 0.0535714285714286
2 0 0 0 2 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.x.asc b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.x.asc
index 4b6475926..275baf8b4 100644
--- a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.x.asc
+++ b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.x.asc
@@ -1,11 +1,11 @@
# 1D ASCII output created by CarpetIOASCII
-# created on erik-schnetters-macbook-pro.local by eschnett on Dec 05 2011 at 20:09:35-0500
-# parameter filename: "/Users/eschnett/Cvanilla/arrangements/Carpet/CarpetIOASCII/test/compact.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:23-0700
+# parameter filename: "compact.par"
#
# INTERPTOARRAY::ARRAYS3D x (interptoarray::arrays3d)
#
-# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:x 7:y 8:z 9:data
-# data columns: 9:arrays3d[0]
+# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:data
+# data columns: 6:arrays3d[0]
0 0 0 0 0 0.0535714285714286
0 1 0 0 0 0.0535714285714286
0 2 0 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xy.asc b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xy.asc
index 3bab81963..3dde78411 100644
--- a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xy.asc
+++ b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xy.asc
@@ -1,11 +1,11 @@
# 2D ASCII output created by CarpetIOASCII
-# created on erik-schnetters-macbook-pro.local by eschnett on Dec 05 2011 at 20:09:35-0500
-# parameter filename: "/Users/eschnett/Cvanilla/arrangements/Carpet/CarpetIOASCII/test/compact.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:23-0700
+# parameter filename: "compact.par"
#
# INTERPTOARRAY::ARRAYS3D x y (interptoarray::arrays3d)
#
-# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:x 7:y 8:z 9:data
-# data columns: 9:arrays3d[0]
+# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:data
+# data columns: 6:arrays3d[0]
0 0 0 0 0 0.0535714285714286
0 1 0 0 0 0.0535714285714286
0 2 0 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xyz.asc b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xyz.asc
index f44394325..7e20b338a 100644
--- a/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xyz.asc
+++ b/Carpet/CarpetIOASCII/test/compact/interptoarray::arrays3d.xyz.asc
@@ -1,11 +1,11 @@
# 3D ASCII output created by CarpetIOASCII
-# created on erik-schnetters-macbook-pro.local by eschnett on Dec 05 2011 at 20:09:35-0500
-# parameter filename: "/Users/eschnett/Cvanilla/arrangements/Carpet/CarpetIOASCII/test/compact.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:23-0700
+# parameter filename: "compact.par"
#
# INTERPTOARRAY::ARRAYS3D x y z (interptoarray::arrays3d)
#
-# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:x 7:y 8:z 9:data
-# data columns: 9:arrays3d[0]
+# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:data
+# data columns: 6:arrays3d[0]
0 0 0 0 0 0.0535714285714286
0 1 0 0 0 0.0535714285714286
0 2 0 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d..asc b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d..asc
index c1cf10d0c..9831a78dd 100644
--- a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d..asc
+++ b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d..asc
@@ -1,11 +1,11 @@
# 0D ASCII output created by CarpetIOASCII
-# created on Redshift.local by eschnett on Sep 18 2012 at 09:35:53-0400
-# parameter filename: "../../arrangements/Carpet/CarpetIOASCII/test/grid-coords.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:32-0700
+# parameter filename: "grid-coords.par"
#
# INTERPTOARRAY::ARRAYS1D (interptoarray::arrays1d)
#
-# column format: 1:it 2:ix 3:time 4:x 5:data
-# data columns: 5:arrays1d[0]
+# column format: 1:it 2:ix 3:time 4:data
+# data columns: 4:arrays1d[0]
0 0 0 0.0535714285714286
1 0 1 0.0535714285714286
2 0 2 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d.x.asc b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d.x.asc
index 20ea6a3ca..ebd4447e6 100644
--- a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d.x.asc
+++ b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays1d.x.asc
@@ -1,11 +1,11 @@
# 1D ASCII output created by CarpetIOASCII
-# created on Redshift.local by eschnett on Sep 18 2012 at 09:35:53-0400
-# parameter filename: "../../arrangements/Carpet/CarpetIOASCII/test/grid-coords.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:32-0700
+# parameter filename: "grid-coords.par"
#
# INTERPTOARRAY::ARRAYS1D x (interptoarray::arrays1d)
#
-# column format: 1:it 2:ix 3:time 4:x 5:data
-# data columns: 5:arrays1d[0]
+# column format: 1:it 2:ix 3:time 4:data
+# data columns: 4:arrays1d[0]
0 0 0 0.0535714285714286
0 1 0 0.0535714285714286
0 2 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d..asc b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d..asc
index 486b71581..7b3787642 100644
--- a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d..asc
+++ b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d..asc
@@ -1,11 +1,11 @@
# 0D ASCII output created by CarpetIOASCII
-# created on Redshift.local by eschnett on Sep 18 2012 at 09:35:53-0400
-# parameter filename: "../../arrangements/Carpet/CarpetIOASCII/test/grid-coords.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:32-0700
+# parameter filename: "grid-coords.par"
#
# INTERPTOARRAY::ARRAYS2D (interptoarray::arrays2d)
#
-# column format: 1:it 2:ix 3:iy 4:time 5:x 6:y 7:data
-# data columns: 7:arrays2d[0]
+# column format: 1:it 2:ix 3:iy 4:time 5:data
+# data columns: 5:arrays2d[0]
0 0 0 0 0.0535714285714286
1 0 0 1 0.0535714285714286
2 0 0 2 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.x.asc b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.x.asc
index 35f08826d..48be2537d 100644
--- a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.x.asc
+++ b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.x.asc
@@ -1,11 +1,11 @@
# 1D ASCII output created by CarpetIOASCII
-# created on Redshift.local by eschnett on Sep 18 2012 at 09:35:53-0400
-# parameter filename: "../../arrangements/Carpet/CarpetIOASCII/test/grid-coords.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:32-0700
+# parameter filename: "grid-coords.par"
#
# INTERPTOARRAY::ARRAYS2D x (interptoarray::arrays2d)
#
-# column format: 1:it 2:ix 3:iy 4:time 5:x 6:y 7:data
-# data columns: 7:arrays2d[0]
+# column format: 1:it 2:ix 3:iy 4:time 5:data
+# data columns: 5:arrays2d[0]
0 0 0 0 0.0535714285714286
0 1 0 0 0.0535714285714286
0 2 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.xy.asc b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.xy.asc
index 14c340316..dd04dcea9 100644
--- a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.xy.asc
+++ b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays2d.xy.asc
@@ -1,11 +1,11 @@
# 2D ASCII output created by CarpetIOASCII
-# created on Redshift.local by eschnett on Sep 18 2012 at 09:35:53-0400
-# parameter filename: "../../arrangements/Carpet/CarpetIOASCII/test/grid-coords.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:32-0700
+# parameter filename: "grid-coords.par"
#
# INTERPTOARRAY::ARRAYS2D x y (interptoarray::arrays2d)
#
-# column format: 1:it 2:ix 3:iy 4:time 5:x 6:y 7:data
-# data columns: 7:arrays2d[0]
+# column format: 1:it 2:ix 3:iy 4:time 5:data
+# data columns: 5:arrays2d[0]
0 0 0 0 0.0535714285714286
0 1 0 0 0.0535714285714286
0 2 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d..asc b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d..asc
index cfaa4fc1e..46ff7c90a 100644
--- a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d..asc
+++ b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d..asc
@@ -1,11 +1,11 @@
# 0D ASCII output created by CarpetIOASCII
-# created on Redshift.local by eschnett on Sep 18 2012 at 09:35:53-0400
-# parameter filename: "../../arrangements/Carpet/CarpetIOASCII/test/grid-coords.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:32-0700
+# parameter filename: "grid-coords.par"
#
# INTERPTOARRAY::ARRAYS3D (interptoarray::arrays3d)
#
-# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:x 7:y 8:z 9:data
-# data columns: 9:arrays3d[0]
+# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:data
+# data columns: 6:arrays3d[0]
0 0 0 0 0 0.0535714285714286
1 0 0 0 1 0.0535714285714286
2 0 0 0 2 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.x.asc b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.x.asc
index 04f3f2ca6..7b9d9a98c 100644
--- a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.x.asc
+++ b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.x.asc
@@ -1,11 +1,11 @@
# 1D ASCII output created by CarpetIOASCII
-# created on Redshift.local by eschnett on Sep 18 2012 at 09:35:53-0400
-# parameter filename: "../../arrangements/Carpet/CarpetIOASCII/test/grid-coords.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:32-0700
+# parameter filename: "grid-coords.par"
#
# INTERPTOARRAY::ARRAYS3D x (interptoarray::arrays3d)
#
-# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:x 7:y 8:z 9:data
-# data columns: 9:arrays3d[0]
+# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:data
+# data columns: 6:arrays3d[0]
0 0 0 0 0 0.0535714285714286
0 1 0 0 0 0.0535714285714286
0 2 0 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xy.asc b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xy.asc
index ec28b5364..b6a362ac5 100644
--- a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xy.asc
+++ b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xy.asc
@@ -1,11 +1,11 @@
# 2D ASCII output created by CarpetIOASCII
-# created on Redshift.local by eschnett on Sep 18 2012 at 09:35:53-0400
-# parameter filename: "../../arrangements/Carpet/CarpetIOASCII/test/grid-coords.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:32-0700
+# parameter filename: "grid-coords.par"
#
# INTERPTOARRAY::ARRAYS3D x y (interptoarray::arrays3d)
#
-# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:x 7:y 8:z 9:data
-# data columns: 9:arrays3d[0]
+# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:data
+# data columns: 6:arrays3d[0]
0 0 0 0 0 0.0535714285714286
0 1 0 0 0 0.0535714285714286
0 2 0 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xyz.asc b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xyz.asc
index d2cb3bbec..0c911219a 100644
--- a/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xyz.asc
+++ b/Carpet/CarpetIOASCII/test/grid-coords/interptoarray::arrays3d.xyz.asc
@@ -1,11 +1,11 @@
# 3D ASCII output created by CarpetIOASCII
-# created on Redshift.local by eschnett on Sep 18 2012 at 09:35:53-0400
-# parameter filename: "../../arrangements/Carpet/CarpetIOASCII/test/grid-coords.par"
+# created on horizon.tapir.caltech.edu by rhaas on Oct 20 2012 at 15:44:32-0700
+# parameter filename: "grid-coords.par"
#
# INTERPTOARRAY::ARRAYS3D x y z (interptoarray::arrays3d)
#
-# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:x 7:y 8:z 9:data
-# data columns: 9:arrays3d[0]
+# column format: 1:it 2:ix 3:iy 4:iz 5:time 6:data
+# data columns: 6:arrays3d[0]
0 0 0 0 0 0.0535714285714286
0 1 0 0 0 0.0535714285714286
0 2 0 0 0 0.0535714285714286
diff --git a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc
index 0ce40eee4..40a2a5d56 100644
--- a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc
+++ b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc
@@ -82,6 +82,10 @@ static int WriteAttribute (hid_t const group,
char const * const name,
char const * const * const svalues,
int const nvalues);
+static int WriteAttribute (hid_t const group,
+ char const * const name,
+ hsize_t const * const svalues,
+ int const nvalues);
static int WriteLargeAttribute (hid_t const group,
char const * const name,
char const * const svalue);
@@ -333,7 +337,9 @@ int AddSliceAttributes(const cGH* const cctkGH,
const vector<int>& ioffsetdenom,
const vector<int>& bbox,
const vector<int>& nghostzones,
- hid_t& dataset)
+ hid_t& dataset,
+ const vector<hsize_t>& shape,
+ const bool is_index)
{
int error_count = 0;
@@ -360,6 +366,10 @@ int AddSliceAttributes(const cGH* const cctkGH,
int const map_is_cartesian = MultiPatch_MapIsCartesian (map);
error_count += WriteAttribute(dataset, "MapIsCartesian", map_is_cartesian);
}
+ if (is_index) {
+ error_count += WriteAttribute(dataset, "h5shape", &shape[0], shape.size());
+ }
+
return error_count;
}
@@ -1473,6 +1483,27 @@ static int WriteAttribute (hid_t const group,
}
+// Write an array of hsize_t attributes
+static int WriteAttribute (hid_t const group,
+ char const * const name,
+ hsize_t const * const svalues,
+ int const nvalues)
+{
+ hid_t dataspace, attribute;
+ int error_count = 0;
+
+ hsize_t const size = nvalues;
+ HDF5_ERROR (dataspace = H5Screate_simple (1, & size, NULL));
+ HDF5_ERROR (attribute = H5Acreate (group, name, H5T_NATIVE_HSIZE,
+ dataspace, H5P_DEFAULT));
+ HDF5_ERROR (H5Awrite (attribute, H5T_NATIVE_HSIZE, svalues));
+ HDF5_ERROR (H5Aclose (attribute));
+ HDF5_ERROR (H5Sclose (dataspace));
+
+ return error_count;
+}
+
+
// Write an array of string attributes
static int WriteAttribute (hid_t const group,
char const * const name,
diff --git a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh
index 42c7d6622..31d97bc9a 100644
--- a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh
+++ b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh
@@ -145,7 +145,9 @@ namespace CarpetIOHDF5
const vector<int>& ioffsetdenom,
const vector<int>& bbox,
const vector<int>& nghostzones,
- hid_t& dataset);
+ hid_t& dataset,
+ const vector<hsize_t>& shape,
+ const bool is_index);
// returns an HDF5 datatype corresponding to the given CCTK datatype
hid_t CCTKtoHDF5_Datatype (const cGH* const cctkGH,
@@ -220,10 +222,12 @@ namespace CarpetIOHDF5
const vect<int,outdim>& dirs,
bool is_new_file,
bool truncate_file,
- hid_t& file);
+ hid_t& file,
+ hid_t& index_file);
static int WriteHDF5 (const cGH* cctkGH,
hid_t& file,
+ hid_t& index_file,
vector<gdata*> const gfdatas,
const bbox<int,dim>& gfext,
const int vi,
@@ -240,7 +244,8 @@ namespace CarpetIOHDF5
const vect<CCTK_REAL,dim>& coord_upper);
static int CloseFile (const cGH* cctkGH,
- hid_t& file);
+ hid_t& file,
+ hid_t& index_file);
static ivect GetOutputOffset (const cGH* cctkGH, int m,
const vect<int,outdim>& dirs);
diff --git a/Carpet/CarpetIOHDF5/src/OutputSlice.cc b/Carpet/CarpetIOHDF5/src/OutputSlice.cc
index 4f1620c0e..acc94493c 100644
--- a/Carpet/CarpetIOHDF5/src/OutputSlice.cc
+++ b/Carpet/CarpetIOHDF5/src/OutputSlice.cc
@@ -547,10 +547,10 @@ namespace CarpetIOHDF5 {
const int m_max = groupdata.grouptype == CCTK_GF ? Carpet::maps : 1;
for (int m = m_min; m < m_max; ++ m) {
- hid_t file = -1;
+ hid_t file = -1, index_file = -1;
int error_count = 0;
error_count += OpenFile (cctkGH, m, vindex, numvars, alias, basefilename,
- dirs, is_new_file, truncate_file, file);
+ dirs, is_new_file, truncate_file, file, index_file);
// Find the output offset
const ivect offset =
@@ -667,7 +667,7 @@ namespace CarpetIOHDF5 {
ext != exts.end();
++ ext, ++ c_offset) {
error_count +=
- WriteHDF5 (cctkGH, file, tmpdatas, *ext, vindex,
+ WriteHDF5 (cctkGH, file, index_file, tmpdatas, *ext, vindex,
offsets1[c_offset], dirs,
rl, ml, m, c, c_base + c_offset, tl,
coord_time, coord_lower[c_offset],
@@ -688,7 +688,7 @@ namespace CarpetIOHDF5 {
c_base += exts.setsize();
} // for c
- error_count += CloseFile (cctkGH, file);
+ error_count += CloseFile (cctkGH, file, index_file);
if (error_count > 0 and abort_on_io_errors) {
CCTK_WARN (0, "Aborting simulation due to previous I/O errors");
}
@@ -769,7 +769,8 @@ namespace CarpetIOHDF5 {
const vect<int,outdim>& dirs,
const bool is_new_file,
const bool truncate_file,
- hid_t& file)
+ hid_t& file,
+ hid_t& index_file)
{
DECLARE_CCTK_PARAMETERS;
@@ -800,7 +801,9 @@ namespace CarpetIOHDF5 {
if (nioprocs > 1) {
filenamebuf << ".file_" << dist::rank();
}
- filenamebuf << ".h5";
+ string index_filename(filenamebuf.str() + ".idx" + out_extension);
+ filenamebuf << out_extension;
+
// we need a persistent temporary here
const string filenamestr = filenamebuf.str();
const char* const filename = filenamestr.c_str();
@@ -816,11 +819,23 @@ namespace CarpetIOHDF5 {
if (truncate_file or not file_exists) {
HDF5_ERROR(file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT,
H5P_DEFAULT));
+ if (output_index) {
+ HDF5_ERROR (index_file = H5Fcreate (index_filename.c_str(),
+ H5F_ACC_TRUNC, H5P_DEFAULT,
+ H5P_DEFAULT));
+ }
// write metadata information
error_count +=
WriteMetadata(cctkGH, nioprocs, vindex, numvars, false, file);
+
+ if (output_index) {
+ error_count +=
+ WriteMetadata (cctkGH, nioprocs, vindex, numvars, false, index_file);
+ }
} else {
HDF5_ERROR (file = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT));
+ if (output_index)
+ HDF5_ERROR (index_file = H5Fopen (index_filename.c_str(), H5F_ACC_RDWR, H5P_DEFAULT));
}
io_files += 1;
@@ -831,7 +846,7 @@ namespace CarpetIOHDF5 {
template<int outdim>
int IOHDF5<outdim>::CloseFile (const cGH* const cctkGH,
- hid_t& file)
+ hid_t& file, hid_t& index_file)
{
DECLARE_CCTK_PARAMETERS;
@@ -841,6 +856,9 @@ namespace CarpetIOHDF5 {
if (file >= 0) {
HDF5_ERROR(H5Fclose(file));
}
+ if (output_index and index_file >= 0) {
+ HDF5_ERROR (H5Fclose (index_file));
+ }
}
if (nioprocs > 1) {
CCTK_REAL local[2], global[2];
@@ -1242,6 +1260,7 @@ namespace CarpetIOHDF5 {
template<int outdim>
int IOHDF5<outdim>::WriteHDF5 (const cGH* cctkGH,
hid_t& file,
+ hid_t& indexfile,
vector<gdata*> const gfdatas,
const bbox<int,dim>& gfext,
const int vi,
@@ -1457,6 +1476,8 @@ namespace CarpetIOHDF5 {
if (request->check_exist) {
H5E_BEGIN_TRY {
H5Gunlink(file, datasetname.c_str());
+ if (indexfile != -1)
+ H5Gunlink (indexfile, datasetname.c_str());
} H5E_END_TRY;
}
// free I/O request structure
@@ -1465,16 +1486,30 @@ namespace CarpetIOHDF5 {
}
// write the dataset
- hid_t dataset;
+ hid_t dataset, index_dataset;
HDF5_ERROR(dataset =
H5Dcreate (file, datasetname.c_str(),
slice_type, slice_space, plist));
+ if (indexfile != -1) {
+ HDF5_ERROR (index_dataset = H5Dcreate (indexfile, datasetname.c_str(),
+ slice_type, slice_space, plist));
+ }
+
HDF5_ERROR(H5Dwrite (dataset, mem_type, mem_space, H5S_ALL,
H5P_DEFAULT, gfdatas[n]->storage()));
error_count +=
AddSliceAttributes (cctkGH, fullname, rl, ml, m, tl, origin, delta,
- iorigin, ioffset, ioffsetdenom, bbox, nghostzones, dataset);
+ iorigin, ioffset, ioffsetdenom, bbox, nghostzones,
+ dataset, slice_shape, false);
HDF5_ERROR(H5Dclose (dataset));
+
+ if (indexfile != -1) {
+ error_count +=
+ AddSliceAttributes (cctkGH, fullname, rl, ml, m, tl, origin, delta,
+ iorigin, ioffset, ioffsetdenom, bbox, nghostzones,
+ index_dataset, slice_shape, true);
+ HDF5_ERROR (H5Dclose (index_dataset));
+ }
free (fullname);
io_bytes +=
diff --git a/Carpet/LoopControl/param.ccl b/Carpet/LoopControl/param.ccl
index b6ff5cab5..01b7f254c 100644
--- a/Carpet/LoopControl/param.ccl
+++ b/Carpet/LoopControl/param.ccl
@@ -5,7 +5,7 @@
BOOLEAN printstats "Output timing statistics" STEERABLE=recover
{
-} "yes"
+} "no"
CCTK_REAL printstats_every_minutes "Output timing statistics every so many minutes" STEERABLE=always
{