Skip to content

Commit 3da7289

Browse files
committed
Fix StructuredMeshGeneration situation with multiple OpenMP threads
1 parent a8ada90 commit 3da7289

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/atlas/meshgenerator/detail/StructuredMeshGenerator.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,12 @@ Find min and max latitudes used by this part.
360360
}
361361
lat_north = *std::min_element(thread_reduce_lat_north.begin(), thread_reduce_lat_north.end());
362362
lat_south = *std::max_element(thread_reduce_lat_south.begin(), thread_reduce_lat_south.end());
363+
if (lat_north == std::numeric_limits<idx_t>::max()) {
364+
lat_north = -1;
365+
}
366+
if (lat_south == std::numeric_limits<idx_t>::min()) {
367+
lat_south = -1;
368+
}
363369
}
364370
}
365371
}

0 commit comments

Comments
 (0)