Skip to content

Commit

Permalink
Parallel testing
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Nov 11, 2021
1 parent 1c556e7 commit f2348aa
Showing 1 changed file with 46 additions and 49 deletions.
95 changes: 46 additions & 49 deletions test/ParallelIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,62 +1064,59 @@ TEST_CASE( "parallel_adios2_json_config", "[parallel][adios2]" )
MPI_Comm_rank( MPI_COMM_WORLD, &rank );

std::string writeConfigBP3 = R"END(
{
"adios2": {
"engine": {
"type": "bp3",
"unused": "parameter",
"parameters": {
"BufferGrowthFactor": "2.0",
"Profile": "On"
}
},
"unused": "as well",
"dataset": {
"operators": [
{
"type": "blosc",
"parameters": {
"clevel": "1",
"doshuffle": "BLOSC_BITSHUFFLE"
}
}
]
}
}
}
[adios2]
unused = "parameter"
[adios2.engine]
type = "bp3"
unused = "as well"
[adios2.engine.parameters]
BufferGrowthFactor = "2.0"
Profile = "On"
[[adios2.dataset.operators]]
type = "blosc"
[adios2.dataset.operators.parameters]
clevel = "1"
doshuffle = "BLOSC_BITSHUFFLE"
)END";
std::string writeConfigBP4 = R"END(
{
"adios2": {
"engine": {
"type": "bp4",
"unused": "parameter",
"parameters": {
"BufferGrowthFactor": "2.0",
"Profile": "On"
}
},
"unused": "as well",
"dataset": {
"operators": [
{
"type": "blosc",
"parameters": {
"clevel": "1",
"doshuffle": "BLOSC_BITSHUFFLE"
}
}
]
}
}
}
[adios2]
unused = "parameter"
[adios2.engine]
type = "bp4"
unused = "as well"
[adios2.engine.parameters]
BufferGrowthFactor = "2.0"
Profile = "On"
[[adios2.dataset.operators]]
type = "blosc"
[adios2.dataset.operators.parameters]
clevel = 1
doshuffle = "BLOSC_BITSHUFFLE"
)END";
auto const write = [ size, rank ](
std::string const & filename,
std::string const & config ) {
if( rank == 0 )
{
std::fstream file;
file.open( "../samples/write_config.toml", std::ios_base::out );
file << config;
file.flush();
}
MPI_Barrier( MPI_COMM_WORLD );
openPMD::Series series(
filename, openPMD::Access::CREATE, MPI_COMM_WORLD, config );
filename,
openPMD::Access::CREATE,
MPI_COMM_WORLD,
"@../samples/write_config.toml" );
auto E_x = series.iterations[ 0 ].meshes[ "E" ][ "x" ];
openPMD::Dataset ds(
openPMD::Datatype::INT, { unsigned( size ), 1000 } );
Expand Down

0 comments on commit f2348aa

Please sign in to comment.