Skip to content

Commit 8f5c515

Browse files
committed
Communication Per PE: Cleanup "exclusive"->"external"
1 parent 9fcd9b1 commit 8f5c515

File tree

2 files changed

+45
-47
lines changed

2 files changed

+45
-47
lines changed

src/projections/Tools/CommunicationPerPE/CommWindow.java

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ public class CommWindow extends GenericGraphWindow
4040
// runs.
4141
private static int myRun = 0;
4242

43-
private double[][] sentMsgCount;
44-
private double[][] sentByteCount;
45-
private double[][] receivedMsgCount;
46-
private double[][] receivedByteCount;
47-
private double[][] exclusiveRecv;
48-
private double[][] exclusiveBytesRecv;
49-
private int[][] hopCount;
50-
private double[][] avgHopCount;
51-
private double[][] avgPeHopCount;
43+
private double[][] sentMsgCount;
44+
private double[][] sentByteCount;
45+
private double[][] receivedMsgCount;
46+
private double[][] receivedByteCount;
47+
private double[][] externalRecv;
48+
private double[][] externalBytesRecv;
49+
private int[][] hopCount;
50+
private double[][] avgHopCount;
51+
private double[][] avgPeHopCount;
5252

5353
// in microseconds, so 1 = "per us", 1000 = "per ms", 1000000 = "per s"
5454
// user will be able to change this from the UI
@@ -72,8 +72,8 @@ public class CommWindow extends GenericGraphWindow
7272
private Checkbox sentBytes;
7373
private Checkbox receivedMsgs;
7474
private Checkbox receivedBytes;
75-
private Checkbox recvExclusive;
76-
private Checkbox recvExclusiveBytes;
75+
private Checkbox recvExternal;
76+
private Checkbox recvExternalBytes;
7777
private Checkbox hopCountCB;
7878
private Checkbox peHopCountCB;
7979

@@ -145,17 +145,15 @@ public void itemStateChanged(ItemEvent ae){
145145
setYAxis("Rate of Bytes Received", "");
146146
setXAxis("Processor", peList);
147147
super.refreshGraph();
148-
}else if(cb == recvExclusive){
149-
setDataSource("Rate of Msgs Received Externally",
150-
exclusiveRecv, this);
151-
setPopupText("exclusiveRecv");
148+
}else if(cb == recvExternal){
149+
setDataSource("Rate of Msgs Received Externally", externalRecv, this);
150+
setPopupText("externalRecv");
152151
setYAxis("Rate of Messages Received Externally", "");
153152
setXAxis("Processor", peList);
154153
super.refreshGraph();
155-
} else if(cb == recvExclusiveBytes){
156-
setDataSource("Rate of Bytes Received Externally",
157-
exclusiveBytesRecv, this);
158-
setPopupText("exclusiveBytesRecv");
154+
} else if(cb == recvExternalBytes){
155+
setDataSource("Rate of Bytes Received Externally", externalBytesRecv, this);
156+
setPopupText("externalBytesRecv");
159157
setYAxis("Rate of Bytes Received Externally", "");
160158
setXAxis("Processor", peList);
161159
super.refreshGraph();
@@ -201,8 +199,8 @@ private void scaleHistogramData(double newUnit) {
201199
sentByteCount[pIdx][ep] *= scale;
202200
receivedMsgCount[pIdx][ep] *= scale;
203201
receivedByteCount[pIdx][ep] *= scale;
204-
exclusiveRecv[pIdx][ep] *= scale;
205-
exclusiveBytesRecv[pIdx][ep] *= scale;
202+
externalRecv[pIdx][ep] *= scale;
203+
externalBytesRecv[pIdx][ep] *= scale;
206204
}
207205
}
208206
unitTime = newUnit;
@@ -255,19 +253,19 @@ public String[] getPopup(int xVal, int yVal){
255253
unitTimeStr,
256254
_format.format(receivedByteCount[xVal][yVal]*timeInterval/unitTime));
257255
rString[3] = "Processor = " + xAxis.getIndexName(xVal);
258-
} else if(currentArrayName.equals("exclusiveRecv")) {
256+
} else if(currentArrayName.equals("externalRecv")) {
259257
rString[1] = "EPid: " + a.getEntryNameByIndex(yVal);
260258
rString[2] = String.format("Rate = %s messages/%s (%s messages)",
261-
_format.format(exclusiveRecv[xVal][yVal]),
259+
_format.format(externalRecv[xVal][yVal]),
262260
unitTimeStr,
263-
_format.format(exclusiveRecv[xVal][yVal]*timeInterval/unitTime));
261+
_format.format(externalRecv[xVal][yVal]*timeInterval/unitTime));
264262
rString[3] = "Processor = " + xAxis.getIndexName(xVal);
265-
} else if(currentArrayName.equals("exclusiveBytesRecv")) {
263+
} else if(currentArrayName.equals("externalBytesRecv")) {
266264
rString[1] = "EPid: " + a.getEntryNameByIndex(yVal);
267265
rString[2] = String.format("Rate = %s B/%s (%s bytes)",
268-
_format.format(exclusiveBytesRecv[xVal][yVal]),
266+
_format.format(externalBytesRecv[xVal][yVal]),
269267
unitTimeStr,
270-
_format.format(exclusiveBytesRecv[xVal][yVal]*timeInterval/unitTime));
268+
_format.format(externalBytesRecv[xVal][yVal]*timeInterval/unitTime));
271269
rString[3] = "Processor = " + xAxis.getIndexName(xVal);
272270
} else if (currentArrayName.equals("avgHopCount")) {
273271
rString[1] = "EPid: " + a.getEntryNameByIndex(yVal);
@@ -321,9 +319,9 @@ private void createLayout() {
321319
sentBytes = new Checkbox("Bytes Sent To", cbg, false);
322320
receivedMsgs = new Checkbox("Msgs Recv By", cbg, false);
323321
receivedBytes = new Checkbox("Bytes Recv By", cbg, false);
324-
recvExclusive = new Checkbox("External Msgs Recv By", cbg,
322+
recvExternal = new Checkbox("External Msgs Recv By", cbg,
325323
false);
326-
recvExclusiveBytes = new Checkbox("External Bytes Recv By", cbg,
324+
recvExternalBytes = new Checkbox("External Bytes Recv By", cbg,
327325
false);
328326

329327
if (MainWindow.BLUEGENE) {
@@ -336,8 +334,8 @@ private void createLayout() {
336334
sentBytes.addItemListener(this);
337335
receivedMsgs.addItemListener(this);
338336
receivedBytes.addItemListener(this);
339-
recvExclusive.addItemListener(this);
340-
recvExclusiveBytes.addItemListener(this);
337+
recvExternal.addItemListener(this);
338+
recvExternalBytes.addItemListener(this);
341339
if (MainWindow.BLUEGENE) {
342340
hopCountCB.addItemListener(this);
343341
peHopCountCB.addItemListener(this);
@@ -348,8 +346,8 @@ private void createLayout() {
348346
Util.gblAdd(checkBoxPanel, sentBytes, gbc, 1,0, 1,1, 1,1);
349347
Util.gblAdd(checkBoxPanel, receivedMsgs, gbc, 2,0, 1,1, 1,1);
350348
Util.gblAdd(checkBoxPanel, receivedBytes, gbc, 3,0, 1,1, 1,1);
351-
Util.gblAdd(checkBoxPanel, recvExclusive, gbc, 4,0, 1,1, 1,1);
352-
Util.gblAdd(checkBoxPanel, recvExclusiveBytes, gbc, 5,0, 1,1, 1,1);
349+
Util.gblAdd(checkBoxPanel, recvExternal, gbc, 4,0, 1,1, 1,1);
350+
Util.gblAdd(checkBoxPanel, recvExternalBytes, gbc, 5,0, 1,1, 1,1);
353351

354352
if (MainWindow.BLUEGENE) {
355353
Util.gblAdd(blueGenePanel, hopCountCB, gbc, 0,0, 1,1, 1,1);
@@ -424,8 +422,8 @@ private void getData(long startTime, long endTime, SortedSet<Integer> pes){
424422
sentByteCount = new double[pes.size()][];
425423
receivedMsgCount = new double[pes.size()][];
426424
receivedByteCount = new double[pes.size()][];
427-
exclusiveRecv = new double[pes.size()][];
428-
exclusiveBytesRecv = new double[pes.size()][];
425+
externalRecv = new double[pes.size()][];
426+
externalBytesRecv = new double[pes.size()][];
429427
if (MainWindow.BLUEGENE) {
430428
hopCount = new int[pes.size()][];
431429
} else {
@@ -440,7 +438,7 @@ private void getData(long startTime, long endTime, SortedSet<Integer> pes){
440438
LinkedList<Runnable> readyReaders = new LinkedList<Runnable>();
441439
int pIdx = 0;
442440
for(Integer nextPe : pes){
443-
readyReaders.add( new ThreadedFileReader(nextPe, pIdx, startTime, endTime, sentMsgCount, sentByteCount, receivedMsgCount, receivedByteCount, exclusiveRecv, exclusiveBytesRecv, hopCount ) );
441+
readyReaders.add( new ThreadedFileReader(nextPe, pIdx, startTime, endTime, sentMsgCount, sentByteCount, receivedMsgCount, receivedByteCount, externalRecv, externalBytesRecv, hopCount ) );
444442
pIdx++;
445443
}
446444

src/projections/Tools/CommunicationPerPE/ThreadedFileReader.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ class ThreadedFileReader extends ThreadedFileReaderBase implements Runnable {
2424
private double[][] sentByteCount;
2525
private double[][] receivedMsgCount;
2626
private double[][] receivedByteCount;
27-
private double[][] exclusiveRecv;
28-
private double[][] exclusiveBytesRecv;
27+
private double[][] externalRecv;
28+
private double[][] externalBytesRecv;
2929
private int[][] hopCount;
3030

3131
private boolean isCommThd;
3232

3333
public ArrayList<Integer> localHistogram = new ArrayList<Integer>();
3434

3535
/** Construct a file reading thread that will generate data for one PE. */
36-
protected ThreadedFileReader(int pe, int pIdx, long startTime, long endTime, double[][] sentMsgCount, double[][] sentByteCount, double[][] receivedMsgCount, double[][] receivedByteCount, double[][] exclusiveRecv, double[][] exclusiveBytesRecv, int[][] hopCount ){
36+
protected ThreadedFileReader(int pe, int pIdx, long startTime, long endTime, double[][] sentMsgCount, double[][] sentByteCount, double[][] receivedMsgCount, double[][] receivedByteCount, double[][] externalRecv, double[][] externalBytesRecv, int[][] hopCount ){
3737
this.pe = pe;
3838
this.pIdx = pIdx;
3939
this.startTime = startTime;
@@ -43,8 +43,8 @@ protected ThreadedFileReader(int pe, int pIdx, long startTime, long endTime, dou
4343
this.sentByteCount = sentByteCount;
4444
this.receivedMsgCount = receivedMsgCount;
4545
this.receivedByteCount = receivedByteCount;
46-
this.exclusiveRecv = exclusiveRecv;
47-
this.exclusiveBytesRecv = exclusiveBytesRecv;
46+
this.externalRecv = externalRecv;
47+
this.externalBytesRecv = externalBytesRecv;
4848
this.hopCount = hopCount;
4949

5050
StsReader sts = MainWindow.runObject[myRun].getSts();
@@ -70,8 +70,8 @@ public void run() {
7070
sentByteCount[pIdx] = new double[numEPs];
7171
receivedMsgCount[pIdx] = new double[numEPs];
7272
receivedByteCount[pIdx] = new double[numEPs];
73-
exclusiveRecv[pIdx] = new double[numEPs];
74-
exclusiveBytesRecv[pIdx] = new double[numEPs];
73+
externalRecv[pIdx] = new double[numEPs];
74+
externalBytesRecv[pIdx] = new double[numEPs];
7575
if (MainWindow.BLUEGENE) {
7676
hopCount[pIdx] = new int[numEPs];
7777
}
@@ -108,8 +108,8 @@ public void run() {
108108
logdata.msglen;
109109
// testing if the send was from outside the processor
110110
if (logdata.pe != pe) {
111-
exclusiveRecv[pIdx][EPid]++;
112-
exclusiveBytesRecv[pIdx][EPid] +=
111+
externalRecv[pIdx][EPid]++;
112+
externalBytesRecv[pIdx][EPid] +=
113113
logdata.msglen;
114114
if (MainWindow.BLUEGENE) {
115115
hopCount[pIdx][EPid] +=
@@ -146,8 +146,8 @@ public void run() {
146146
sentByteCount[pIdx][ep] /= timeInterval;
147147
receivedMsgCount[pIdx][ep] /= timeInterval;
148148
receivedByteCount[pIdx][ep] /= timeInterval;
149-
exclusiveRecv[pIdx][ep] /= timeInterval;
150-
exclusiveBytesRecv[pIdx][ep] /= timeInterval;
149+
externalRecv[pIdx][ep] /= timeInterval;
150+
externalBytesRecv[pIdx][ep] /= timeInterval;
151151
}
152152
} catch (IOException e) {
153153
System.out.println("Exception: " +e);

0 commit comments

Comments
 (0)