diff --git a/Makefile.libs b/Makefile.libs index c0a08b1f09d4e6b823080f361eb2dc42268a2c3c..ce4e7709441e88947ac5dc901d7c1880321603eb 100644 --- a/Makefile.libs +++ b/Makefile.libs @@ -15,10 +15,10 @@ TRANSPORT_INC:=./include/transport TRANSPORT_SRC:=./src/transport ifeq ($(HAVE_DATAMAN),yes) - DATAMAN_LOC:=/home/wfg/Applications/DataMan# need to change this to your local dataman location + DATAMAN_LOC:=/Users/w4g/Dropbox/lib/DataMan# need to change this to your local dataman location CFLAGS += -DHAVE_DATAMAN INC += -I$(DATAMAN_LOC)/include - LIBS += -L$(DATAMAN_LOC)/lib -lcacheman -lstreamman -lzmqman + LIBS += -L$(DATAMAN_LOC)/lib -ldataman else HFiles:=$(filter-out $(ENGINE_INC)/dataman/DataManWriter.h,$(HFiles)) HFiles:=$(filter-out $(ENGINE_INC)/dataman/DataManReader.h,$(HFiles)) diff --git a/examples/hello/datamanReader/Makefile b/examples/hello/datamanReader/Makefile index 62ccd004b36c087fa9d5836dfe6621d4c02c8291..e88977553e5a44efa72e777c9c7f1e37ffc2d70e 100644 --- a/examples/hello/datamanReader/Makefile +++ b/examples/hello/datamanReader/Makefile @@ -18,9 +18,10 @@ LIB_NOMPI+= $(ADIOS_DIR)/lib/libadios_nompi.a INC+= -I$(ADIOS_DIR)/include #DATAMAN -DATAMAN_LOC=/home/wfg/Applications/DataMan +DATAMAN_LOC=/Users/w4g/Dropbox/lib/DataMan INC+= -I$(DATAMAN_LOC)/include -LIB+= -L$(DATAMAN_LOC)/lib -lcacheman -lstreamman -lzmqman +LIB+= -L$(DATAMAN_LOC)/lib -ldataman +LIB_NOMPI+= -L$(DATAMAN_LOC)/lib -ldataman #COMPILER FLAGS CFLAGS=-Wall -O0 -g -Wpedantic -std=c++11 diff --git a/examples/hello/datamanWriter/Makefile b/examples/hello/datamanWriter/Makefile index e915be6bf9ae0cd5fafdb2efba35f90f47eab843..9f1a78619608543ebe1f87cc49ad26f6528be2ac 100644 --- a/examples/hello/datamanWriter/Makefile +++ b/examples/hello/datamanWriter/Makefile @@ -18,9 +18,10 @@ LIB_NOMPI+= $(ADIOS_DIR)/lib/libadios_nompi.a INC+= -I$(ADIOS_DIR)/include #DATAMAN -DATAMAN_LOC=/home/wfg/Applications/DataMan +DATAMAN_LOC=/Users/w4g/Dropbox/lib/DataMan INC+= -I$(DATAMAN_LOC)/include -LIB+= -L$(DATAMAN_LOC)/lib -lcacheman -lstreamman -lzmqman +LIB+= -L$(DATAMAN_LOC)/lib -ldataman +LIB_NOMPI+= -L$(DATAMAN_LOC)/lib -ldataman #COMPILER FLAGS CFLAGS=-Wall -O0 -g -Wpedantic -std=c++11 diff --git a/examples/hello/datamanWriter/helloDataManWriter_nompi.cpp b/examples/hello/datamanWriter/helloDataManWriter_nompi.cpp index 9e591367c4f8aec4e159a1b2a7d22b6ad9fb9173..792bc620e2add336ef803861b72c38cfe8009445 100644 --- a/examples/hello/datamanWriter/helloDataManWriter_nompi.cpp +++ b/examples/hello/datamanWriter/helloDataManWriter_nompi.cpp @@ -28,8 +28,8 @@ int main( int argc, char* argv [] ) //Define method for engine creation, it is basically straight-forward parameters adios::Method& datamanSettings = adios.DeclareMethod( "WAN", "DataManWriter" ); //default method type is Writer - datamanSettings.SetParameters( "peer-to-peer=yes", "real_time=yes", "compress=no" ); - datamanSettings.AddTransport( "Mdtm", "localIP=128.0.0.0.1", "remoteIP=128.0.0.0.2", "tolerances=1,2,3" ); + 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.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 //Create engine smart pointer to DataMan Engine due to polymorphism, diff --git a/include/engine/dataman/DataManWriter.h b/include/engine/dataman/DataManWriter.h index be07b1abaf2398209275bd7e9bb2ddcd3b0aa2c2..ca4d9781fdcfabd1038f32fb866efdb68c0de421 100644 --- a/include/engine/dataman/DataManWriter.h +++ b/include/engine/dataman/DataManWriter.h @@ -18,7 +18,7 @@ #include "capsule/heap/STLVector.h" -#include "DataMan.h" //here comes your DataMan header +#include "DataManager.h" //here comes your DataMan header namespace adios @@ -79,6 +79,7 @@ private: format::BP1Writer m_BP1Writer; ///< format object will provide the required BP functionality to be applied on m_Buffer and m_Transports bool m_DoRealTime = false; + DataManager m_Man; void Init( ); ///< calls InitCapsules and InitTransports based on Method, called from constructor void InitCapsules( ); diff --git a/src/engine/dataman/DataManWriter.cpp b/src/engine/dataman/DataManWriter.cpp index 13d1e41bbff128e567157b0e5c30ebe26b930cd1..824cf3a6ecf2314b6f689b2cc1090f5741ce2a02 100644 --- a/src/engine/dataman/DataManWriter.cpp +++ b/src/engine/dataman/DataManWriter.cpp @@ -53,10 +53,36 @@ void DataManWriter::Init( ) m_DoRealTime = true; } + if(m_DoRealTime) + { + string method_type, method, local_ip, remote_ip; + int local_port, remote_port; + + auto i = m_Method.m_Parameters.find( "method_type" ); + if( i != m_Method.m_Parameters.end() ) + method_type = i->second; + i = m_Method.m_Parameters.find( "method" ); + if( i != m_Method.m_Parameters.end() ) + method = i->second; + i = m_Method.m_Parameters.find( "local_ip" ); + if( i != m_Method.m_Parameters.end() ) + local_ip = i->second; + i = m_Method.m_Parameters.find( "remote_ip" ); + if( i != m_Method.m_Parameters.end() ) + remote_ip = i->second; + i = m_Method.m_Parameters.find( "local_port" ); + if( i != m_Method.m_Parameters.end() ) + istringstream(i->second) >> local_port; + i = m_Method.m_Parameters.find( "remote_port" ); + if( i != m_Method.m_Parameters.end() ) + istringstream(i->second) >> remote_port; + } + else + { + InitCapsules( ); + InitTransports( ); + } - - InitCapsules( ); - InitTransports( ); }