| 195 | /////////////////////////////////////////////////////////////////////////////// |
| 196 | |
| 197 | int PIOAdaptor::initializeGlobal(const char* PIOFileName) |
| 198 | { |
| 199 | int success; |
| 200 | if (this->Rank == 0) |
| 201 | { |
| 202 | success = collectMetaData(PIOFileName); |
| 203 | this->Controller->Broadcast(&success, 1, 0); |
| 204 | } |
| 205 | else |
| 206 | { |
| 207 | this->Controller->Broadcast(&success, 1, 0); |
| 208 | } |
| 209 | |
| 210 | if (!success) |
| 211 | { |
| 212 | return 0; |
| 213 | } |
| 214 | |
| 215 | // Share with all processors |
| 216 | BroadcastStringVector(this->Controller, this->dumpFileName, this->Rank); |
| 217 | BroadcastStringVector(this->Controller, this->variableName, this->Rank); |
| 218 | BroadcastStringVector(this->Controller, this->variableDefault, this->Rank); |
| 219 | BroadcastDoubleVector(this->Controller, this->CycleIndex, this->Rank); |
| 220 | BroadcastDoubleVector(this->Controller, this->SimulationTime, this->Rank); |
| 221 | BroadcastDoubleVector(this->Controller, this->PIOFileIndex, this->Rank); |
| 222 | |
| 223 | int tmp = static_cast<int>(this->useHTG); |
| 224 | this->Controller->Broadcast(&tmp, 1, 0); |
| 225 | this->useHTG = static_cast<bool>(tmp); |
| 226 | tmp = static_cast<int>(this->useTracer); |
| 227 | this->Controller->Broadcast(&tmp, 1, 0); |
| 228 | this->useTracer = static_cast<bool>(tmp); |
| 229 | tmp = static_cast<int>(this->useFloat64); |
| 230 | this->Controller->Broadcast(&tmp, 1, 0); |
| 231 | this->useFloat64 = static_cast<bool>(tmp); |
| 232 | tmp = static_cast<int>(this->hasTracers); |
| 233 | this->Controller->Broadcast(&tmp, 1, 0); |
| 234 | this->hasTracers = static_cast<bool>(tmp); |
| 235 | return 1; |
| 236 | } |
| 237 | |
| 238 | /////////////////////////////////////////////////////////////////////////////// |
| 239 | // |
no test coverage detected