diff --git a/buildDataMan.sh b/buildDataMan.sh index 3cc30aa77b8af6c6f08ed33d4a374ef87ad4d713..dd50058521ae834ec66b527cef6af0f840f67211 100755 --- a/buildDataMan.sh +++ b/buildDataMan.sh @@ -10,22 +10,24 @@ MPICOMPILER=mpic++ export DYLD_LIBRARY_PATH=$DATAMAN_LOCATION/lib:$DYLD_LIBRARY_PATH if [ "$(uname)" == "Darwin" ]; then - CCOMPILER=g++-6 + CCOMPILER=clang++ + export DYLD_LIBRARY_PATH=$DATAMAN_LOCATION/lib:$DYLD_LIBRARY_PATH elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then CCOMPILER=g++ + export LD_LIBRARY_PATH=$DATAMAN_LOCATION/lib:$LD_LIBRARY_PATH fi echo "######################################################################################" echo "Start building ADIOS ./lib/libadios.a ./libadios_nompi.a with DataMan library" echo "######################################################################################" echo -make HAVE_DATAMAN=yes DATAMAN_LOC=$DATAMAN_LOCATION CC=$CCOMPILER MPICC=$MPICOMPILER #build the ./lib/libadios.a and ./libadios_nompi.a +make -j4 HAVE_DATAMAN=yes DATAMAN_LOC=$DATAMAN_LOCATION CC=$CCOMPILER MPICC=$MPICOMPILER #build the ./lib/libadios.a and ./libadios_nompi.a echo echo "#################################################################" echo "Building Dataman Reader and Writer examples" echo "#################################################################" -make -C ./examples/hello/datamanWriter HAVE_DATAMAN=yes DATAMAN_LOC=$DATAMAN_LOCATION CC=$CCOMPILER MPICC=$MPICOMPILER +make -j4 -C ./examples/hello/datamanWriter HAVE_DATAMAN=yes DATAMAN_LOC=$DATAMAN_LOCATION CC=$CCOMPILER MPICC=$MPICOMPILER echo -make -C ./examples/hello/datamanReader HAVE_DATAMAN=yes DATAMAN_LOC=$DATAMAN_LOCATION CC=$CCOMPILER MPICC=$MPICOMPILER +make -j4 -C ./examples/hello/datamanReader HAVE_DATAMAN=yes DATAMAN_LOC=$DATAMAN_LOCATION CC=$CCOMPILER MPICC=$MPICOMPILER echo echo diff --git a/examples/hello/datamanReader/Makefile b/examples/hello/datamanReader/Makefile index 0af3296f31879aa4254a676ed20db8fd673a8a60..b3e9097451346458e2d5d470b3ee926e56d897f8 100644 --- a/examples/hello/datamanReader/Makefile +++ b/examples/hello/datamanReader/Makefile @@ -20,8 +20,8 @@ INC+= -I$(ADIOS_DIR)/include #DATAMAN DATAMAN_LOC=/Users/w4g/Dropbox/lib/DataMan INC+= -I$(DATAMAN_LOC)/include -LIB+= -Wl,-rpath,$(DATAMAN_LOC)/lib -L$(DATAMAN_LOC)/lib -ldataman -LIB_NOMPI+= -Wl,-rpath,$(DATAMAN_LOC)/lib -L$(DATAMAN_LOC)/lib -ldataman +LIB+= -L$(DATAMAN_LOC)/lib -ldataman # -lcacheman -lstreamman -lzmqman +LIB_NOMPI+= -L$(DATAMAN_LOC)/lib -ldataman #COMPILER FLAGS CFLAGS=-Wall -O0 -g -Wpedantic -std=c++11 @@ -34,10 +34,10 @@ LIB_NOMPI+= -ldl -lpthread all: mpi nompi mpi: $(ADIOS_LIB) $(ADIOS_HFiles) - $(MPICC) $(CFLAGS) $(INC) -DHAVE_MPI -DHAVE_DATAMAN $(BASE_NAME).cpp -o $(BASE_NAME).exe $(LIB) + $(MPICC) $(CFLAGS) $(INC) -DHAVE_MPI $(BASE_NAME).cpp -o $(BASE_NAME).exe $(LIB) nompi: $(ADIOS_NOMPI_LIB) $(NoMPI_HFiles) - $(CC) $(CFLAGS) $(INC) -DHAVE_DATAMAN $(BASE_NAME)_nompi.cpp -o $(BASE_NAME)_nompi.exe $(LIB_NOMPI) + $(CC) $(CFLAGS) $(INC) $(BASE_NAME)_nompi.cpp -o $(BASE_NAME)_nompi.exe $(LIB_NOMPI) clean: rm *.exe; diff --git a/examples/hello/datamanWriter/Makefile b/examples/hello/datamanWriter/Makefile index b8a9c496b9b83b2b49956825ae5ad0c8b49a051e..1d1ac1ce16877bf666455325cd4ec55cf2226533 100644 --- a/examples/hello/datamanWriter/Makefile +++ b/examples/hello/datamanWriter/Makefile @@ -5,7 +5,7 @@ BASE_NAME=helloDataManWriter -CC=g++-6 # Compiling with defaults +CC=clang++ # Compiling with defaults MPICC=mpic++ INC= LIB= @@ -20,8 +20,8 @@ INC+= -I$(ADIOS_DIR)/include #DATAMAN DATAMAN_LOC=/Users/w4g/Dropbox/lib/DataMan INC+= -I$(DATAMAN_LOC)/include -LIB+= -Wl,-rpath,$(DATAMAN_LOC)/lib -L$(DATAMAN_LOC)/lib -ldataman -LIB_NOMPI+= -Wl,-rpath,$(DATAMAN_LOC)/lib -L$(DATAMAN_LOC)/lib -ldataman +LIB+= -L$(DATAMAN_LOC)/lib -ldataman # -lcacheman -lstreamman -lzmqman +LIB_NOMPI+= -L$(DATAMAN_LOC)/lib -ldataman # -lcacheman -lstreamman -lzmqman #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 86aa5e05a3ab4762e21f1f9c2ba099f46de5844c..d9d245c79de90897fddda7e132c2c8f8582fee43 100644 --- a/examples/hello/datamanWriter/helloDataManWriter_nompi.cpp +++ b/examples/hello/datamanWriter/helloDataManWriter_nompi.cpp @@ -35,7 +35,7 @@ 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( "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( "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 diff --git a/include/engine/dataman/DataManWriter.h b/include/engine/dataman/DataManWriter.h index 85b9a20a0c321550c08c1824fdf4f6742c7dbc81..64b0f343f382d072406e0a7f679a2377a4fbb723 100644 --- a/include/engine/dataman/DataManWriter.h +++ b/include/engine/dataman/DataManWriter.h @@ -109,9 +109,10 @@ private: variable.m_AppValues = values; m_WrittenVariables.insert( variable.m_Name ); - DataManager dataManager; - //This part will go away, this is just to monitor variables per rank + + + std::cout << "I am hooked to the DataMan library\n"; MPI_Barrier( m_MPIComm ); diff --git a/src/engine/dataman/DataManWriter.cpp b/src/engine/dataman/DataManWriter.cpp index e9b74032241e544f75833b902c45a35199f2798a..4a94dbbb08be7f0cc686a857c5cf1c3428532fd2 100644 --- a/src/engine/dataman/DataManWriter.cpp +++ b/src/engine/dataman/DataManWriter.cpp @@ -55,27 +55,34 @@ void DataManWriter::Init( ) if(m_DoRealTime) { - string method_type, method, local_ip, remote_ip; - int local_port, remote_port; + string method_type="", method="", local_ip="", remote_ip=""; + int local_port=0, remote_port=0, num_channels=0; 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; + if(method_type == "stream"){ + 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; + i = m_Method.m_Parameters.find( "num_channels" ); + if( i != m_Method.m_Parameters.end() ) + istringstream(i->second) >> num_channels; + m_Man.add_stream(local_ip, remote_ip, local_port, remote_port, num_channels, method); + } + } else {