Skip to content

Commit 4abee4d

Browse files
committed
wip: debugging state
1 parent 01a2539 commit 4abee4d

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

src/RecordComponent.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,15 @@ namespace
238238
RecordComponent &RecordComponent::resetDataset(Dataset d)
239239
{
240240
auto &rc = get();
241-
auto cleanup = defer([&rc, this]() {
242-
if (rc.m_dataset.has_value() &&
243-
rc.m_dataset->dtype != Datatype::UNDEFINED &&
244-
IOHandler()->m_seriesStatus != internal::SeriesStatus::Parsing)
245-
{
246-
seriesFlush_impl</* flush_entire_series = */ false>(
247-
{FlushLevel::SkeletonOnly}, /* flush_io_handler = */ true);
248-
}
249-
});
241+
// auto cleanup = defer([&rc, this]() {
242+
// if (rc.m_dataset.has_value() &&
243+
// rc.m_dataset->dtype != Datatype::UNDEFINED &&
244+
// IOHandler()->m_seriesStatus != internal::SeriesStatus::Parsing)
245+
// {
246+
// seriesFlush_impl</* flush_entire_series = */ false>(
247+
// {FlushLevel::SkeletonOnly}, /* flush_io_handler = */ true);
248+
// }
249+
// });
250250
if (written())
251251
{
252252
if (!rc.m_dataset.has_value())

src/auxiliary/Mpi.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ std::vector<std::string> distributeStringsToAllRanks(
9494
int *sizesBuffer = new int[size];
9595
int *displs = new int[size];
9696

97+
MPI_Barrier(communicator);
98+
9799
MPI_Allgather(
98100
&sendLength, 1, MPI_INT, sizesBuffer, 1, MPI_INT, communicator);
99101

test/CatchRunner.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ int main(int argc, char *argv[])
2929

3030
Catch::Session session;
3131
// session.configData().runOrder = Catch::TestRunOrder::Declared;
32-
MPI_Bcast(
33-
&session.configData().rngSeed, 1, MPI_UINT32_T, 0, MPI_COMM_WORLD);
32+
session.configData().rngSeed = 3036063643;
33+
// MPI_Bcast(
34+
// &session.configData().rngSeed, 1, MPI_UINT32_T, 0, MPI_COMM_WORLD);
3435
int result = session.applyCommandLine(argc, argv);
3536
if (result == 0)
3637
{

test/ParallelIOTest.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2416,6 +2416,9 @@ void verifyHostnameAssignment(
24162416
}
24172417
}
24182418

2419+
static void breakpoint()
2420+
{}
2421+
24192422
void run_test()
24202423
{
24212424
/*
@@ -2541,6 +2544,7 @@ void run_test()
25412544
* (Some other options like setting all at once or reading from a file
25422545
* exist as well.)
25432546
*/
2547+
breakpoint();
25442548
series.setRankTable(writingRanksHostnames.at(mpi_rank));
25452549

25462550
auto E_x = series.iterations[0].meshes["E"]["x"];
@@ -2552,10 +2556,13 @@ void run_test()
25522556
E_x.storeChunk(data, {unsigned(mpi_rank * 2), 0}, {1, 10});
25532557
E_x.storeChunk(data, {unsigned(mpi_rank * 2 + 1), 0}, {1, 10});
25542558
series.flush();
2559+
series.close();
25552560
}
2561+
MPI_Barrier(MPI_COMM_WORLD);
25562562

25572563
{
2558-
Series series(filename, openPMD::Access::READ_ONLY, MPI_COMM_WORLD);
2564+
Series series(
2565+
filename, openPMD::Access::READ_ONLY /* , MPI_COMM_WORLD */);
25592566
/*
25602567
* Inquire the writing application's "MPI rank -> hostname" mapping.
25612568
* The reading application needs to know about its own mapping.
@@ -2565,6 +2572,7 @@ void run_test()
25652572
*/
25662573
auto rankMetaIn = series.rankTable(/* collective = */ true);
25672574
OPENPMD_REQUIRE_GUARD_WINDOWS(rankMetaIn == writingRanksHostnames);
2575+
std::abort();
25682576

25692577
auto E_x = series.iterations[0].meshes["E"]["x"];
25702578
/*

0 commit comments

Comments
 (0)