Skip to content
Snippets Groups Projects
Commit f299a3d1 authored by Wang, Ruonan's avatar Wang, Ruonan
Browse files

bug version

parent 7f62014c
No related branches found
No related tags found
Loading
...@@ -32,12 +32,13 @@ int main( int argc, char* argv [] ) ...@@ -32,12 +32,13 @@ int main( int argc, char* argv [] )
//Define variable and local size //Define variable and local size
//Define variable and local size //Define variable and local size
auto& ioMyFloats = adios.DefineVariable<float>( "myfloats", adios::Dims{Nx} ); auto& ioMyFloats = adios.DefineVariable<float>( "myfloats", adios::Dims{Nx} );
auto& ioMyFloat = adios.DefineVariable<float>( "myfloat", adios::Dims{1} );
// auto& ioMyDoubles = adios.DefineVariable<double>( "myDoubles", adios::Dims{Nx} ); // auto& ioMyDoubles = adios.DefineVariable<double>( "myDoubles", adios::Dims{Nx} );
// auto& ioMyCFloats = adios.DefineVariable<std::complex<float>>( "myCFloats", {3} ); // auto& ioMyCFloats = adios.DefineVariable<std::complex<float>>( "myCFloats", {3} );
//Define method for engine creation, it is basically straight-forward parameters //Define method for engine creation, it is basically straight-forward parameters
adios::Method& datamanSettings = adios.DeclareMethod( "WAN", "DataManWriter" ); //default method type is Writer adios::Method& datamanSettings = adios.DeclareMethod( "WAN", "DataManWriter" ); //default method type is Writer
datamanSettings.SetParameters( "real_time=yes", "method_type=stream", "method=zmq", "local_ip=127.0.0.1", "remote_ip=127.0.0.1", "local_port=12306", "remote_port=12307" ); datamanSettings.SetParameters( "real_time=yes", "method_type=stream", "method=dump", "local_ip=127.0.0.1", "remote_ip=127.0.0.1", "local_port=12306", "remote_port=12307" );
// datamanSettings.AddTransport( "Mdtm", "localIP=128.0.0.0.1", "remoteIP=128.0.0.0.2", "tolerances=1,2,3" ); // datamanSettings.AddTransport( "Mdtm", "localIP=128.0.0.0.1", "remoteIP=128.0.0.0.2", "tolerances=1,2,3" );
//datamanSettings.AddTransport( "ZeroMQ", "localIP=128.0.0.0.1.1", "remoteIP=128.0.0.0.2.1", "tolerances=1,2,3" ); not yet supported , will throw an exception //datamanSettings.AddTransport( "ZeroMQ", "localIP=128.0.0.0.1.1", "remoteIP=128.0.0.0.2.1", "tolerances=1,2,3" ); not yet supported , will throw an exception
...@@ -49,6 +50,7 @@ int main( int argc, char* argv [] ) ...@@ -49,6 +50,7 @@ int main( int argc, char* argv [] )
throw std::ios_base::failure( "ERROR: failed to create DataMan I/O engine at Open\n" ); throw std::ios_base::failure( "ERROR: failed to create DataMan I/O engine at Open\n" );
datamanWriter->Write( ioMyFloats, myFloats.data() ); // Base class Engine own the Write<T> that will call overloaded Write from Derived datamanWriter->Write( ioMyFloats, myFloats.data() ); // Base class Engine own the Write<T> that will call overloaded Write from Derived
datamanWriter->Write( ioMyFloat, (float) 1.12 ); // Base class Engine own the Write<T> that will call overloaded Write from Derived
// datamanWriter->Write( ioMyCFloats, myCFloats.data() ); // datamanWriter->Write( ioMyCFloats, myCFloats.data() );
datamanWriter->Close( ); datamanWriter->Close( );
} }
......
...@@ -118,12 +118,19 @@ private: ...@@ -118,12 +118,19 @@ private:
jmsg["doid"] = m_Name; jmsg["doid"] = m_Name;
jmsg["var"] = variable.m_Name; jmsg["var"] = variable.m_Name;
jmsg["dtype"] = GetType<T>(); jmsg["dtype"] = GetType<T>();
std::cout << "variable.m_Dimensions.size() = " << variable.m_Dimensions.size() << endl;
jmsg["putshape"] = variable.m_Dimensions; jmsg["putshape"] = variable.m_Dimensions;
// if(variable.m_GlobalDimensions.size() == 0) variable.m_GlobalDimensions = variable.m_Dimensions;
jmsg["varshape"] = variable.m_GlobalDimensions; jmsg["varshape"] = variable.m_GlobalDimensions;
// if(variable.m_GlobalOffsets.size() == 0) variable.m_GlobalOffsets.assign(variable.m_Dimensions.size(),0);
jmsg["offset"] = variable.m_GlobalOffsets; jmsg["offset"] = variable.m_GlobalOffsets;
jmsg["timestep"] = 0; jmsg["timestep"] = 0;
m_Man.put(values, jmsg); m_Man.put(values, jmsg);
std::cout << "putshape " << variable.m_Dimensions.size() << endl;
std::cout << "varshape " << variable.m_GlobalDimensions.size() << endl;
std::cout << "offset " << variable.m_GlobalOffsets.size() << endl;
std::cout << "I am hooked to the DataMan library\n"; std::cout << "I am hooked to the DataMan library\n";
MPI_Barrier( m_MPIComm ); MPI_Barrier( m_MPIComm );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment