Changeset 8f0a211 for GenericIO.h
- Timestamp:
- 04/12/16 19:18:46 (8 years ago)
- Branches:
- master, pympi
- Children:
- 14e73bb
- Parents:
- a4fee13
- git-author:
- Hal Finkel <hfinkel@…> (04/12/16 19:18:46)
- git-committer:
- Hal Finkel <hfinkel@…> (04/12/16 19:18:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GenericIO.h
ra4fee13 r8f0a211 188 188 GenericIO(const MPI_Comm &C, const std::string &FN, unsigned FIOT = -1) 189 189 : NElems(0), FileIOType(FIOT == (unsigned) -1 ? DefaultFileIOType : FIOT), 190 Partition(DefaultPartition), Comm(C), FileName(FN), SplitComm(MPI_COMM_NULL) { 190 Partition(DefaultPartition), Comm(C), FileName(FN), Redistributing(false), 191 DisableCollErrChecking(false), SplitComm(MPI_COMM_NULL) { 191 192 std::fill(PhysOrigin, PhysOrigin + 3, 0.0); 192 193 std::fill(PhysScale, PhysScale + 3, 0.0); … … 195 196 GenericIO(const std::string &FN, unsigned FIOT = -1) 196 197 : NElems(0), FileIOType(FIOT == (unsigned) -1 ? DefaultFileIOType : FIOT), 197 Partition(DefaultPartition), FileName(FN) { 198 Partition(DefaultPartition), FileName(FN), Redistributing(false), 199 DisableCollErrChecking(false) { 198 200 std::fill(PhysOrigin, PhysOrigin + 3, 0.0); 199 201 std::fill(PhysScale, PhysScale + 3, 0.0); … … 264 266 #endif 265 267 268 enum MismatchBehavior { 269 MismatchAllowed, 270 MismatchDisallowed, 271 MismatchRedistribute 272 }; 273 266 274 // Reading 267 void openAndReadHeader( bool MustMatch = true, int EffRank = -1,268 bool CheckPartMap = true);275 void openAndReadHeader(MismatchBehavior MB = MismatchDisallowed, 276 int EffRank = -1, bool CheckPartMap = true); 269 277 270 278 int readNRanks(); … … 280 288 281 289 int getNumberOfVariables() { return this->Vars.size(); }; 282 283 290 284 291 void getVariableInfo(std::vector<VariableInfo> &VI); … … 330 337 331 338 template <bool IsBigEndian> 332 void readHeaderLeader(void *GHPtr, bool MustMatch, int SplitNRanks,333 std::string &LocalFileName, uint64_t &HeaderSize,334 std::vector<char> &Header);339 void readHeaderLeader(void *GHPtr, MismatchBehavior MB, int Rank, int NRanks, 340 int SplitNRanks, std::string &LocalFileName, 341 uint64_t &HeaderSize, std::vector<char> &Header); 335 342 336 343 template <bool IsBigEndian> … … 358 365 void readCoords(int Coords[3], int EffRank); 359 366 360 template <bool IsBigEndian> 361 void readData(int EffRank, bool PrintStats, bool CollStats); 367 void readData(int EffRank, size_t RowOffset, int Rank, 368 uint64_t &TotalReadSize, int NErrs[3]); 369 370 template <bool IsBigEndian> 371 void readData(int EffRank, size_t RowOffset, 372 int Rank, uint64_t &TotalReadSize, int NErrs[3]); 362 373 363 374 template <bool IsBigEndian> … … 384 395 static std::size_t CollectiveMPIIOThreshold; 385 396 #endif 397 398 // When redistributing, the rank blocks which this process should read. 399 bool Redistributing, DisableCollErrChecking; 400 std::vector<int> SourceRanks; 386 401 387 402 std::vector<int> RankMap;
Note: See TracChangeset
for help on using the changeset viewer.