Skip to content

Commit

Permalink
Streaming examples: Set WAN as default transport
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Aug 18, 2023
1 parent dd53961 commit 4a4bb7a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
11 changes: 10 additions & 1 deletion examples/10_streaming_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ int main()
return 0;
}

Series series = Series("electrons.sst", Access::READ_LINEAR);
Series series = Series("electrons.sst", Access::READ_LINEAR, R"(
{
"adios2": {
"engine": {
"parameters": {
"DataTransport": "WAN"
}
}
}
})");

// `Series::writeIterations()` and `Series::readIterations()` are
// intentionally restricted APIs that ensure a workflow which also works
Expand Down
3 changes: 2 additions & 1 deletion examples/10_streaming_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# pass-through for ADIOS2 engine parameters
# https://adios2.readthedocs.io/en/latest/engines/engines.html
config = {'adios2': {'engine': {}, 'dataset': {}}}
config['adios2']['engine'] = {'parameters': {'Threads': '4'}}
config['adios2']['engine'] = {'parameters':
{'Threads': '4', 'DataTransport': 'WAN'}}
config['adios2']['dataset'] = {'operators': [{'type': 'bzip2'}]}

if __name__ == "__main__":
Expand Down
11 changes: 10 additions & 1 deletion examples/10_streaming_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ int main()
}

// open file for writing
Series series = Series("electrons.sst", Access::CREATE);
Series series = Series("electrons.sst", Access::CREATE, R"(
{
"adios2": {
"engine": {
"parameters": {
"DataTransport": "WAN"
}
}
}
})");

Datatype datatype = determineDatatype<position_t>();
constexpr unsigned long length = 10ul;
Expand Down
3 changes: 2 additions & 1 deletion examples/10_streaming_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
# pass-through for ADIOS2 engine parameters
# https://adios2.readthedocs.io/en/latest/engines/engines.html
config = {'adios2': {'engine': {}, 'dataset': {}}}
config['adios2']['engine'] = {'parameters': {'Threads': '4'}}
config['adios2']['engine'] = {'parameters':
{'Threads': '4', 'DataTransport': 'WAN'}}
config['adios2']['dataset'] = {'operators': [{'type': 'bzip2'}]}

if __name__ == "__main__":
Expand Down

0 comments on commit 4a4bb7a

Please sign in to comment.