From 558ad0bb6e2d0752fd4ff6fac6eacf81397606e7 Mon Sep 17 00:00:00 2001
From: wfg <wfg@pc0098504.ornl.gov>
Date: Fri, 7 Apr 2017 17:34:55 -0400
Subject: [PATCH] Verified that examples worked after merge

mpi and nompi:

helloBPWriter
timeBPWriter
---
 CMakeLists.txt                            |  2 +-
 examples/heatTransfer/write/IO_adios2.cpp | 24 +++++++++++------------
 source/CMakeLists.txt                     | 10 ++++++----
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d3f59d51..240c0554f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,7 @@ if(ADIOS_ENABLE_PIC)
   set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
 endif()
 
-option(ADIOS_USE_MPI "Enable the MPI version of ADIOS" OFF)
+option(ADIOS_USE_MPI "Enable the MPI version of ADIOS" ON)
 if(ADIOS_USE_MPI)
   # Workaround for OpenMPI forcing the link of C++ bindings
   add_definitions(-DOMPI_SKIP_MPICXX)
diff --git a/examples/heatTransfer/write/IO_adios2.cpp b/examples/heatTransfer/write/IO_adios2.cpp
index 8af454f71..72d118ea1 100644
--- a/examples/heatTransfer/write/IO_adios2.cpp
+++ b/examples/heatTransfer/write/IO_adios2.cpp
@@ -28,30 +28,29 @@ IO::IO(const Settings &s, MPI_Comm comm)
     // 1. Get method def from config file or define new one
 
     adios::Method &bpWriterSettings = ad->DeclareMethod("output");
-    if (!bpWriterSettings.isUserDefined())
+    if (!bpWriterSettings.IsUserDefined())
     {
         // if not defined by user, we can change the default settings
         bpWriterSettings.SetEngine("BPFileWriter"); // BP is the default engine
-        bpWriterSettings.AllowThreads(
-            1); // allow 1 extra thread for data processing
+        bpWriterSettings.AllowThreads(1);           // for data processing
+
         bpWriterSettings.AddTransport(
             "File", "lucky=yes"); // ISO-POSIX file is the default transport
                                   // Passing parameters to the transport
-        bpWriterSettings.SetParameters(
-            "have_metadata_file",
-            "yes"); // Passing parameters to the engine
-        bpWriterSettings.SetParameters(
-            "Aggregation",
-            std::to_string((s.nproc + 1) / 2)); // number of aggregators
+
+        const std::string aggregatorsParam("Aggregators=" +
+                                           std::to_string((s.nproc + 1) / 2));
+        bpWriterSettings.SetParameters("have_metadata_file=yes",
+                                       aggregatorsParam);
     }
 
     // define T as 2D global array
     varT = &ad->DefineVariable<double>(
         "T",
-        // Global dimensions
-        {s.gndx, s.gndy},
         // local size, could be defined later using SetSelection()
         {s.ndx, s.ndy},
+        // Global dimensions
+        {s.gndx, s.gndy},
         // offset of the local array in the global space
         {s.offsx, s.offsy});
 
@@ -60,8 +59,7 @@ IO::IO(const Settings &s, MPI_Comm comm)
     // varT.AddTransform( tr, "" );
     // varT.AddTransform( tr,"accuracy=0.001" );  // for ZFP
 
-    bpWriter = ad->Open(m_outputfilename, "w", comm, bpWriterSettings,
-                        adios::IOMode::COLLECTIVE);
+    bpWriter = ad->Open(m_outputfilename, "w", comm, bpWriterSettings);
 
     if (bpWriter == nullptr)
         throw std::ios_base::failure("ERROR: failed to open ADIOS bpWriter\n");
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 766c5dec1..2ccf94700 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -26,15 +26,17 @@ foreach(adios2_target IN LISTS adios2_targets)
     engine/bp/BPFileReader.cpp
     engine/bp/BPFileWriter.cpp
   
-    format/BP1.cpp
-    format/BP1Aggregator.cpp
-    format/BP1Writer.cpp
-  
     functions/adiosFunctions.cpp
   
     transport/file/FStream.cpp
     transport/file/FileDescriptor.cpp
     transport/file/FilePointer.cpp
+    
+    utilities/format/bp1/BP1Base.cpp
+    utilities/format/bp1/BP1Aggregator.cpp
+    utilities/format/bp1/BP1Writer.cpp
+    
+    utilities/profiling/iochrono/Timer.cpp
   )
   target_include_directories(${adios2_target}
     PUBLIC ${ADIOS_SOURCE_DIR}/include
-- 
GitLab