You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wish to stream data using ADIOS2 backend in a non-blocking way, minimal working example below.
The memory usage keeps growing although I specified queue limit =1 and discard iterations when queue full. Am I using it wrong?
#include<openPMD/openPMD.hpp>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<memory>
#include<numeric>
#include<unistd.h>// sleep(), for linux using std::cout;
usingnamespaceopenPMD;intmain(int argc, char* argv[]) {
unsignedlong i, j;
std::vector<unsignedlong> chunk;
std::vector<std::vector<unsignedlong>> chunks;
// open file for streaming
Series series = Series("samples/mwe.sst", Access::CREATE,
R"( { "adios2": { "engine": { "parameters": { "DataTransport": "WAN", "RendezvousReaderCount": "0", "QueueLimit": "1", "QueueFullPolicy": "Discard" } } } })");
unsignedlong L=10000000; // data array length
Datatype datatype = determineDatatype<unsignedlong>();
Dataset dataset = Dataset(datatype, {L});
int N = 20; // No. of iterationsfor(i=0; i<N; i++) {
cout << "Iteration: " << i << "\n";
// prepare local datafor(j=0; j<L; j++)
chunk.push_back(j+i*L);
Iteration it = series.writeIterations()[i];
MeshRecordComponent mesh =
it.meshes["field"][MeshRecordComponent::SCALAR];
mesh.resetDataset(dataset);
mesh.storeChunk(chunk, {0}, {L});
it.close();
chunk.clear();
sleep(1);
}
series.close();
sleep(10);
return0;
}
// ...
Software Environment:
version of openPMD-api: 0.15.1
installed openPMD-api via: from source
The text was updated successfully, but these errors were encountered:
Apart from this, you will see a slight increase in memory usage over time as openPMD currently does not erase past Iterations. Better support for long-running setups is an active topic that we currently are working on, e.g. erasing past iterations will come with #1592.
The addition of "iteration_encoding": "variable_based" fixed the increasing memory usage on the receiving side (increasing with number of iterations). It also reduced the rate of increasing memory usage on the sender side but not zero.
Thank you!
I wish to stream data using ADIOS2 backend in a non-blocking way, minimal working example below.
The memory usage keeps growing although I specified queue limit =1 and discard iterations when queue full. Am I using it wrong?
Software Environment:
The text was updated successfully, but these errors were encountered: