| 99 |
|
#ifdef IS_MPI |
| 100 |
|
int streamSize; |
| 101 |
|
const int masterNode = 0; |
| 102 |
< |
int commStatus; |
| 102 |
> |
|
| 103 |
|
if (worldRank == masterNode) { |
| 104 |
< |
commStatus = MPI_Bcast(&mdFileVersion, 1, MPI_INT, masterNode, MPI_COMM_WORLD); |
| 104 |
> |
MPI::COMM_WORLD.Bcast(&mdFileVersion, 1, MPI::INT, masterNode); |
| 105 |
|
#endif |
| 106 |
|
SimplePreprocessor preprocessor; |
| 107 |
|
preprocessor.preprocess(rawMetaDataStream, filename, startOfMetaDataBlock, ppStream); |
| 109 |
|
#ifdef IS_MPI |
| 110 |
|
//brocasting the stream size |
| 111 |
|
streamSize = ppStream.str().size() +1; |
| 112 |
< |
commStatus = MPI_Bcast(&streamSize, 1, MPI_LONG, masterNode, MPI_COMM_WORLD); |
| 113 |
< |
|
| 114 |
< |
commStatus = MPI_Bcast(static_cast<void*>(const_cast<char*>(ppStream.str().c_str())), streamSize, MPI_CHAR, masterNode, MPI_COMM_WORLD); |
| 115 |
< |
|
| 116 |
< |
|
| 112 |
> |
MPI::COMM_WORLD.Bcast(&streamSize, 1, MPI::LONG, masterNode); |
| 113 |
> |
MPI::COMM_WORLD.Bcast(static_cast<void*>(const_cast<char*>(ppStream.str().c_str())), streamSize, MPI::CHAR, masterNode); |
| 114 |
> |
|
| 115 |
|
} else { |
| 116 |
+ |
MPI::COMM_WORLD.Bcast(&mdFileVersion, 1, MPI::INT, masterNode); |
| 117 |
|
|
| 119 |
– |
commStatus = MPI_Bcast(&mdFileVersion, 1, MPI_INT, masterNode, MPI_COMM_WORLD); |
| 120 |
– |
|
| 118 |
|
//get stream size |
| 119 |
< |
commStatus = MPI_Bcast(&streamSize, 1, MPI_LONG, masterNode, MPI_COMM_WORLD); |
| 119 |
> |
MPI::COMM_WORLD.Bcast(&streamSize, 1, MPI::LONG, masterNode); |
| 120 |
|
|
| 121 |
|
char* buf = new char[streamSize]; |
| 122 |
|
assert(buf); |
| 123 |
|
|
| 124 |
|
//receive file content |
| 125 |
< |
commStatus = MPI_Bcast(buf, streamSize, MPI_CHAR, masterNode, MPI_COMM_WORLD); |
| 125 |
> |
MPI::COMM_WORLD.Bcast(buf, streamSize, MPI::CHAR, masterNode); |
| 126 |
|
|
| 127 |
|
ppStream.str(buf); |
| 128 |
|
delete [] buf; |
| 132 |
– |
|
| 129 |
|
} |
| 130 |
|
#endif |
| 131 |
|
// Create a scanner that reads from the input stream |
| 791 |
|
} |
| 792 |
|
} |
| 793 |
|
|
| 794 |
< |
if (simParams->getOutputElectricField()) { |
| 794 |
> |
if (simParams->getOutputElectricField() | simParams->haveElectricField()) { |
| 795 |
|
storageLayout |= DataStorage::dslElectricField; |
| 796 |
|
} |
| 797 |
|
|
| 801 |
|
storageLayout |= DataStorage::dslFlucQForce; |
| 802 |
|
} |
| 803 |
|
|
| 804 |
+ |
info->setStorageLayout(storageLayout); |
| 805 |
+ |
|
| 806 |
|
return storageLayout; |
| 807 |
|
} |
| 808 |
|
|