# | Line 1 | Line 1 | |
---|---|---|
1 | < | /* |
1 | > | /* |
2 | * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. | |
3 | * | |
4 | * The University of Notre Dame grants you ("Licensee") a | |
# | Line 70 | Line 70 | namespace oopse { | |
70 | namespace oopse { | |
71 | ||
72 | DumpReader::DumpReader(SimInfo* info, const std::string& filename) | |
73 | < | : info_(info), filename_(filename), isScanned_(false), nframes_(0) { |
73 | > | : info_(info), filename_(filename), isScanned_(false), nframes_(0) { |
74 | ||
75 | #ifdef IS_MPI | |
76 | ||
77 | < | if (worldRank == 0) { |
77 | > | if (worldRank == 0) { |
78 | #endif | |
79 | ||
80 | < | inFile_ = fopen(filename_.c_str(), "r"); |
80 | > | inFile_ = fopen(filename_.c_str(), "r"); |
81 | ||
82 | < | if (inFile_ == NULL) { |
83 | < | sprintf(painCave.errMsg, "DumpReader: Cannot open file: %s\n", filename_.c_str()); |
84 | < | painCave.isFatal = 1; |
85 | < | simError(); |
86 | < | } |
82 | > | if (inFile_ == NULL) { |
83 | > | sprintf(painCave.errMsg, "DumpReader: Cannot open file: %s\n", filename_.c_str()); |
84 | > | painCave.isFatal = 1; |
85 | > | simError(); |
86 | > | } |
87 | ||
88 | #ifdef IS_MPI | |
89 | ||
90 | < | } |
90 | > | } |
91 | ||
92 | < | strcpy(checkPointMsg, "Dump file opened for reading successfully."); |
93 | < | MPIcheckPoint(); |
92 | > | strcpy(checkPointMsg, "Dump file opened for reading successfully."); |
93 | > | MPIcheckPoint(); |
94 | ||
95 | #endif | |
96 | ||
97 | < | return; |
98 | < | } |
97 | > | return; |
98 | > | } |
99 | ||
100 | DumpReader::~DumpReader() { | |
101 | ||
# | Line 219 | Line 219 | namespace oopse { | |
219 | } | |
220 | ||
221 | void DumpReader::readFrame(int whichFrame) { | |
222 | + | if (!isScanned_) |
223 | + | scanFile(); |
224 | + | |
225 | int storageLayout = info_->getSnapshotManager()->getStorageLayout(); | |
226 | ||
227 | if (storageLayout & DataStorage::dslPosition) { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |