NDMeshStreamer: bug fixes
authorLukasz Wesolowski <wesolwsk@illinois.edu>
Wed, 1 Feb 2012 06:11:48 +0000 (00:11 -0600)
committerLukasz Wesolowski <wesolwsk@illinois.edu>
Wed, 1 Feb 2012 06:11:48 +0000 (00:11 -0600)
src/libs/ck-libs/Makefile
src/libs/ck-libs/NDMeshStreamer/NDMeshStreamer.ci
src/libs/ck-libs/NDMeshStreamer/NDMeshStreamer.h

index 7a086bd5436a944b3599e12189e47fc8ba1a1d33..45f5f51e9c2196fc5c87e720b63ad3b804583248 100644 (file)
@@ -4,7 +4,7 @@ CHARMINC=.
 SIMPLE_DIRS = completion cache sparseContiguousReducer tcharm ampi idxl \
               parmetis multiphaseSharedArrays fem ParFUM \
               ifem armci collide mblock barrier irecv netfem liveViz \
-              taskGraph search datatransfer MeshStreamer pose \
+              taskGraph search datatransfer MeshStreamer NDMeshStreamer pose \
               state_space_searchengine
 DIRS = $(SIMPLE_DIRS) pythonCCS
 
index 759d423bc14e0486d23655f3c94878b4b8fc7102..eefcfdcc192df9d357058371e5ceda5fe0228cc2 100644 (file)
@@ -13,7 +13,7 @@ module NDMeshStreamer {
   template<class dtype> 
   group MeshStreamer {
     entry MeshStreamer(int totalBufferCapacity, int numDimensions, 
-                      int *dimensionSizes
+                      int dimensionSizes[numDimensions]
                       const CProxy_MeshStreamerClient<dtype> &clientProxy, 
                        int yieldFlag = 0, double progressPeriodInMs = -1.0);   
     entry void receiveAlongRoute(MeshStreamerMessage<dtype> *msg);
index ba66c190be042791d7516eaaeba6f5d4d96c7933..d7bfe9da3a5f07cfa1d12cc6e2f400a86164e60a 100644 (file)
@@ -2,7 +2,7 @@
 #define _NDMESH_STREAMER_H_
 
 #include <algorithm>
-#include "MeshStreamer.decl.h"
+#include "NDMeshStreamer.decl.h"
 
 // allocate more total buffer space than the maximum buffering limit but flush 
 //   upon reaching totalBufferCapacity_
@@ -160,7 +160,7 @@ void MeshStreamerClient<dtype>::receiveCombinedData(
 template <class dtype>
 MeshStreamer<dtype>::MeshStreamer(
                     int totalBufferCapacity, int numDimensions, 
-                     int *dimensionSizes, 
+                    int *dimensionSizes, 
                      const CProxy_MeshStreamerClient<dtype> &clientProxy,
                     int yieldFlag, 
                      double progressPeriodInMs)
@@ -179,7 +179,6 @@ MeshStreamer<dtype>::MeshStreamer(
   myLocationIndex_ = new int[numDimensions_];
   memcpy(individualDimensionSizes_, dimensionSizes, 
         numDimensions * sizeof(int)); 
-
   combinedDimensionSizes_[0] = 1; 
   for (int i = 0; i < numDimensions; i++) {
     sumAlongAllDimensions += individualDimensionSizes_[i];
@@ -197,6 +196,7 @@ MeshStreamer<dtype>::MeshStreamer(
   clientProxy_ = clientProxy; 
   clientObj_ = ((MeshStreamerClient<dtype> *)CkLocalBranch(clientProxy_));
 
+  dataBuffers_ = new MeshStreamerMessage<dtype> **[numDimensions_]; 
   for (int i = 0; i < numDimensions; i++) {
     int numNodesAlongDimension = individualDimensionSizes_[i]; 
     dataBuffers_[i] = new MeshStreamerMessage<dtype> *[numNodesAlongDimension];
@@ -581,7 +581,7 @@ void MeshStreamer<dtype>::registerPeriodicProgressFunction() {
 
 
 #define CK_TEMPLATES_ONLY
-#include "MeshStreamer.def.h"
+#include "NDMeshStreamer.def.h"
 #undef CK_TEMPLATES_ONLY
 
 #endif