From 008c1adec133c19764ae1e7a26d986638fd57e3f Mon Sep 17 00:00:00 2001 From: dhruvr4 <55036273+dhruvr4@users.noreply.github.com> Date: Mon, 23 Aug 2021 00:44:32 -0500 Subject: [PATCH 1/8] Update MainMenuManager.java --- src/projections/gui/MainMenuManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/projections/gui/MainMenuManager.java b/src/projections/gui/MainMenuManager.java index 78b10f00..d7a8d69e 100644 --- a/src/projections/gui/MainMenuManager.java +++ b/src/projections/gui/MainMenuManager.java @@ -150,8 +150,8 @@ private void stateChanged(int state, int sumDetail) { //renderedTimelinesMenuItem.setEnabled(false); timelinesMenuItem.setEnabled(false); usageProfileMenuItem.setEnabled(true); - communicationMenuItem.setEnabled(false); - communicationVsTimeMenuItem.setEnabled(false); + communicationMenuItem.setEnabled(true); + communicationVsTimeMenuItem.setEnabled(true); callTableMenuItem.setEnabled(false); viewLogFilesMenuItem.setEnabled(false); histogramsMenuItem.setEnabled(false); From 85cceaeb60bc9b86fb4b9b5c10797054487aeda6 Mon Sep 17 00:00:00 2001 From: dhruvr4 <55036273+dhruvr4@users.noreply.github.com> Date: Mon, 23 Aug 2021 00:46:50 -0500 Subject: [PATCH 2/8] Update SumDetailReader.java --- src/projections/analysis/SumDetailReader.java | 206 +++++++++++++++++- 1 file changed, 205 insertions(+), 1 deletion(-) diff --git a/src/projections/analysis/SumDetailReader.java b/src/projections/analysis/SumDetailReader.java index fb06f532..77beb789 100644 --- a/src/projections/analysis/SumDetailReader.java +++ b/src/projections/analysis/SumDetailReader.java @@ -41,6 +41,12 @@ class SumDetailReader extends ProjectionsReader private int numIntervals; private int numEPs; private long intervalSize; + 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; // Compressed Data // A Vector of RLEBlocks for each Type, EP combination @@ -165,7 +171,177 @@ protected void read() buildTable(TOTAL_TIME); } else if (label.equals("EPCallTimePerInterval")) { buildTable(NUM_MSGS); - } else { + } else if (label.equals("MsgSentCount")) { + msg_count= new double[numEPs*numIntervals]; + int nUsageRead=0; + + while (StreamTokenizer.TT_EOL!=tokenizer.nextToken()) { + if(tokenizer.ttype==StreamTokenizer.TT_NUMBER){ + int value = (int)tokenizer.nval; + int count = 1; + + if (StreamTokenizer.TT_WORD==tokenizer.nextToken()) { + String temp = tokenizer.sval; + if (temp.startsWith("+")) { + count = Integer.parseInt(temp.substring(1)); + } + } else { + tokenizer.pushBack(); + } + if(nUsageRead==msg_count.length){ + continue; + } + for (int i=0; i[] getData(int type) { return rawData[type]; } + 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; + } + } From 198d82a39bb05fb78d83079b5b72a19279ff7111 Mon Sep 17 00:00:00 2001 From: dhruvr4 <55036273+dhruvr4@users.noreply.github.com> Date: Mon, 23 Aug 2021 00:48:49 -0500 Subject: [PATCH 3/8] Update IntervalData.java --- src/projections/analysis/IntervalData.java | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/projections/analysis/IntervalData.java b/src/projections/analysis/IntervalData.java index 8d230f99..06907734 100644 --- a/src/projections/analysis/IntervalData.java +++ b/src/projections/analysis/IntervalData.java @@ -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; 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 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; + } + // /** // * Accumulate compressed interval data for a particular EP and type onto From fca61053ed275b6af19f032fb39a9a37937b0a57 Mon Sep 17 00:00:00 2001 From: dhruvr4 <55036273+dhruvr4@users.noreply.github.com> Date: Mon, 23 Aug 2021 00:49:37 -0500 Subject: [PATCH 4/8] Update Analysis.java --- src/projections/analysis/Analysis.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/projections/analysis/Analysis.java b/src/projections/analysis/Analysis.java index f71a4b81..fa053bcc 100644 --- a/src/projections/analysis/Analysis.java +++ b/src/projections/analysis/Analysis.java @@ -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(); + } public int[][] getSumDetailData_interval_EP() { return intervalData.getSumDetailData_interval_EP(); From 0c66e5b7695cea0422a19fe3743d38b45f7f1d35 Mon Sep 17 00:00:00 2001 From: dhruvr4 <55036273+dhruvr4@users.noreply.github.com> Date: Mon, 23 Aug 2021 00:51:11 -0500 Subject: [PATCH 5/8] Update CommWindow.java --- .../Tools/CommunicationPerPE/CommWindow.java | 71 ++++++++++--------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/src/projections/Tools/CommunicationPerPE/CommWindow.java b/src/projections/Tools/CommunicationPerPE/CommWindow.java index f4d9f100..63313ca3 100644 --- a/src/projections/Tools/CommunicationPerPE/CommWindow.java +++ b/src/projections/Tools/CommunicationPerPE/CommWindow.java @@ -473,40 +473,45 @@ private void getData(long startTime, long endTime, SortedSet pes){ histogram = new ArrayList(); - // Create a list of worker threads - LinkedList readyReaders = new LinkedList(); - int pIdx = 0; - for(Integer nextPe : pes){ - readyReaders.add(new ThreadedFileReader(nextPe, pIdx, startTime, endTime, - sentMsgCount, sentByteCount, - receivedMsgCount, receivedByteCount, - externalRecv, externalBytesRecv, - externalNodeRecv, externalNodeBytesRecv, - hopCount)); - pIdx++; - } - - // 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(); - - - // Combine histograms from all processors - - Iterator iter = readyReaders.iterator(); - while(iter.hasNext()){ - ThreadedFileReader t = (ThreadedFileReader) iter.next(); - histogram.addAll(t.localHistogram); + if (MainWindow.runObject[myRun].hasLogData()) { + // Create a list of worker threads + LinkedList readyReaders = new LinkedList(); + int pIdx = 0; + for(Integer nextPe : pes){ + readyReaders.add( new ThreadedFileReader(nextPe, pIdx, startTime, endTime, sentMsgCount, sentByteCount, receivedMsgCount, receivedByteCount, exclusiveRecv, exclusiveBytesRecv, hopCount ) ); + pIdx++; + } + + // 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(); + + + // Combine histograms from all processors + + Iterator iter = readyReaders.iterator(); + while(iter.hasNext()){ + ThreadedFileReader t = (ThreadedFileReader) iter.next(); + histogram.addAll(t.localHistogram); + } + + } else{ + sentMsgCount = MainWindow.runObject[myRun].getMsg_count(); + sentByteCount = MainWindow.runObject[myRun].getMsg_size(); + receivedMsgCount = MainWindow.runObject[myRun].getMsg_recv_count(); + receivedByteCount = MainWindow.runObject[myRun].getMsg_recv_size(); + exclusiveRecv = MainWindow.runObject[myRun].getMsg_recv_count_ext(); + exclusiveBytesRecv = MainWindow.runObject[myRun].getMsg_recv_size_ext(); } - + // Do some post processing // **CW** Highly inefficient ... needs to be re-written as a From e6399cb8f4db71570711a0daed24b76c0633f60b Mon Sep 17 00:00:00 2001 From: dhruvr4 <55036273+dhruvr4@users.noreply.github.com> Date: Mon, 23 Aug 2021 00:52:23 -0500 Subject: [PATCH 6/8] Update CommTimeWindow.java --- .../CommunicationOverTime/CommTimeWindow.java | 140 ++++++++++++------ 1 file changed, 97 insertions(+), 43 deletions(-) diff --git a/src/projections/Tools/CommunicationOverTime/CommTimeWindow.java b/src/projections/Tools/CommunicationOverTime/CommTimeWindow.java index 2e1aaa4d..4138f96c 100644 --- a/src/projections/Tools/CommunicationOverTime/CommTimeWindow.java +++ b/src/projections/Tools/CommunicationOverTime/CommTimeWindow.java @@ -350,59 +350,113 @@ public void showDialog() { numIntervals = endInterval-startInterval+1; processorList = new TreeSet(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 readyReaders = new LinkedList(); - 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 readyReaders = new LinkedList(); + 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 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 Date: Mon, 23 Aug 2021 00:58:41 -0500 Subject: [PATCH 7/8] Update CommWindow.java --- src/projections/Tools/CommunicationPerPE/CommWindow.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/projections/Tools/CommunicationPerPE/CommWindow.java b/src/projections/Tools/CommunicationPerPE/CommWindow.java index 63313ca3..a8b195c6 100644 --- a/src/projections/Tools/CommunicationPerPE/CommWindow.java +++ b/src/projections/Tools/CommunicationPerPE/CommWindow.java @@ -478,7 +478,7 @@ private void getData(long startTime, long endTime, SortedSet pes){ LinkedList readyReaders = new LinkedList(); int pIdx = 0; for(Integer nextPe : pes){ - readyReaders.add( new ThreadedFileReader(nextPe, pIdx, startTime, endTime, sentMsgCount, sentByteCount, receivedMsgCount, receivedByteCount, exclusiveRecv, exclusiveBytesRecv, hopCount ) ); + readyReaders.add( new ThreadedFileReader(nextPe, pIdx, startTime, endTime, sentMsgCount, sentByteCount, receivedMsgCount, receivedByteCount, externalRecv, externalBytesRecv, hopCount ) ); pIdx++; } @@ -508,8 +508,8 @@ private void getData(long startTime, long endTime, SortedSet pes){ sentByteCount = MainWindow.runObject[myRun].getMsg_size(); receivedMsgCount = MainWindow.runObject[myRun].getMsg_recv_count(); receivedByteCount = MainWindow.runObject[myRun].getMsg_recv_size(); - exclusiveRecv = MainWindow.runObject[myRun].getMsg_recv_count_ext(); - exclusiveBytesRecv = MainWindow.runObject[myRun].getMsg_recv_size_ext(); + externalRecv = MainWindow.runObject[myRun].getMsg_recv_count_ext(); + externalBytesRecv = MainWindow.runObject[myRun].getMsg_recv_size_ext(); } // Do some post processing From 8c6f16b904632a48d16e0056adc7387f43aa77a2 Mon Sep 17 00:00:00 2001 From: dhruvr4 <55036273+dhruvr4@users.noreply.github.com> Date: Mon, 23 Aug 2021 01:02:45 -0500 Subject: [PATCH 8/8] Update CommWindow.java --- src/projections/Tools/CommunicationPerPE/CommWindow.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/projections/Tools/CommunicationPerPE/CommWindow.java b/src/projections/Tools/CommunicationPerPE/CommWindow.java index a8b195c6..c09fdf28 100644 --- a/src/projections/Tools/CommunicationPerPE/CommWindow.java +++ b/src/projections/Tools/CommunicationPerPE/CommWindow.java @@ -478,7 +478,7 @@ private void getData(long startTime, long endTime, SortedSet pes){ LinkedList readyReaders = new LinkedList(); int pIdx = 0; for(Integer nextPe : pes){ - readyReaders.add( new ThreadedFileReader(nextPe, pIdx, startTime, endTime, sentMsgCount, sentByteCount, receivedMsgCount, receivedByteCount, externalRecv, externalBytesRecv, hopCount ) ); + readyReaders.add( new ThreadedFileReader(nextPe, pIdx, startTime, endTime, sentMsgCount, sentByteCount, receivedMsgCount, receivedByteCount, externalRecv, externalBytesRecv,externalNodeRecv,externalNodeBytesRecv, hopCount ) ); pIdx++; } @@ -510,6 +510,8 @@ private void getData(long startTime, long endTime, SortedSet pes){ receivedByteCount = MainWindow.runObject[myRun].getMsg_recv_size(); externalRecv = MainWindow.runObject[myRun].getMsg_recv_count_ext(); externalBytesRecv = MainWindow.runObject[myRun].getMsg_recv_size_ext(); + externalNodeRecv=MainWindow.runObject[myRun].getMsg_recv_count_ext(); + externalNodeBytesRecv= MainWindow.runObject[myRun].getMsg_recv_size_ext(); } // Do some post processing