Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming examples: Set WAN as default transport #1511

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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