Skip to content

Commit 816c96c

Browse files
author
Martin D. Weinberg
committed
Make HDF5 overwrite the default
1 parent db156c4 commit 816c96c

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

src/OutHDF5.H

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
@param nint is the number of steps between dumps
1212
@param nbeg is suffix of the first phase space %dump
1313
@param timer set to true turns on wall-clock timer for PS output
14-
@param threads number of threads for binary writes
1514
@param gadget set to true for Gadget-4-type HDF5
1615
@param noids set to true turns off particle id writing
1716
@param checkpt sets checkpoint mode: write a real8 snapshot with a unique filename
@@ -27,7 +26,7 @@ private:
2726
bool real4=true, real8=false, ids=true, gadget4=false, chkpt=false;
2827
bool overwrite=false, timer;
2928
unsigned write_flags;
30-
int nbeg, threads;
29+
int nbeg;
3130
void initialize(void);
3231
std::vector<double> masses;
3332
std::vector<bool> multim;
@@ -58,7 +57,6 @@ public:
5857
\param last should be true on final step to force phase space %dump
5958
indepentently of whether or not the frequency criterion is met
6059
\param timer set to true turns on wall-clock timer for PS output
61-
\param threads is the thread count for binary writes
6260
\param noids set to true turns off particle id writing
6361
\param gadget set to true for Gadget-4-type HDF5
6462
\param checkpt set to true for checkpoint mode

src/OutHDF5.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ OutHDF5::valid_keys = {
3030
"real4",
3131
"real8",
3232
"timer",
33-
"threads,"
3433
"gadget",
3534
"checkpt",
3635
"preserve",
@@ -103,7 +102,7 @@ void OutHDF5::initialize()
103102

104103
write_flags = H5F_ACC_TRUNC;
105104
if (Output::conf["preserve"]) {
106-
bool overwrite = Output::conf["preserve"].as<bool>();
105+
bool preserve = Output::conf["preserve"].as<bool>();
107106
write_flags = preserve ? H5F_ACC_EXCL : H5F_ACC_TRUNC;
108107
}
109108

@@ -116,11 +115,6 @@ void OutHDF5::initialize()
116115
else
117116
timer = false;
118117

119-
if (Output::conf["threads"])
120-
threads = Output::conf["threads"].as<int>();
121-
else
122-
threads = 0;
123-
124118
if (Output::conf["gadget"])
125119
gadget4 = Output::conf["gadget"].as<bool>();
126120
else

0 commit comments

Comments
 (0)