Skip to content

Commit bb80737

Browse files
committed
fixes error check bugs
- fixes missing error check in IOStream init - removes stray checks of old error code that were inadvertantly left in
1 parent 595f700 commit bb80737

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

components/omega/src/infra/IOStream.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ void IOStream::init(Clock *&ModelClock //< [inout] Omega model clock
6464

6565
// Call the create routine to create the stream
6666
int LocErr = create(StreamName, StreamCfg, ModelClock);
67-
LOG_WARN("Errors encountered creating stream {}."
68-
"Stream will be ignored",
69-
StreamName);
67+
if (LocErr != Success)
68+
LOG_WARN("Errors encountered creating stream {}."
69+
"Stream will be ignored",
70+
StreamName);
7071

7172
} // end loop over all streams
7273

components/omega/src/ocn/HorzMesh.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ void HorzMesh::createDimensions(Decomp *MeshDecomp) {
286286
// Initialize the parallel IO decompositions for the mesh variables
287287
void HorzMesh::initParallelIO(Decomp *MeshDecomp) {
288288

289-
I4 Err;
290289
I4 NDims = 1;
291290
IO::Rearranger Rearr = IO::RearrBox;
292291

@@ -319,8 +318,6 @@ void HorzMesh::initParallelIO(Decomp *MeshDecomp) {
319318

320319
VertexDecompR8 = IO::createDecomp(IO::IOTypeR8, NDims, VertexDims,
321320
NVerticesAll, VertexID, Rearr);
322-
if (Err != 0)
323-
LOG_CRITICAL("HorzMesh: error creating vertex IO decomposition");
324321

325322
// Create the IO decomp for arrays with (NEdges, 2*MaxEdges) dimensions
326323
NDims = 2;
@@ -338,8 +335,6 @@ void HorzMesh::initParallelIO(Decomp *MeshDecomp) {
338335

339336
OnEdgeDecompR8 = IO::createDecomp(IO::IOTypeR8, NDims, OnEdgeDims2,
340337
OnEdgeSize2, OnEdgeOffset2, Rearr);
341-
if (Err != 0)
342-
LOG_CRITICAL("HorzMesh: error creating OnEdge IO decomposition");
343338

344339
// Create the IO decomp for arrays with (NVertices, VertexDegree) dimensions
345340
std::vector<I4> OnVertexDims{MeshDecomp->NVerticesGlobal, VertexDegree};
@@ -354,8 +349,6 @@ void HorzMesh::initParallelIO(Decomp *MeshDecomp) {
354349

355350
OnVertexDecompR8 = IO::createDecomp(IO::IOTypeR8, NDims, OnVertexDims,
356351
OnVertexSize, OnVertexOffset, Rearr);
357-
if (Err != 0)
358-
LOG_CRITICAL("HorzMesh: error creating OnVertex IO decomposition");
359352

360353
} // end initParallelIO
361354

0 commit comments

Comments
 (0)