diff --git a/external/external_build.cmake b/external/external_build.cmake index bc3fe95..a1878d9 100644 --- a/external/external_build.cmake +++ b/external/external_build.cmake @@ -7,7 +7,7 @@ SET(EIGEN_URL "http://bitbucket.org/eigen/eigen/get/3.1.4.tar.gz" CACHE URL "URL SET(GENGETOPT_URL "ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.5.tar.gz" CACHE STRING "URL to download gengetopt from") SET(HDF5_URL "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.15/src/hdf5-1.8.15.tar.gz" CACHE STRING "URL to download HDF5 from") SET(NETCDF_URL "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.1.3.tar.gz" CACHE STRING "URL to download NetCDF from") -SET(BOOST_URL "http://sourceforge.net/projects/boost/files/boost/1.49.0/boost_1_49_0.tar.gz/download" CACHE STRING "URL to download Boost from") +SET(BOOST_URL "http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz/download" CACHE STRING "URL to download Boost from") SET(GSL_URL "ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz" CACHE STRING "URL to download GSL from ") mark_as_advanced(FFTW_URL EIGEN_URL HDF5_URL NETCDF_URL BOOST_URL GSL_URL) diff --git a/src/fortran.cpp b/src/fortran.cpp index 679f409..716d57b 100644 --- a/src/fortran.cpp +++ b/src/fortran.cpp @@ -78,6 +78,7 @@ int64_t UnformattedRead::position() const void UnformattedRead::seek(int64_t pos) { + f->clear(); f->seekg(pos, istream::beg); checkPointRef = checkPointAccum = 0; } diff --git a/src/loadGadget.cpp b/src/loadGadget.cpp index 9f77bb4..2642aac 100644 --- a/src/loadGadget.cpp +++ b/src/loadGadget.cpp @@ -51,8 +51,9 @@ using namespace std; void loadGadgetHeader(UnformattedRead *f, GadgetHeader& h, SimuData *data, int id) { f->beginCheckpoint(); - for (int i = 0; i < 6; i++) + for (int i = 0; i < 6; i++) { h.npart[i] = f->readInt32(); + } for (int i = 0; i < 6; i++) h.mass[i] = f->readReal64(); data->time = h.time = f->readReal64(); @@ -146,6 +147,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, f->endCheckpoint(); blockTable[block] = f->position(); f->skip(blocksize); + cout << "Got block '" << block << "', position = " << blockTable[block] << endl; } } catch (EndOfFileException&) {}