-
Notifications
You must be signed in to change notification settings - Fork 4
Communication per processor and over time functionality has been added #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
008c1ad
85cceae
198d82a
fca6105
0c66e5b
e6399cb
b85aa66
8c6f16b
eae3a01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -350,59 +350,113 @@ public void showDialog() { | |
numIntervals = endInterval-startInterval+1; | ||
processorList = new TreeSet<Integer>(dialog.getSelectedProcessors()); | ||
|
||
final SwingWorker worker = new SwingWorker() { | ||
public Object doInBackground() { | ||
getData(); | ||
return null; | ||
} | ||
public void done() { | ||
setOutputGraphData(); | ||
Checkbox cb = cbg.getSelectedCheckbox(); | ||
setCheckboxData(cb); | ||
thisWindow.setVisible(true); | ||
thisWindow.repaint(); | ||
} | ||
}; | ||
final SwingWorker worker; | ||
if (MainWindow.runObject[myRun].hasLogFiles()) { | ||
worker = new SwingWorker() { | ||
public Object doInBackground() { | ||
getData(); | ||
return null; | ||
} | ||
public void done() { | ||
setOutputGraphData(); | ||
Checkbox cb = cbg.getSelectedCheckbox(); | ||
setCheckboxData(cb); | ||
thisWindow.setVisible(true); | ||
thisWindow.repaint(); | ||
} | ||
}; | ||
} | ||
else{ | ||
worker = new SwingWorker() { | ||
public Object doInBackground() { | ||
return null; | ||
} | ||
public void done() { | ||
getData(); | ||
setOutputGraphData(); | ||
Checkbox cb = cbg.getSelectedCheckbox(); | ||
setCheckboxData(cb); | ||
thisWindow.setVisible(true); | ||
thisWindow.repaint(); | ||
} | ||
}; | ||
} | ||
worker.execute(); | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
private void getData() { | ||
|
||
|
||
sentMsgCount = new double[numIntervals][numEPs]; | ||
sentByteCount = new double[numIntervals][numEPs]; | ||
receivedMsgCount = new double[numIntervals][numEPs]; | ||
receivedByteCount = new double[numIntervals][numEPs]; | ||
receivedExternalMsgCount = new double[numIntervals][numEPs]; | ||
receivedExternalByteCount = new double[numIntervals][numEPs]; | ||
receivedExternalNodeMsgCount = new double[numIntervals][numEPs]; | ||
receivedExternalNodeByteCount = new double[numIntervals][numEPs]; | ||
|
||
// Create a list of worker threads | ||
LinkedList<Runnable> readyReaders = new LinkedList<Runnable>(); | ||
int pIdx = 0; | ||
for (Integer nextPe : processorList){ | ||
//readyReaders.add( new ThreadedFileReader(nextPe, intervalSize, startInterval, endInterval, sentMsgCount, receivedMsgCount, sentByteCount, receivedByteCount, receivedExternalMsgCount, receivedExternalByteCount) ); | ||
readyReaders.add( new ThreadedFileReader(nextPe, intervalSize, startInterval, endInterval, sentMsgCount, receivedMsgCount, sentByteCount, receivedByteCount, receivedExternalMsgCount, receivedExternalByteCount, receivedExternalNodeMsgCount, receivedExternalNodeByteCount) ); | ||
pIdx++; | ||
|
||
if (MainWindow.runObject[myRun].hasLogData()) { | ||
sentMsgCount = new double[numIntervals][numEPs]; | ||
sentByteCount = new double[numIntervals][numEPs]; | ||
receivedMsgCount = new double[numIntervals][numEPs]; | ||
receivedByteCount = new double[numIntervals][numEPs]; | ||
receivedExternalMsgCount = new double[numIntervals][numEPs]; | ||
receivedExternalByteCount = new double[numIntervals][numEPs]; | ||
receivedExternalNodeMsgCount = new double[numIntervals][numEPs]; | ||
receivedExternalNodeByteCount = new double[numIntervals][numEPs]; | ||
|
||
// Create a list of worker threads | ||
LinkedList<Runnable> readyReaders = new LinkedList<Runnable>(); | ||
for (Integer nextPe : processorList){ | ||
//readyReaders.add( new ThreadedFileReader(nextPe, intervalSize, startInterval, endInterval, sentMsgCount, receivedMsgCount, sentByteCount, receivedByteCount, receivedExternalMsgCount, receivedExternalByteCount) ); | ||
readyReaders.add( new ThreadedFileReader(nextPe, intervalSize, startInterval, endInterval, sentMsgCount, receivedMsgCount, sentByteCount, receivedByteCount, receivedExternalMsgCount, receivedExternalByteCount, receivedExternalNodeMsgCount, receivedExternalNodeByteCount) ); | ||
} | ||
|
||
// Determine a component to show the progress bar with | ||
Component guiRootForProgressBar = null; | ||
if(thisWindow!=null && thisWindow.isVisible()) { | ||
guiRootForProgressBar = thisWindow; | ||
} else if(MainWindow.runObject[myRun].guiRoot!=null && MainWindow.runObject[myRun].guiRoot.isVisible()){ | ||
guiRootForProgressBar = MainWindow.runObject[myRun].guiRoot; | ||
} | ||
|
||
// Pass this list of threads to a class that manages/runs the threads nicely | ||
TimedProgressThreadExecutor threadManager = new TimedProgressThreadExecutor("Loading Communication Data in Parallel", readyReaders, guiRootForProgressBar, true); | ||
threadManager.runAll(); | ||
} | ||
|
||
// Determine a component to show the progress bar with | ||
Component guiRootForProgressBar = null; | ||
if(thisWindow!=null && thisWindow.isVisible()) { | ||
guiRootForProgressBar = thisWindow; | ||
} else if(MainWindow.runObject[myRun].guiRoot!=null && MainWindow.runObject[myRun].guiRoot.isVisible()){ | ||
guiRootForProgressBar = MainWindow.runObject[myRun].guiRoot; | ||
else{ | ||
double[][] sentMsgCount_temp = MainWindow.runObject[myRun].getMsg_count(); | ||
double[][] sentByteCount_temp = MainWindow.runObject[myRun].getMsg_size(); | ||
double[][] receivedMsgCount_temp = MainWindow.runObject[myRun].getMsg_recv_count(); | ||
double[][] receivedByteCount_temp = MainWindow.runObject[myRun].getMsg_recv_size(); | ||
double[][] receivedExternalMsgCount_temp = MainWindow.runObject[myRun].getMsg_recv_count_ext(); | ||
double[][] receivedExternalByteCount_temp = MainWindow.runObject[myRun].getMsg_recv_size_ext(); | ||
int numIntervals2=sentMsgCount_temp[0].length/numEPs; | ||
for(int i =0;i<sentMsgCount_temp.length;i++){ | ||
if((sentMsgCount_temp[i].length/numEPs) > numIntervals2){ | ||
numIntervals2=sentMsgCount_temp[i].length/numEPs; | ||
} | ||
} | ||
sentMsgCount = new double[numIntervals][numEPs]; | ||
sentByteCount = new double[numIntervals][numEPs]; | ||
receivedMsgCount = new double[numIntervals][numEPs]; | ||
receivedByteCount = new double[numIntervals][numEPs]; | ||
receivedExternalMsgCount = new double[numIntervals][numEPs]; | ||
receivedExternalByteCount = new double[numIntervals][numEPs]; | ||
receivedExternalNodeMsgCount = new double[numIntervals][numEPs]; | ||
receivedExternalNodeByteCount = new double[numIntervals][numEPs]; | ||
|
||
for(int i =0;i<sentMsgCount_temp.length;i++){ | ||
for(int j =0;j<sentMsgCount_temp[i].length;j++){ | ||
int curInt= j/numEPs ; | ||
int curEP= j-curInt*numEPs; | ||
curInt = (curInt * 1000)/numIntervals2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this |
||
sentMsgCount[curInt][curEP]+=sentMsgCount_temp[i][j]; | ||
sentByteCount[curInt][curEP]+=sentByteCount_temp[i][j]; | ||
receivedMsgCount[curInt][curEP]+=receivedMsgCount_temp[i][j]; | ||
receivedByteCount[curInt][curEP]+=receivedByteCount_temp[i][j]; | ||
receivedExternalMsgCount[curInt][curEP]+=receivedExternalMsgCount_temp[i][j]; | ||
receivedExternalByteCount[curInt][curEP]+=receivedExternalByteCount_temp[i][j]; | ||
receivedExternalNodeMsgCount[curInt][curEP]+=receivedExternalMsgCount_temp[i][j]; | ||
receivedExternalNodeByteCount[curInt][curEP]+=receivedExternalByteCount_temp[i][j]; | ||
} | ||
} | ||
} | ||
|
||
// Pass this list of threads to a class that manages/runs the threads nicely | ||
TimedProgressThreadExecutor threadManager = new TimedProgressThreadExecutor("Loading Communication Data in Parallel", readyReaders, guiRootForProgressBar, true); | ||
threadManager.runAll(); | ||
|
||
// Set the exists array to accept non-zero entries only | ||
// Have initial state also display all existing data. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -357,6 +357,30 @@ public double getSumDetailIntervalSize() { | |
public double getSumDetailNumIntervals(){ | ||
return intervalData.getNumIntervals(); | ||
} | ||
public double[][] getMsg_count() | ||
{ | ||
return intervalData.getMsg_count(); | ||
} | ||
public double[][] getMsg_size() | ||
{ | ||
return intervalData.getMsg_size(); | ||
} | ||
public double[][] getMsg_recv_count() | ||
{ | ||
return intervalData.getMsg_recv_count(); | ||
} | ||
public double[][] getMsg_recv_size() | ||
{ | ||
return intervalData.getMsg_recv_size(); | ||
} | ||
public double[][] getMsg_recv_count_ext() | ||
{ | ||
return intervalData.getMsg_recv_count_ext(); | ||
} | ||
public double[][] getMsg_recv_size_ext() | ||
{ | ||
return intervalData.getMsg_recv_size_ext(); | ||
} | ||
Comment on lines
+360
to
+383
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation and style, try to use camelCase and avoid using |
||
|
||
public int[][] getSumDetailData_interval_EP() { | ||
return intervalData.getSumDetailData_interval_EP(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,12 @@ public class IntervalData | |
private int systemUsageData[][][] = null; | ||
private int systemMsgsData[][][][] = null; | ||
private int userEntryData [][][][] = null; | ||
private double[][] msg_count; | ||
private double[][] msg_size; | ||
private double[][] msg_recv_count; | ||
private double[][] msg_recv_size; | ||
private double[][] msg_recv_count_ext; | ||
private double[][] msg_recv_size_ext; | ||
Comment on lines
+49
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These should all be removed in favor of using |
||
|
||
private int numEPs = 0; | ||
private int numPEs = 0; | ||
|
@@ -72,6 +78,13 @@ public IntervalData() { | |
if (MainWindow.runObject[myRun].hasSumDetailData()) { | ||
summaryDetails = new SumDetailReader[numPEs]; | ||
rawData = new ArrayList[SumDetailReader.NUM_TAGS][numPEs][]; | ||
msg_count= new double[numPEs][]; | ||
msg_size= new double[numPEs][]; | ||
msg_recv_count= new double[numPEs][]; | ||
msg_recv_size= new double[numPEs][]; | ||
msg_recv_count_ext= new double[numPEs][]; | ||
msg_recv_size_ext= new double[numPEs][]; | ||
|
||
SortedSet<Integer> availablePEs = | ||
MainWindow.runObject[myRun].getValidProcessorList(ProjMain.SUMDETAIL); | ||
for(Integer pe : availablePEs) { | ||
|
@@ -93,6 +106,12 @@ public IntervalData() { | |
// **CW** do nothing for now. No rebinning facilities in | ||
// place yet. | ||
intervalSize = summaryDetails[pe].getIntervalSize(); | ||
msg_count[pe] = summaryDetails[pe].getMsg_count(); | ||
msg_size[pe] = summaryDetails[pe].getMsg_size(); | ||
msg_recv_count[pe] = summaryDetails[pe].getMsg_recv_count(); | ||
msg_recv_size[pe] = summaryDetails[pe].getMsg_recv_size(); | ||
msg_recv_count_ext[pe] = summaryDetails[pe].getMsg_recv_count_ext(); | ||
msg_recv_size_ext[pe] = summaryDetails[pe].getMsg_recv_size_ext(); | ||
|
||
} catch (IOException e) { | ||
// This exception, in future, should simply cause the | ||
|
@@ -237,6 +256,34 @@ public int getNumIntervals() { | |
public double getIntervalSize() { | ||
return intervalSize; | ||
} | ||
public double[][] getMsg_count() | ||
{ | ||
return msg_count; | ||
} | ||
|
||
public double[][] getMsg_size() | ||
{ | ||
return msg_size; | ||
} | ||
public double[][] getMsg_recv_count() | ||
{ | ||
return msg_recv_count; | ||
} | ||
|
||
public double[][] getMsg_recv_size() | ||
{ | ||
return msg_recv_size; | ||
} | ||
public double[][] getMsg_recv_count_ext() | ||
{ | ||
return msg_recv_count_ext; | ||
} | ||
|
||
public double[][] getMsg_recv_size_ext() | ||
{ | ||
return msg_recv_size_ext; | ||
} | ||
Comment on lines
+259
to
+285
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this can all be done via the existing |
||
|
||
|
||
// /** | ||
// * Accumulate compressed interval data for a particular EP and type onto | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is almost exactly duplicated from the
hasLogFiles()
case, can they be combined?