From 835ba96fa274afdd44c2e5020d9a7f1a12ba9125 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 13 May 2017 15:25:38 +0200 Subject: [PATCH] Make gadget use fully buffered I/O --- src/loadGadget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/loadGadget.cpp b/src/loadGadget.cpp index 9a9f165..0a5a0f0 100644 --- a/src/loadGadget.cpp +++ b/src/loadGadget.cpp @@ -248,7 +248,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, try { ENSURE("POS "); - f->beginCheckpoint(); + f->beginCheckpoint(true); // Use more memory but faster I/O if (f->getBlockSize() != NumPart*float_size*3) { // Check that single would work if (f->getBlockSize() == NumPart*sizeof(float)*3) { @@ -299,7 +299,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, try { ENSURE("VEL "); - f->beginCheckpoint(); + f->beginCheckpoint(true); for(int k = 0, p = 0; k < 6; k++) { for(int n = 0; n < h.npart[k]; n++) { // THIS IS GADGET 1 @@ -343,7 +343,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, throw InvalidUnformattedAccess(); } - f->beginCheckpoint(); + f->beginCheckpoint(true); data->Id = new int64_t[data->NumPart]; if (data->Id == 0) {