diff --git a/Makefile b/Makefile index b7daf05bb326d20b26676b149b91cc1294f26ebe..db567164fea6485f3cc0c9ba4da791676824f7b3 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ # Makefile for testing purposes, will build libadios.a # Created on: Oct 4, 2016 # Author: wfg - +#SYSTEM DIRECTORIES, USER MUST MODIFY THESE VALUES SYS_BIN:=/usr/bin -UTIL_LIB:=/usr/local/lib +SYS_LIB:=/usr/lib/x86_64-linux-gnu +LOCAL_LIB:=/usr/local/lib #COMPILERS CC:=$(SYS_BIN)/g++ @@ -14,25 +15,60 @@ AR:=$(SYS_BIN)/ar #FLAGS CFLAGS:=-c -Wall -O0 -g -Wpedantic -std=c++11 - -#ADIOS FLAGS +#ALL FILES HFiles:=$(shell find ./include -type f -name "*.h") CPPFiles:=$(shell find ./src -type f -name "*.cpp") +#EXTERNAL LIBRARY PATHS + +LIBS := -L$(SYS_LIB) -L$(LOCAL_LIB) -#EXTERNAL DEPENDENCIES -LIBS := -L$(UTIL_LIB) +#TRANSPORT WITH EXTERNAL DEPENDENCIES +TRANSPORT_INC:=./include/transport +TRANSPORT_SRC:=./src/transport ifeq ($(HAVE_NETCDF),yes) - CFLAGS += -DHAVE_NETCDF - LIBS += -netcdf + LIBS += -lnetcdf +else + HFiles:=$(filter-out $(TRANSPORT_INC)/CNetCDF4.h,$(HFiles)) + CPPFiles:=$(filter-out $(TRANSPORT_SRC)/CNetCDF4.cpp,$(CPPFiles)) +endif + +ifeq ($(HAVE_PHDF5),yes) + LIBS += -lhdf5 else - HFiles:=$(filter-out ./include/transport/CNetCDF4.h,$(HFiles)) - CPPFiles:=$(filter-out ./src/transport/CNetCDF4.cpp,$(CPPFiles)) + HFiles:=$(filter-out $(TRANSPORT_INC)/CPHDF5.h,$(HFiles)) + CPPFiles:=$(filter-out $(TRANSPORT_SRC)/CPHDF5.cpp,$(CPPFiles)) endif -#MPI_CPPFiles=$(shell find ./src/mpi -type f -name "*.cpp") +#TRANSFORM WITH EXTERNAL DEPENDENCIES +TRANSFORM_INC:=./include/transform +TRANSFORM_SRC:=./src/transform + +ifeq ($(HAVE_BZIP2),yes) + LIBS += -lbz2 +else + HFiles:=$(filter-out $(TRANSFORM_INC)/CSZIP.h,$(HFiles)) + CPPFiles:=$(filter-out $(TRANSFORM_SRC)/CSZIP.cpp,$(CPPFiles)) +endif + +ifeq ($(HAVE_SZIP),yes) + LIBS += -lsz +else + HFiles:=$(filter-out $(TRANSFORM_INC)/CSZIP.h,$(HFiles)) + CPPFiles:=$(filter-out $(TRANSFORM_SRC)/CSZIP.cpp,$(CPPFiles)) +endif + +ifeq ($(HAVE_ZLIB),yes) + LIBS += -lz +else + HFiles:=$(filter-out $(TRANSFORM_INC)/CZLIB.h,$(HFiles)) + CPPFiles:=$(filter-out $(TRANSFORM_SRC)/CZLIB.cpp,$(CPPFiles)) +endif + + + OBJFiles:=$(patsubst %.cpp, ./bin/%.o, $(notdir $(CPPFiles)) ) diff --git a/examples/hello/helloADIOS.cpp b/examples/hello/helloADIOS.cpp index 25b557217d69f819614b03f47f4630985bfeec18..ccda96ddae63427b74111c6c3636b97dd6a68229 100644 --- a/examples/hello/helloADIOS.cpp +++ b/examples/hello/helloADIOS.cpp @@ -26,7 +26,6 @@ int main( int argc, char* argv [] ) { //testing with CPOSIXMPI adios::ADIOS adiosFile( "writer.xml", MPI_COMM_WORLD ); - adiosFile.Init( ); //Get Monitor info std::ofstream logStream( "info_" + std::to_string(rank) + ".log" ); diff --git a/examples/hello/helloADIOS_nompi.cpp b/examples/hello/helloADIOS_nompi.cpp index 2897b0f984edaf05ddb315d02c29f19e82281022..2f73b33026416c444a838b474dec6ed972c0da50 100644 --- a/examples/hello/helloADIOS_nompi.cpp +++ b/examples/hello/helloADIOS_nompi.cpp @@ -17,7 +17,6 @@ int main( int argc, char* argv [] ) try { adios::ADIOS adiosFile( "writer2Groups.xml" ); //testing with CPOSIXNoMPI - adiosFile.Init( ); adiosFile.MonitorGroups( std::cout ); std::cout << "Finished initializing ADIOS\n"; } diff --git a/include/core/CGroup.h b/include/core/CGroup.h index f544a838eec47a0183a9f3dc76b8016412ec208e..f9bb7844519d71485489efaa823dba93b473beeb 100644 --- a/include/core/CGroup.h +++ b/include/core/CGroup.h @@ -23,7 +23,6 @@ #endif - #include "core/CVariable.h" #include "core/SAttribute.h" #include "core/CTransport.h" @@ -44,12 +43,13 @@ public: * @brief Constructor for XML config file * @param xmlGroup contains <adios-group....</adios-group> single group definition from XML config file * @param groupName returns the groupName from <adios-group name=" " + * @param debugMode */ - CGroup( const std::string& xmlGroup, std::string& groupName ); + CGroup( const std::string& xmlGroup, std::string& groupName, const bool debugMode = false ); - CGroup( ); ///Non-XML empty constructor + CGroup( const bool debugMode = false ); ///Non-XML empty constructor - ~CGroup( ); ///< Using STL containers + ~CGroup( ); ///< Using STL containers, no deallocation /** * Opens group and passes fileName and accessMode to m_Transport @@ -128,13 +128,14 @@ private: * </pre> */ std::map< std::string, std::shared_ptr<CVariable> > m_Variables; - std::vector< SAttribute > m_Attributes; ///< Contains all group attributes from SAttribute.h + std::vector< SAttribute > m_Attributes; ///< Contains all group attributes from SAttribute.h, should be moved to a map std::vector< std::string > m_GlobalDimensions; ///< from global-bounds in XML File, data in global space std::vector< std::string > m_GlobalOffsets; ///< from global-bounds in XML File, data in global space std::shared_ptr< CTransport > m_Transport; ///< transport method defined in XML File, using shared pointer as SGroup can be uninitialized std::string m_ActiveTransport; + const bool m_DebugMode = false; ///< if true will do more checks, exceptions, warnings, expect slower code bool m_IsOpen = false; ///< checks if group was opened for operations; std::string m_FileName; ///< associated fileName is the Group is opened. diff --git a/include/functions/ADIOSFunctions.h b/include/functions/ADIOSFunctions.h index 88fe93c095e2ed1f0f248541b1ae77d89dbdde35..4180b56effffd64fdc9414e0785fcb5d1d463a1d 100644 --- a/include/functions/ADIOSFunctions.h +++ b/include/functions/ADIOSFunctions.h @@ -68,6 +68,7 @@ void GetPairs( const std::string tag, std::vector< std::pair<const std::string, * @param fileContent file Content in a single string * @param tag field0="value0" field1="value1" in a single string * @param pairs pairs[0].first=field0 pairs[0].second=value0 pairs[1].first=field1 pairs[1].second=value1 + * @param debugMode if true will do more checks, exceptions, warnings, expect slower code */ void GetPairsFromTag( const std::string& fileContent, const std::string tag, std::vector< std::pair<const std::string, const std::string> >& pairs ); @@ -75,12 +76,24 @@ void GetPairsFromTag( const std::string& fileContent, const std::string tag, /** * Set members m_Groups and m_HostLanguage from XML file content, called within Init functions * @param fileContent file Content in a single string + * @param mpiComm MPI Communicator passed from application passed to Transport method if required * @param hostLanguage return the host language from fileContent * @param groups passed returns the map of groups defined in fileContent - * @param mpiComm MPI Communicator passed from application + * @param debugMode if true will do more checks, exceptions, warnings, expect slower code */ -void SetMembers( const std::string& fileContent, std::string& hostLanguage, std::map< std::string, CGroup >& groups, - const MPI_Comm mpiComm ); +void SetMembers( const std::string& fileContent, const MPI_Comm mpiComm, std::string& hostLanguage, + std::map< std::string, CGroup >& groups ); + +/** + * Called inside the ADIOS XML constructors to get contents from file, broadcast and set hostLanguage and groups from ADIOS class + * @param xmlConfigFile xml config file name + * @param mpiComm communicator used from broadcasting + * @param hostLanguage set from host-language in xml file + * @param groups passed returns the map of groups defined in fileContent + * @param debugMode if true will do more checks, exceptions, warnings, expect slower code + */ +void InitXML( const std::string xmlConfigFile, const MPI_Comm mpiComm, std::string& hostLanguage, + std::map< std::string, CGroup >& groups ); } //end namespace diff --git a/include/public/ADIOS.h b/include/public/ADIOS.h index fade55c64b4c40ccb81c0fad3fd65c576ab4691b..cc0ded8344c960f6197dfb7b65a08f57494f9850 100644 --- a/include/public/ADIOS.h +++ b/include/public/ADIOS.h @@ -38,34 +38,33 @@ public: // PUBLIC Constructors and Functions define the User Interface with ADIO /** * @brief ADIOS empty constructor. Used for non XML config file API calls. */ - ADIOS( ); + ADIOS( const bool debugMode = false ); /** * @brief Serial constructor for XML config file * @param xmlConfigFile passed to m_XMLConfigFile */ - ADIOS( const std::string xmlConfigFile); + ADIOS( const std::string xmlConfigFile, const bool debugMode = false ); /** * @brief Parallel constructor for XML config file and MPI * @param xmlConfigFile passed to m_XMLConfigFile * @param mpiComm MPI communicator ...const to be discussed */ - ADIOS( const std::string xmlConfigFile, const MPI_Comm mpiComm ); + ADIOS( const std::string xmlConfigFile, const MPI_Comm mpiComm, const bool debugMode = false ); /** * @brief Parallel MPI communicator without XML config file * @param mpiComm MPI communicator passed to m_MPIComm */ - ADIOS( const MPI_Comm mpiComm ); + ADIOS( const MPI_Comm mpiComm, const bool debugMode = false ); ~ADIOS( ); ///< virtual destructor overriden by children's own destructors - void Init( ); ///< calls to read XML file among other initialization tasks /** * @brief Open or Append to an output file * @param groupName should match an existing group from XML file or created through CreateGroup - * @param fileName associated file + * @param fileName associated file or stream * @param accessMode "w": write, "a": append, need more info on this */ void Open( const std::string groupName, const std::string fileName, const std::string accessMode = "w" ); @@ -106,6 +105,7 @@ private: std::string m_XMLConfigFile; ///< XML File to be read containing configuration information MPI_Comm m_MPIComm = nullptr; ///< only used as reference to MPI communicator passed from parallel constructor, MPI_Comm is a pointer itself std::string m_HostLanguage; ///< Supported languages: C, C++, Fortran + const bool m_DebugMode = false; ///< if true will do more checks, exceptions, warnings, expect slower code /** * @brief List of groups defined from either ADIOS XML configuration file or the CreateGroup function. diff --git a/include/transport/CNetCDF4.h b/include/transport/CNetCDF4.h index 627ee0da82266a8e5c9cefc3a2e0097eff21c8c1..a84f14b568a8d9024a7f7e94d270098f0424b7fe 100644 --- a/include/transport/CNetCDF4.h +++ b/include/transport/CNetCDF4.h @@ -8,6 +8,7 @@ #ifndef CNETCDF4_H_ #define CNETCDF4_H_ +#include <netcdf.h> #include "core/CTransport.h" diff --git a/include/transport/CPHDF5.h b/include/transport/CPHDF5.h index 336a776798708c5a1986e009144c723216d71ef0..74d9cecb1eb3b50493674f68955b27b411c8c750 100644 --- a/include/transport/CPHDF5.h +++ b/include/transport/CPHDF5.h @@ -8,6 +8,7 @@ #ifndef CPHDF5_H_ #define CPHDF5_H_ +#include <hdf5.h> #include "core/CTransport.h" diff --git a/src/core/CGroup.cpp b/src/core/CGroup.cpp index cebda7f8d570404d8ce4535bfbd8a82236882a5e..286345e9c3db9006b6a9bdd3dd9f8a63c1157729 100644 --- a/src/core/CGroup.cpp +++ b/src/core/CGroup.cpp @@ -20,11 +20,13 @@ namespace adios { -CGroup::CGroup( ) +CGroup::CGroup( const bool debugMode ): + m_DebugMode{ debugMode } { } -CGroup::CGroup( const std::string& xmlGroup, std::string& groupName ) +CGroup::CGroup( const std::string& xmlGroup, std::string& groupName, const bool debugMode ): + m_DebugMode{ debugMode } { ParseXMLGroup( xmlGroup, groupName ); } @@ -44,10 +46,11 @@ void CGroup::Open( const std::string fileName, const std::string accessMode ) void CGroup::SetVariable( const std::string name, const bool isGlobal, const std::string type, const std::string dimensionsCSV, const std::string transform ) { - auto itVariable = m_Variables.find( name ); - if( itVariable == m_Variables.end() ) //name is not found + auto lf_SetVariable = [&] ( const std::string name, const bool isGlobal, const std::string type, + const std::string dimensionsCSV, + const std::string transform ) { - if( type == "integer") //use copy constructor as it's a small struct + if( type == "integer") //using copy constructor as it's a small class, only metadata m_Variables[name] = std::make_shared< CVariableTemplate<int> >( isGlobal, type, dimensionsCSV, transform ); else if( type == "unsigned integer") m_Variables[name] = std::make_shared< CVariableTemplate<unsigned int> >( isGlobal, type, dimensionsCSV, transform ); @@ -55,11 +58,22 @@ void CGroup::SetVariable( const std::string name, const bool isGlobal, const std m_Variables[name] = std::make_shared< CVariableTemplate<float> >( isGlobal, type, dimensionsCSV, transform ); else if( type == "double") m_Variables[name] = std::make_shared< CVariableTemplate<double> >( isGlobal, type, dimensionsCSV, transform ); + }; + + //Function body start here + if( m_DebugMode == true ) + { + if( m_Variables.count( name ) == 1 ) //variable exists + lf_SetVariable( name, isGlobal, type, dimensionsCSV, transform ); + else //name is found + std::cout << "WARNING: variable " << name << " exists, NOT setting a new variable\n"; } - else //name is found + else { - throw std::invalid_argument( "ERROR: variable " + name + " is defined twice\n" ); + lf_SetVariable( name, isGlobal, type, dimensionsCSV, transform ); } + + } @@ -114,7 +128,6 @@ void CGroup::Monitor( std::ostream& logStream ) const logStream << "\t" << attribute.Name << " \t " << attribute.Type << " \t " << attribute.Value << "\n"; } - logStream << "\tTransport Method " << m_ActiveTransport << "\n"; logStream << "\tIs Transport Method Unique?: " << std::boolalpha << m_Transport.unique() << "\n"; } diff --git a/src/functions/ADIOSFunctions.cpp b/src/functions/ADIOSFunctions.cpp index 667db25ec54c371d27badb4a8a49d2b9bcc39a58..6d1e70e4b6c215ce0b46899f7ccb7a662aa8c4a0 100644 --- a/src/functions/ADIOSFunctions.cpp +++ b/src/functions/ADIOSFunctions.cpp @@ -30,32 +30,79 @@ void DumpFileToStream( const std::string fileName, std::string& fileContent ) std::ostringstream fileSS; fileSS << fileStream.rdbuf(); fileStream.close(); - fileContent = fileSS.str(); //convert to string and check - if( fileContent.empty() ) throw std::invalid_argument( "ERROR: file " + fileName + " is empty\n" ); + + if( fileContent.empty() ) + throw std::invalid_argument( "ERROR: file " + fileName + " is empty\n" ); } -void GetSubString ( const std::string initialTag, const std::string finalTag, const std::string content, std::string& subString, - std::string::size_type& currentPosition ) +void GetSubString ( const std::string initialTag, const std::string finalTag, const std::string content, + std::string& subString, std::string::size_type& currentPosition ) { - std::string::size_type start( content.find(initialTag, currentPosition ) ); - if( start == content.npos ) + auto lf_Wipe =[]( std::string& subString, std::string::size_type& currentPosition ) { subString.clear(); currentPosition = std::string::npos; + }; + + std::string::size_type start( content.find(initialTag, currentPosition ) ); + if( start == content.npos ) + { + lf_Wipe( subString, currentPosition ); return; } currentPosition = start; - std::string::size_type end( content.find(finalTag, currentPosition ) ); + std::string::size_type end( content.find( finalTag, currentPosition ) ); if( end == content.npos ) { - subString.clear(); - currentPosition = std::string::npos; + lf_Wipe( subString, currentPosition ); return; } + //here make sure the finalTag is not a value surrounded by " " or ' ', if so find next + bool isValue = true; + + while( isValue == true ) + { + std::string::size_type quotePosition = content.find( '\'', currentPosition ); + std::string::size_type doubleQuotePosition = content.find( '\"', currentPosition ); + + if( ( quotePosition == content.npos && doubleQuotePosition == content.npos ) || + ( quotePosition == content.npos && end < doubleQuotePosition ) || + ( doubleQuotePosition == content.npos && end < quotePosition ) || + ( end < quotePosition && end < doubleQuotePosition ) + ) break; + + //first case + std::string::size_type closingPosition; + if( quotePosition < doubleQuotePosition ) //find the closing " + { + currentPosition = quotePosition; + closingPosition = content.find( '\'', currentPosition+1 ); + } + else //find the closing ' + { + currentPosition = doubleQuotePosition; + closingPosition = content.find( '\"', currentPosition+1 ); + } + + if( closingPosition == content.npos ) //if can't find closing it's open until the end + { + lf_Wipe( subString, currentPosition ); + return; + } + if( closingPosition < end ) + { + currentPosition = closingPosition+1; + continue; + } + + //if this point is reached it means it's a value inside " " or ' ', move to the next end + end = content.find( finalTag, currentPosition ); + } + subString = content.substr( start, end-start+finalTag.size() ); currentPosition = end; } @@ -66,10 +113,10 @@ void GetQuotedValue( const char quote, const std::string::size_type& quotePositi { currentTag = currentTag.substr( quotePosition + 1 ); auto nextQuotePosition = currentTag.find( quote ); + if( nextQuotePosition == currentTag.npos ) - { throw std::invalid_argument( "ERROR: Invalid attribute in..." + currentTag + "...check XML file\n"); - } + value = currentTag.substr( 0, nextQuotePosition ); currentTag = currentTag.substr( nextQuotePosition+1 ); } @@ -89,7 +136,6 @@ void GetPairs( const std::string tag, std::vector< std::pair<const std::string, const char quote = currentTag[equalPosition+1]; if( quote == '\'' || quote == '"') //single quotes { - //quote position? GetQuotedValue( quote, equalPosition+1, currentTag, value ); } @@ -120,8 +166,8 @@ void GetPairsFromTag( const std::string& fileContent, const std::string tag, } } -void SetMembers( const std::string& fileContent, std::string& hostLanguage, std::map< std::string, CGroup >& groups, - const MPI_Comm mpiComm ) +void SetMembers( const std::string& fileContent, const MPI_Comm mpiComm, + std::string& hostLanguage, std::map< std::string, CGroup >& groups ) { //adios-config std::string currentContent; @@ -212,6 +258,38 @@ void SetMembers( const std::string& fileContent, std::string& hostLanguage, std: } +void InitXML( const std::string xmlConfigFile, const MPI_Comm mpiComm, + std::string& hostLanguage, std::map< std::string, CGroup >& groups ) +{ + int xmlFileContentSize; + std::string xmlFileContent; + + int rank; + MPI_Comm_rank( mpiComm, &rank ); + + if( rank == 0 ) //serial part + { + std::string xmlFileContent; + DumpFileToStream( xmlConfigFile, xmlFileContent ); //in ADIOSFunctions.h dumps all XML Config File to xmlFileContent + xmlFileContentSize = xmlFileContent.size( ) + 1; // add one for the null character + + MPI_Bcast( &xmlFileContentSize, 1, MPI_INT, 0, mpiComm ); //broadcast size for allocation + MPI_Bcast( (char*)xmlFileContent.c_str(), xmlFileContentSize, MPI_CHAR, 0, mpiComm ); //broadcast contents + } + else + { + MPI_Bcast( &xmlFileContentSize, 1, MPI_INT, 0, mpiComm ); //receive size + + char* xmlFileContentMPI = new char[ xmlFileContentSize ]; //allocate xml C-char + MPI_Bcast( xmlFileContentMPI, xmlFileContentSize, MPI_CHAR, 0, mpiComm ); //receive xml C-char + xmlFileContent.assign( xmlFileContentMPI ); //copy to a string + + delete []( xmlFileContentMPI ); //delete char* needed for MPI, might add size is moving to C++14 for optimization, avoid memory leak + } + + SetMembers( xmlFileContent, mpiComm, hostLanguage, groups ); +} + } //end namespace diff --git a/src/public/ADIOS.cpp b/src/public/ADIOS.cpp index 74ae36e9ee8e078ed58125d000da730552dca7a0..3db87f915b4df601fdf5a48a1d3ec2dc7f6e7023 100644 --- a/src/public/ADIOS.cpp +++ b/src/public/ADIOS.cpp @@ -21,55 +21,32 @@ namespace adios { -ADIOS::ADIOS( ) +ADIOS::ADIOS( const bool debugMode ): + m_DebugMode{ debugMode } { } -ADIOS::ADIOS( const std::string xmlConfigFile ): - m_XMLConfigFile{ xmlConfigFile } -{ } +ADIOS::ADIOS( const std::string xmlConfigFile, const bool debugMode ): + m_XMLConfigFile{ xmlConfigFile }, + m_DebugMode{ debugMode } +{ + InitXML( m_XMLConfigFile, m_MPIComm, m_HostLanguage, m_Groups ); +} -ADIOS::ADIOS( const std::string xmlConfigFile, const MPI_Comm mpiComm ): +ADIOS::ADIOS( const std::string xmlConfigFile, const MPI_Comm mpiComm, const bool debugMode ): m_XMLConfigFile{ xmlConfigFile }, - m_MPIComm{ mpiComm } -{ } + m_MPIComm{ mpiComm }, + m_DebugMode{ debugMode } +{ + InitXML( m_XMLConfigFile, m_MPIComm, m_HostLanguage, m_Groups ); +} ADIOS::~ADIOS( ) { } -void ADIOS::Init( ) -{ - int xmlFileContentSize; - std::string xmlFileContent; - - int rank; - MPI_Comm_rank( m_MPIComm, &rank ); - - if( rank == 0 ) //serial part - { - std::string xmlFileContent; - DumpFileToStream( m_XMLConfigFile, xmlFileContent ); //in ADIOSFunctions.h dumps all XML Config File to xmlFileContent - xmlFileContentSize = xmlFileContent.size( ) + 1; // add one for the null character - - MPI_Bcast( &xmlFileContentSize, 1, MPI_INT, 0, m_MPIComm ); //broadcast size for allocation - MPI_Bcast( (char*)xmlFileContent.c_str(), xmlFileContentSize, MPI_CHAR, 0, m_MPIComm ); - SetMembers( xmlFileContent, m_HostLanguage, m_Groups, m_MPIComm ); - } - else - { - MPI_Bcast( &xmlFileContentSize, 1, MPI_INT, 0, m_MPIComm ); //broadcast size - char* xmlFileContentMPI = new char[ xmlFileContentSize ]; //allocate C char - MPI_Bcast( xmlFileContentMPI, xmlFileContentSize, MPI_CHAR, 0, m_MPIComm ); //receive from rank=0 - - xmlFileContent.assign( xmlFileContentMPI ); - SetMembers( xmlFileContent, m_HostLanguage, m_Groups, m_MPIComm ); - } -} - - void ADIOS::Open( const std::string groupName, const std::string fileName, const std::string accessMode ) { m_Groups.at( groupName ).Open( fileName, accessMode ); diff --git a/src/transport/CPOSIX.cpp b/src/transport/CPOSIX.cpp index 3a4bccb3c660ce7ffcf9b012a36bc9a594022aba..929d32b7391430f48a066e39c4253bb67b76eb4b 100644 --- a/src/transport/CPOSIX.cpp +++ b/src/transport/CPOSIX.cpp @@ -5,19 +5,18 @@ * Author: wfg */ -#include "transport/CPOSIX.h" #include <iostream> +#include "transport/CPOSIX.h" namespace adios { -CPOSIX::CPOSIX( const unsigned int priority, const unsigned int iteration, - MPI_Comm mpiComm ): - CTransportMPI( "POSIX", priority, iteration, mpiComm ) +CPOSIX::CPOSIX( const unsigned int priority, const unsigned int iteration, MPI_Comm mpiComm ): + CTransport( "POSIX", priority, iteration, mpiComm ) { } @@ -27,14 +26,11 @@ CPOSIX::~CPOSIX( ) void CPOSIX::Write( const CVariable& variable ) { - int rank; + int rank, size; MPI_Comm_rank( m_MPIComm, &rank ); - - int size; MPI_Comm_size( m_MPIComm, &size ); std::cout << "Just saying Hello from CPOSIX Write from process " << rank << "/" << size << "\n"; - }