Skip to content

Commit 77e822a

Browse files
Chunk distribution strategies (#824)
* Add chunk distribution algorithms * Python bindings: Chunk distribution algorithms * Use chunk distribtion algorithms in openpmd-pipe * Testing * Add DiscardingStrategy * Make Strategy class extensible from Python @todo Why do we need to increase the refcount twice?? * Make mergeChunks function public * Add mergeChunksFromSameSourceID * Add RoundRobinOfSourceRanks strategy * Add Blocks distribution strategy * Add BlocksOfSourceRanks strategy * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add rank info to assign() params * Fix the Python trampoline logic * Use discard strategy as second run, only consider my own hostname * IncreaseGranularity strategy supports different granularities at write and read sides * Add blocksofsourcerank to pipe script * CI fixes * Move BlockSlicer somewhere else * More thorough documentation * Cleanup, documentation, proper use of rank specification * Actual testing * Test and fix ByHostname strategy * CI fixes * Automate CoreTest * Guard against unprintableString issue on Windows * Use generic flag instead of -n 2 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 82eac56 commit 77e822a

File tree

16 files changed

+2659
-321
lines changed

16 files changed

+2659
-321
lines changed

CMakeLists.txt

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ set(CORE_SOURCE
422422
src/backend/PatchRecord.cpp
423423
src/backend/PatchRecordComponent.cpp
424424
src/backend/Writable.cpp
425-
src/benchmark/mpi/OneDimensionalBlockSlicer.cpp
425+
src/auxiliary/OneDimensionalBlockSlicer.cpp
426426
src/helper/list_series.cpp
427427
src/snapshots/ContainerImpls.cpp
428428
src/snapshots/ContainerTraits.cpp
@@ -1346,30 +1346,30 @@ if(openPMD_BUILD_TESTING)
13461346
)
13471347
add_test(NAME CLI.pipe.py
13481348
COMMAND sh -c
1349-
"${MPI_TEST_EXE} ${Python_EXECUTABLE} \
1350-
${openPMD_RUNTIME_OUTPUT_DIRECTORY}/openpmd-pipe \
1351-
--infile ../samples/git-sample/data%T.h5 \
1352-
--outfile ../samples/git-sample/data%T.bp && \
1353-
\
1354-
${MPI_TEST_EXE} ${Python_EXECUTABLE} \
1355-
${openPMD_RUNTIME_OUTPUT_DIRECTORY}/openpmd-pipe \
1356-
--infile ../samples/git-sample/data00000100.h5 \
1357-
--outfile \
1358-
../samples/git-sample/single_iteration_%T.bp && \
1359-
\
1360-
${MPI_TEST_EXE} ${Python_EXECUTABLE} \
1361-
${openPMD_RUNTIME_OUTPUT_DIRECTORY}/openpmd-pipe \
1362-
--infile ../samples/git-sample/thetaMode/data%T.h5 \
1363-
--outfile \
1364-
../samples/git-sample/thetaMode/data_%T.bp && \
1365-
\
1366-
${MPI_TEST_EXE} ${Python_EXECUTABLE} \
1367-
${openPMD_RUNTIME_OUTPUT_DIRECTORY}/openpmd-pipe \
1368-
--infile ../samples/git-sample/thetaMode/data_%T.bp \
1369-
--outfile ../samples/git-sample/thetaMode/data%T.json \
1370-
--outconfig ' \
1371-
json.attribute.mode = \"short\" \n\
1372-
json.dataset.mode = \"template_no_warn\"' \
1349+
"${MPI_TEST_EXE} ${MPIEXEC_NUMPROC_FLAG} 2 ${Python_EXECUTABLE} \
1350+
${openPMD_RUNTIME_OUTPUT_DIRECTORY}/openpmd-pipe \
1351+
--infile ../samples/git-sample/data%T.h5 \
1352+
--outfile ../samples/git-sample/data%T.bp && \
1353+
\
1354+
${MPI_TEST_EXE} ${Python_EXECUTABLE} \
1355+
${openPMD_RUNTIME_OUTPUT_DIRECTORY}/openpmd-pipe \
1356+
--infile ../samples/git-sample/data00000100.h5 \
1357+
--outfile \
1358+
../samples/git-sample/single_iteration_%T.bp && \
1359+
\
1360+
${MPI_TEST_EXE} ${MPIEXEC_NUMPROC_FLAG} 2 ${Python_EXECUTABLE} \
1361+
${openPMD_RUNTIME_OUTPUT_DIRECTORY}/openpmd-pipe \
1362+
--infile ../samples/git-sample/thetaMode/data%T.h5 \
1363+
--outfile \
1364+
../samples/git-sample/thetaMode/data_%T.bp && \
1365+
\
1366+
${MPI_TEST_EXE} ${Python_EXECUTABLE} \
1367+
${openPMD_RUNTIME_OUTPUT_DIRECTORY}/openpmd-pipe \
1368+
--infile ../samples/git-sample/thetaMode/data_%T.bp \
1369+
--outfile ../samples/git-sample/thetaMode/data%T.json \
1370+
--outconfig ' \
1371+
json.attribute.mode = \"short\" \n\
1372+
json.dataset.mode = \"template_no_warn\"' \
13731373
"
13741374
WORKING_DIRECTORY ${openPMD_RUNTIME_OUTPUT_DIRECTORY}
13751375
)

0 commit comments

Comments
 (0)