From eda8fbb9595e08ea66f766b6b89a3c56f1e239d5 Mon Sep 17 00:00:00 2001
From: wfg <wfg@pc0098504.ornl.gov>
Date: Wed, 19 Oct 2016 13:16:18 -0400
Subject: [PATCH] Preparing Makefile Changed Doxyfile to print inclusion
 diagrams Reorganized code to allow mpidummy.h inclusion replacing mpi.h for
 single source object.

---
 Makefile                          | 109 +++++++++++++++++++-----------
 doc/Doxyfile                      |  18 ++---
 include/core/CGroup.h             |   6 +-
 include/core/CTransform.h         |   8 +--
 include/core/CTransport.h         |   4 +-
 include/core/CVariable.h          |   1 +
 include/public/ADIOS.h            |  13 ++--
 include/public/mpidummy.h         |   3 +
 include/transform/CBZIP2.h        |   8 +--
 include/transform/CSZIP.h         |  11 ++-
 include/transform/CZLIB.h         |  10 ++-
 include/transport/CMPIAggregate.h |   2 +-
 src/core/CGroup.cpp               |   3 +-
 src/public/mpidummy.c             |   3 +-
 src/transform/CBZIP2.cpp          |  35 ++++++++++
 src/transform/CSZIP.cpp           |  33 +++++++++
 src/transform/CZLIB.cpp           |  33 +++++++++
 17 files changed, 214 insertions(+), 86 deletions(-)
 create mode 100644 src/transform/CBZIP2.cpp
 create mode 100644 src/transform/CSZIP.cpp
 create mode 100644 src/transform/CZLIB.cpp

diff --git a/Makefile b/Makefile
index b87b75e35..b7daf05bb 100644
--- a/Makefile
+++ b/Makefile
@@ -3,61 +3,88 @@
 #     Author: wfg
 
      
-TOOL_DIR=/usr/bin
+SYS_BIN:=/usr/bin
+UTIL_LIB:=/usr/local/lib
 
 #COMPILERS
-CC=$(TOOL_DIR)/g++
-ifeq($(CC),"clang")
-    CC=$(TOOL_DIR)/clang
-endif
-
-MPICC=$(TOOL_DIR)/mpic++
-AR=$(TOOL_DIR)/ar
+CC:=$(SYS_BIN)/g++
+MPICC:=$(SYS_BIN)/mpic++
+AR:=$(SYS_BIN)/ar
 
 #FLAGS
-CFLAGS=-c -Wall -O0 -g -Wpedantic -std=c++11
-
-ifeq($(NETCDF),"yes")
-
+CFLAGS:=-c -Wall -O0 -g -Wpedantic -std=c++11
 
 
-#INCLUDE FILES
-ADIOS_INC=-I./include
-INCLUDE=$(ADIOS_INC)
+#ADIOS FLAGS
+HFiles:=$(shell find ./include -type f -name "*.h")
+CPPFiles:=$(shell find ./src -type f -name "*.cpp")
 
-#Build Header Dependencies, if one changes it will rebuild
-MPI_HFiles=$(shell find ./include/mpi -type f -name "*.h")
-NoMPI_HFiles=$(shell find ./include/nompi -type f -name "*NoMPI.h")
-Local_HFiles=$(shell find ./include -type f -name "*.h")
-HFiles=$(MPI_HFiles) $(NoMPI_HFiles) $(Local_HFiles)
 
-#Source *.cpp Files and Object Files
-MPI_CPPFiles=$(shell find ./src/mpi -type f -name "*.cpp")
-MPI_ObjFiles=$(patsubst ./src/mpi/transport/%.cpp, ./bin/%.o, $(MPI_CPPFiles))
+#EXTERNAL DEPENDENCIES
+LIBS := -L$(UTIL_LIB)
 
-NoMPI_CPPFiles=$(shell find ./src/nompi -type f -name "*NoMPI.cpp")
-NoMPI_ObjFiles=$(patsubst ./src/nompi/transport/%.cpp, ./bin/%.o, $(NoMPI_CPPFiles))
+ifeq ($(HAVE_NETCDF),yes)
+    CFLAGS += -DHAVE_NETCDF
+    LIBS += -netcdf
+else
+    HFiles:=$(filter-out ./include/transport/CNetCDF4.h,$(HFiles))
+    CPPFiles:=$(filter-out ./src/transport/CNetCDF4.cpp,$(CPPFiles))     
+endif
 
-Common_CPPFiles=$(wildcard ./src/*.cpp)
-Common_ObjFiles=$(patsubst ./src/%.cpp, ./bin/%.o, $(Common_CPPFiles))
-NoMPI_Common_ObjFiles=$(patsubst ./src/%.cpp, ./bin/%_nompi.o, $(Common_CPPFiles)) # use for nompi
 
-ObjFiles=$(MPI_ObjFiles) $(NoMPI_ObjFiles)
+#MPI_CPPFiles=$(shell find ./src/mpi -type f -name "*.cpp")
+
+OBJFiles:=$(patsubst %.cpp, ./bin/%.o, $(notdir $(CPPFiles)) )
+
+
+all:
+	@echo $(HFiles);
+	@echo $(CFLAGS);
+	@echo $(LIBS);
+	@echo $(CPPFiles);
+	@echo $(OBJFiles)
+
+
+##INCLUDE FILES
+#ADIOS_INC=-I./include
+#INCLUDE=$(ADIOS_INC)
+#
+#
+#
+#
+##Build Header Dependencies, if one changes it will rebuild
+#MPI_HFiles=$(shell find ./include/mpi -type f -name "*.h")
+#NoMPI_HFiles=$(shell find ./include/nompi -type f -name "*NoMPI.h")
+#Local_HFiles=$(shell find ./include -type f -name "*.h")
+#HFiles=$(MPI_HFiles) $(NoMPI_HFiles) $(Local_HFiles)
+#
+##Source *.cpp Files and Object Files
+#MPI_CPPFiles=$(shell find ./src/mpi -type f -name "*.cpp")
+#MPI_ObjFiles=$(patsubst ./src/mpi/transport/%.cpp, ./bin/%.o, $(MPI_CPPFiles))
+#
+#NoMPI_CPPFiles=$(shell find ./src/nompi -type f -name "*NoMPI.cpp")
+#NoMPI_ObjFiles=$(patsubst ./src/nompi/transport/%.cpp, ./bin/%.o, $(NoMPI_CPPFiles))
+#
+#Common_CPPFiles=$(wildcard ./src/*.cpp)
+#Common_ObjFiles=$(patsubst ./src/%.cpp, ./bin/%.o, $(Common_CPPFiles))
+#NoMPI_Common_ObjFiles=$(patsubst ./src/%.cpp, ./bin/%_nompi.o, $(Common_CPPFiles)) # use for nompi
+#
+#ObjFiles=$(MPI_ObjFiles) $(NoMPI_ObjFiles)
 
 
 #Build all MPI and noMPI
-all: $(MPI_ObjFiles) $(NoMPI_ObjFiles) $(Common_ObjFiles) $(HFiles)
-	$(AR) rcs ./lib/libadios.a $(MPI_ObjFiles) $(NoMPI_ObjFiles) $(Common_ObjFiles)
-    
-#NoMPI build    
-nompi: $(NoMPI_ObjFiles) $(NoMPI_Common_ObjFiles) $(NoMPI_HFiles) $(Local_HFiles)
-	$(AR) rcs ./lib/libadios_nompi.a $(NoMPI_ObjFiles) $(NoMPI_Common_ObjFiles)
-	
-./bin/%.o: ./src/nompi/transport/%.cpp $(NoMPI_HFiles) $(Local_HFiles)
-	$(CC) $(CFLAGS) $(INCLUDE) -o $@ $<
-	
-./bin/%_nompi.o: ./src/%.cpp $(NoMPI_HFiles) $(Local_HFiles)
-	$(CC) $(CFLAGS) $(INCLUDE) -o $@ $<
+#all: $(MPI_ObjFiles) $(NoMPI_ObjFiles) $(Common_ObjFiles) $(HFiles)
+#	$(AR) rcs ./lib/libadios.a $(MPI_ObjFiles) $(NoMPI_ObjFiles) $(Common_ObjFiles)
+#    
+##NoMPI build    
+#nompi: $(NoMPI_ObjFiles) $(NoMPI_Common_ObjFiles) $(NoMPI_HFiles) $(Local_HFiles)
+#	$(AR) rcs ./lib/libadios_nompi.a $(NoMPI_ObjFiles) $(NoMPI_Common_ObjFiles)
+#	
+#./bin/%.o: ./src/nompi/transport/%.cpp $(NoMPI_HFiles) $(Local_HFiles)
+#	$(CC) $(CFLAGS) $(INCLUDE) -o $@ $<
+#	
+#./bin/%_nompi.o: ./src/%.cpp $(NoMPI_HFiles) $(Local_HFiles)
+#	$(CC) $(CFLAGS) $(INCLUDE) -o $@ $<
 	
 	
 clean_nompi:
diff --git a/doc/Doxyfile b/doc/Doxyfile
index a34e9963d..5b96279c3 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -32,13 +32,13 @@ DOXYFILE_ENCODING = UTF-8
 # title of most generated pages and in a few other places.
 # The default value is: My Project.
 
-PROJECT_NAME = "ADIOSPP"
+PROJECT_NAME = ADIOS
 
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. This
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER = 2.0
+PROJECT_NUMBER = 2.00
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
 # entered, it will be relative to the location where doxygen was started. If
 # left blank the current directory will be used.
 
-OUTPUT_DIRECTORY = .
+OUTPUT_DIRECTORY = 
 
 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and
@@ -422,7 +422,7 @@ EXTRACT_ALL = YES
 # be included in the documentation.
 # The default value is: NO.
 
-EXTRACT_PRIVATE = YES
+EXTRACT_PRIVATE = NO
 
 # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
 # scope will be included in the documentation.
@@ -771,7 +771,7 @@ WARN_LOGFILE =
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
-INPUT = /home/wfg/workspace/ADIOSPP/include /home/wfg/workspace/ADIOSPP/include/mpi/transport /home/wfg/workspace/ADIOSPP/include/nompi/transport /home/wfg/workspace/ADIOSPP/include/transform /home/wfg/workspace/ADIOSPP/src /home/wfg/workspace/ADIOSPP/src/mpi/transport /home/wfg/workspace/ADIOSPP/src/nompi/transport 
+INPUT = /home/wfg/workspace/ADIOSPP/src /home/wfg/workspace/ADIOSPP/include 
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -802,7 +802,7 @@ FILE_PATTERNS =
 # be searched for input files as well.
 # The default value is: NO.
 
-RECURSIVE = NO
+RECURSIVE = YES
 
 # The EXCLUDE tag can be used to specify files and/or directories that should be
 # excluded from the INPUT source files. This way you can easily exclude a
@@ -1988,7 +1988,7 @@ PERLMOD_MAKEVAR_PREFIX =
 # C-preprocessor directives found in the sources and include files.
 # The default value is: YES.
 
-ENABLE_PREPROCESSING = NO
+ENABLE_PREPROCESSING = YES
 
 # If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
 # in the source code. If set to NO, only conditional compilation will be
@@ -2339,7 +2339,7 @@ DOT_PATH =
 # command).
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-DOTFILE_DIRS = /home/wfg/workspace/ADIOSPP/include /home/wfg/workspace/ADIOSPP/include/mpi/transport /home/wfg/workspace/ADIOSPP/include/nompi/transport
+DOTFILE_DIRS = 
 
 # The MSCFILE_DIRS tag can be used to specify one or more directories that
 # contain msc files that are included in the documentation (see the \mscfile
@@ -2388,7 +2388,7 @@ DOT_GRAPH_MAX_NODES = 50
 # Minimum value: 0, maximum value: 1000, default value: 0.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-MAX_DOT_GRAPH_DEPTH = 3
+MAX_DOT_GRAPH_DEPTH = 0
 
 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
 # background. This is disabled by default, because dot on Windows does not seem
diff --git a/include/core/CGroup.h b/include/core/CGroup.h
index 3aef3a236..f544a838e 100644
--- a/include/core/CGroup.h
+++ b/include/core/CGroup.h
@@ -23,6 +23,7 @@
 #endif
 
 
+
 #include "core/CVariable.h"
 #include "core/SAttribute.h"
 #include "core/CTransport.h"
@@ -31,6 +32,9 @@
 namespace adios
 {
 
+/**
+ * Class that defines each ADIOS Group composed of Variables, Attributes and a Transport method
+ */
 class CGroup
 {
 
@@ -111,7 +115,7 @@ public:
      */
     void Monitor( std::ostream& logStream ) const;
 
-    void Close( );
+    void Close( ); ///< Close Group
 
 
 private:
diff --git a/include/core/CTransform.h b/include/core/CTransform.h
index 8086b9687..6c8153f69 100644
--- a/include/core/CTransform.h
+++ b/include/core/CTransform.h
@@ -40,13 +40,9 @@ public:
 
     virtual ~CTransform( );
 
-    virtual void WriteTransform( ) = 0;
+    virtual void Compress( ) const = 0; ///< Compress m_Variable data m_Value
 
-    virtual void ReadTransform( ) = 0;
-
-    virtual void GetCompressedLength( ) const = 0;
-
-    virtual void GetExpandedLength( ) const = 0;
+    virtual void Decompress( ) const = 0; ///< Ext m_Variable data m_Value
 
 };
 
diff --git a/include/core/CTransport.h b/include/core/CTransport.h
index d2bc1fa5a..cb89c6dda 100644
--- a/include/core/CTransport.h
+++ b/include/core/CTransport.h
@@ -34,8 +34,8 @@ public:
     const unsigned int m_Iteration;
     MPI_Comm m_MPIComm;
 
-    std::string m_FileName;
-    std::string m_AccessMode;
+    std::string m_FileName; ///< file name associated with a group that owns the transport
+    std::string m_AccessMode; ///< read, write, append
 
     CTransport( const std::string method, const unsigned int priority, const unsigned int iteration,
                 MPI_Comm mpiComm ):
diff --git a/include/core/CVariable.h b/include/core/CVariable.h
index fc7c42858..919438c2c 100644
--- a/include/core/CVariable.h
+++ b/include/core/CVariable.h
@@ -15,6 +15,7 @@
 #include <sstream>
 /// \endcond
 
+
 namespace adios
 {
 
diff --git a/include/public/ADIOS.h b/include/public/ADIOS.h
index fe50a0762..fade55c64 100644
--- a/include/public/ADIOS.h
+++ b/include/public/ADIOS.h
@@ -20,8 +20,8 @@
   #include "public/mpidummy.h"
 #endif
 
-
 #include "core/CGroup.h"
+#include "core/CTransport.h"
 #include "public/SSupport.h"
 
 
@@ -73,9 +73,9 @@ public: // PUBLIC Constructors and Functions define the User Interface with ADIO
     /**
      * @brief Get the total sum of payload and overhead, which includes name, data type, dimensions and other metadata
      * @param groupName
-     * @return group size in
+     * @return group size in MB
      */
-    unsigned long int GroupSize( const std::string groupName ) const;
+    unsigned long int GetGroupSize( const std::string groupName ) const;
 
     /**
      * Submits a data element values for writing and associates it with the given variableName
@@ -93,7 +93,11 @@ public: // PUBLIC Constructors and Functions define the User Interface with ADIO
      */
     void MonitorGroups( std::ostream& logStream ) const;
 
-    void Close( const std::string groupName ); // dumps to file?
+    /**
+     * Close a particular group
+     * @param groupName
+     */
+    void Close( const std::string groupName );
 
 
 
@@ -112,6 +116,7 @@ private:
      */
     std::map< std::string, CGroup > m_Groups;
 
+    std::map< std::string, CTransform > m_Transforms;
 
     /**
      * @brief Maximum buffer size in ADIOS write() operation. From buffer max - size - MB in XML file
diff --git a/include/public/mpidummy.h b/include/public/mpidummy.h
index ae0cbaf7e..ee836961d 100644
--- a/include/public/mpidummy.h
+++ b/include/public/mpidummy.h
@@ -11,11 +11,14 @@
 /*
    A dummy MPI 'implementation' for the BP READ API, to have an MPI-free version of the API
 */
+
+/// \cond EXCLUDE_FROM_DOXYGEN
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdint.h>
 #include <stdio.h>
+/// \endcond
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/include/transform/CBZIP2.h b/include/transform/CBZIP2.h
index b8b06aeb7..793ae845c 100644
--- a/include/transform/CBZIP2.h
+++ b/include/transform/CBZIP2.h
@@ -33,13 +33,9 @@ public:
 
     ~CBZIP2( );
 
-    void WriteTransform( );
+    void Compress( ) const;
 
-    void ReadTransform( );
-
-    void GetCompressedLength( ) const;
-
-    void GetExpandedLength( ) const;
+    void Decompress( ) const;
 
 };
 
diff --git a/include/transform/CSZIP.h b/include/transform/CSZIP.h
index 7b203437c..242d08ab1 100644
--- a/include/transform/CSZIP.h
+++ b/include/transform/CSZIP.h
@@ -25,20 +25,17 @@ class CSZIP : public CTransform
 public:
 
     /**
-     * Initialize parent method
+     * CSZIP constructor
+     * @param compressionLevel
      * @param variable
      */
     CSZIP( const unsigned int compressionLevel, CVariable& variable );
 
     ~CSZIP( );
 
-    void WriteTransform( );
+    void Compress( ) const;
 
-    void ReadTransform( );
-
-    void GetCompressedLength( ) const;
-
-    void GetExpandedLength( ) const;
+    void Decompress( ) const;
 
 };
 
diff --git a/include/transform/CZLIB.h b/include/transform/CZLIB.h
index dba62839b..a62adf27b 100644
--- a/include/transform/CZLIB.h
+++ b/include/transform/CZLIB.h
@@ -24,20 +24,18 @@ class CZLIB : public CTransform
 public:
 
     /**
-     * Initialize parent method
+     * CZLIB Constructor
+     * @param compressionLevel
      * @param variable
      */
     CZLIB( const unsigned int compressionLevel, CVariable& variable );
 
     ~CZLIB( );
 
-    void WriteTransform( );
 
-    void ReadTransform( );
+    void Compress( ) const;
 
-    void GetCompressedLength( ) const;
-
-    void GetExpandedLength( ) const;
+    void Decompress( ) const;
 
 };
 
diff --git a/include/transport/CMPIAggregate.h b/include/transport/CMPIAggregate.h
index 0e2d710e6..dbec7c8c7 100644
--- a/include/transport/CMPIAggregate.h
+++ b/include/transport/CMPIAggregate.h
@@ -17,7 +17,7 @@ namespace adios
 {
 
 
-class CMPIAggregate : public CTransportMPI
+class CMPIAggregate : public CTransport
 {
 
 public:
diff --git a/src/core/CGroup.cpp b/src/core/CGroup.cpp
index d1513fe57..cebda7f8d 100644
--- a/src/core/CGroup.cpp
+++ b/src/core/CGroup.cpp
@@ -5,9 +5,8 @@
  *      Author: wfg
  */
 
-/// \cond EXCLUDED_FROM_DOXYGEN
+
 #include <iostream>
-/// \endcond
 
 
 #include "core/CGroup.h"
diff --git a/src/public/mpidummy.c b/src/public/mpidummy.c
index ea763bab6..7ec98f942 100644
--- a/src/public/mpidummy.c
+++ b/src/public/mpidummy.c
@@ -8,7 +8,7 @@
 /*
    A dummy MPI implementation for the BP READ API, to have an MPI-free version of the API
 */
-
+/// \cond EXCLUDE_FROM_DOXYGEN
 #include <stdint.h>
 #include <inttypes.h>
 #include <stdio.h>
@@ -17,6 +17,7 @@
 #include <sys/types.h>
 #include <sys/time.h>
 #include <unistd.h>
+/// \endcond
 
 #include "public/mpidummy.h"
 
diff --git a/src/transform/CBZIP2.cpp b/src/transform/CBZIP2.cpp
new file mode 100644
index 000000000..eddeb630f
--- /dev/null
+++ b/src/transform/CBZIP2.cpp
@@ -0,0 +1,35 @@
+/*
+ * CBZIP2.cpp
+ *
+ *  Created on: Oct 19, 2016
+ *      Author: wfg
+ */
+
+
+
+#include "transform/CBZIP2.h"
+
+
+
+namespace adios
+{
+
+
+CBZIP2::CBZIP2( const unsigned int compressionLevel, CVariable& variable ):
+    CTransform( "bzip2", compressionLevel, variable )
+{ }
+
+CBZIP2::~CBZIP2( )
+{ }
+
+void CBZIP2::Compress( ) const
+{ }
+
+void CBZIP2::Compress( ) const
+{ }
+
+
+
+} //end namespace
+
+
diff --git a/src/transform/CSZIP.cpp b/src/transform/CSZIP.cpp
new file mode 100644
index 000000000..adad5e8db
--- /dev/null
+++ b/src/transform/CSZIP.cpp
@@ -0,0 +1,33 @@
+/*
+ * CSZIP.cpp
+ *
+ *  Created on: Oct 19, 2016
+ *      Author: wfg
+ */
+
+
+
+#include "transform/CSZIP.h"
+
+
+
+namespace adios
+{
+
+CSZIP::CSZIP( const unsigned int compressionLevel, CVariable& variable ):
+    CTransform( "szip", compressionLevel, variable )
+{ }
+
+CSZIP::~CSZIP( )
+{ }
+
+void CSZIP::Compress( ) const
+{ }
+
+void CSZIP::Compress( ) const
+{ }
+
+
+
+
+} //end namespace
diff --git a/src/transform/CZLIB.cpp b/src/transform/CZLIB.cpp
new file mode 100644
index 000000000..d0c32d50e
--- /dev/null
+++ b/src/transform/CZLIB.cpp
@@ -0,0 +1,33 @@
+/*
+ * CZLIB.cpp
+ *
+ *  Created on: Oct 19, 2016
+ *      Author: wfg
+ */
+
+
+
+#include "transform/CZLIB.h"
+
+
+
+namespace adios
+{
+
+CZLIB::CZLIB( const unsigned int compressionLevel, CVariable& variable ):
+    CTransform( "szip", compressionLevel, variable )
+{ }
+
+CZLIB::~CZLIB( )
+{ }
+
+void CZLIB::Compress( ) const
+{ }
+
+void CZLIB::Decompress( ) const
+{ }
+
+
+
+
+} //end namespace
-- 
GitLab