Skip to content

Commit

Permalink
Edupack improved
Browse files Browse the repository at this point in the history
  • Loading branch information
pevisscher committed Feb 6, 2017
1 parent 2341e8c commit 1764cf5
Show file tree
Hide file tree
Showing 11 changed files with 227 additions and 301 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ Makefile
extern/
assets/
test/extern
test/assets
test/assets
edupack/bin/*
*.lock
27 changes: 19 additions & 8 deletions bsp/include/bsp/historyRecorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,10 @@ class HistoryRecorder
PlotWidthBars( plot );
plot.Figure();
PlotRatio( plot );
// plot.Figure();
//enabling this will result in an extra empty plot
//plot.Figure();
PlotMatrices( plot );
plot.Show();
plot.Show();
}

private:
Expand Down Expand Up @@ -430,7 +431,7 @@ class HistoryRecorder
return std::to_string( i ) + " Compute";
};

EasyPlot::BackgroundForegroundBarPlot( plot, mSyncTimes, mComputeTimes, mSuperstepIndices, backPalette, forePalette,
EasyPlot::BackgroundForegroundBarPlot( plot, ToPVecVec(mSyncTimes), ToPVecVec(mComputeTimes), ToPVecVec(mSuperstepIndices), backPalette, forePalette,
backHue,
foreHue );
plot.SetXLabel( "Superstep (grouped)" ).SetYLabel( "Time (s)" );
Expand All @@ -449,11 +450,11 @@ class HistoryRecorder
};

plot.SubPlot( 1, 2, 1 );
EasyPlot::StackedBarPlot( plot, mSuperstepIndices, mMaxSizes, palette, hueFunc );
EasyPlot::StackedBarPlot( plot, ToPVecVec(mSuperstepIndices), ToPVecVec(mMaxSizes), palette, hueFunc );
plot.SetXLabel( "Superstep (grouped)" ).SetYLabel( "Bytes communicated = max(send, receive)" );

plot.SubPlot( 1, 2, 2 );
EasyPlot::StackedBarPlot( plot, mSuperstepIndices, mMaxCounts, palette, hueFunc );
EasyPlot::StackedBarPlot( plot, ToPVecVec(mSuperstepIndices), ToPVecVec(mMaxCounts), palette, hueFunc );
plot.SetXLabel( "Superstep (grouped)" ).SetYLabel( "Messages communicated = max(send, receive)" );

plot.SetSupTitle( "#communications, grouped by superstep number" );
Expand All @@ -471,11 +472,11 @@ class HistoryRecorder
};

plot.SubPlot( 1, 2, 1 );
EasyPlot::StackedDistancedBarPlot( plot, mComputeTimes, mSyncTimes, mMaxSizes, palette, hueFunc );
EasyPlot::StackedDistancedBarPlot( plot, ToPVecVec(mComputeTimes), ToPVecVec(mSyncTimes), ToPVecVec(mMaxSizes), palette, hueFunc );
plot.SetXLabel( "Time (s)" ).SetYLabel( "Bytes communicated = max(send, receive)" );

plot.SubPlot( 1, 2, 2 );
EasyPlot::StackedDistancedBarPlot( plot, mComputeTimes, mSyncTimes, mMaxCounts, palette, hueFunc );
EasyPlot::StackedDistancedBarPlot( plot, ToPVecVec(mComputeTimes), ToPVecVec(mSyncTimes), ToPVecVec(mMaxCounts), palette, hueFunc );
plot.SetXLabel( "Time (s)" ).SetYLabel( "Messages communicated = max(send, receive)" );

plot.SetSupTitle( "#communications, width represents time" );
Expand Down Expand Up @@ -513,7 +514,7 @@ class HistoryRecorder

plot.SetLegend( hueData, hueFunc );
plot.SetXLabel( "Superstep" ).SetYLabel( "comp/(comm + sync)" );
plot.SetYScale( SymLogScale().SetLinScaleY(0.0,1.0) );
plot.SetYScale(SymLogScale());
plot.SetTitle( "Ratio comp/(comm + sync) per superstep" );
plot.SetSize( 1050, 400 );
}
Expand Down Expand Up @@ -570,6 +571,16 @@ class HistoryRecorder
plot.SetSupTitle( "#communications from processor left to processor bottom" );
plot.SetSize( 840, 600 );
}

static std::vector<PVec> ToPVecVec(const std::vector<std::vector<double>> &v)
{
std::vector<PVec> s;
for (const auto &c : v)
{
s.emplace_back(PVec(c));
}
return s;
}
};
#endif

Expand Down
8 changes: 8 additions & 0 deletions edupack/.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"requires": [
{
"name": "Zefiros-Software/BSPLib",
"path": "../"
}
]
}
1 change: 0 additions & 1 deletion edupack/bspbench.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "bspedupack.h"
#include "config.h"

#include <numeric>

Expand Down
1 change: 1 addition & 0 deletions edupack/bspedupack.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include "bsp/bsp.h"

#define SZDBL (sizeof(double))
Expand Down
17 changes: 0 additions & 17 deletions edupack/config.h

This file was deleted.

17 changes: 0 additions & 17 deletions edupack/package.json

This file was deleted.

230 changes: 0 additions & 230 deletions edupack/premake5.lua

This file was deleted.

0 comments on commit 1764cf5

Please sign in to comment.