[Swift-commit] r6171 - branches/faster/src/org/griphyn/vdl/karajan

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Tue Jan 29 02:03:43 CST 2013


Author: hategan
Date: 2013-01-29 02:03:42 -0600 (Tue, 29 Jan 2013)
New Revision: 6171

Removed:
   branches/faster/src/org/griphyn/vdl/karajan/ScalabilityTest.java
Modified:
   branches/faster/src/org/griphyn/vdl/karajan/HangChecker.java
   branches/faster/src/org/griphyn/vdl/karajan/Loader.java
   branches/faster/src/org/griphyn/vdl/karajan/Monitor.java
Log:
initial updates of faster branch

Modified: branches/faster/src/org/griphyn/vdl/karajan/HangChecker.java
===================================================================
--- branches/faster/src/org/griphyn/vdl/karajan/HangChecker.java	2013-01-29 07:31:09 UTC (rev 6170)
+++ branches/faster/src/org/griphyn/vdl/karajan/HangChecker.java	2013-01-29 08:03:42 UTC (rev 6171)
@@ -33,6 +33,7 @@
 
 import k.rt.Context;
 import k.rt.ExecutionException;
+import k.rt.Stack;
 import k.thr.LWThread;
 import k.thr.Scheduler;
 
@@ -42,8 +43,6 @@
 import org.globus.cog.karajan.scheduler.WeightedHostScoreScheduler;
 import org.griphyn.vdl.mapping.DSHandle;
 
-import com.sun.org.apache.xpath.internal.VariableStack;
-
 public class HangChecker extends TimerTask {
     public static final Logger logger = Logger.getLogger(HangChecker.class);
     
@@ -202,7 +201,7 @@
             }
             Object prev = c.getLast();
             for (Object o : c) {
-                if (o instanceof VariableStack) {
+                if (o instanceof Stack) {
                     if (prev != null) {
                         ps.println("\t" + Monitor.varWithLine((DSHandle) prev) + " is needed by: ");
                     }

Modified: branches/faster/src/org/griphyn/vdl/karajan/Loader.java
===================================================================
--- branches/faster/src/org/griphyn/vdl/karajan/Loader.java	2013-01-29 07:31:09 UTC (rev 6170)
+++ branches/faster/src/org/griphyn/vdl/karajan/Loader.java	2013-01-29 08:03:42 UTC (rev 6171)
@@ -47,7 +47,6 @@
 import org.apache.log4j.FileAppender;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
-import org.globus.cog.abstraction.impl.execution.fake.JobSubmissionTaskHandler;
 import org.globus.cog.karajan.compiled.nodes.Main;
 import org.globus.cog.karajan.compiled.nodes.grid.AbstractGridNode;
 import org.globus.cog.karajan.parser.WrapperNode;
@@ -217,7 +216,7 @@
             ec.start(context);
             ec.waitFor();
             long end = System.currentTimeMillis();
-            System.out.println(JobSubmissionTaskHandler.jobsRun + " jobs, " + JobSubmissionTaskHandler.jobsRun * 1000 / (end - start) + " j/s");
+            //System.out.println(JobSubmissionTaskHandler.jobsRun + " jobs, " + JobSubmissionTaskHandler.jobsRun * 1000 / (end - start) + " j/s");
             if (ec.isFailed()) {
                 runerror = true;
             }

Modified: branches/faster/src/org/griphyn/vdl/karajan/Monitor.java
===================================================================
--- branches/faster/src/org/griphyn/vdl/karajan/Monitor.java	2013-01-29 07:31:09 UTC (rev 6170)
+++ branches/faster/src/org/griphyn/vdl/karajan/Monitor.java	2013-01-29 08:03:42 UTC (rev 6171)
@@ -54,6 +54,7 @@
 import k.rt.Future;
 import k.rt.FutureListener;
 import k.rt.FutureValue;
+import k.rt.Stack;
 import k.thr.LWThread;
 
 import org.globus.cog.karajan.analyzer.VariableNotFoundException;
@@ -66,8 +67,6 @@
 import org.griphyn.vdl.mapping.MappingParam;
 import org.griphyn.vdl.mapping.Path;
 
-import com.sun.org.apache.xpath.internal.VariableStack;
-
 public class Monitor implements ActionListener, MouseListener {
 	public static final int VARS = 0;
 	public static final int THREADS = 1;
@@ -469,7 +468,7 @@
 			}
 			else if (crtdisp == THREADS) {
 				Object o = wt.get(row);
-				if (o instanceof VariableStack) {
+				if (o instanceof Stack) {
 					displayPopup("Stack trace for " + t.getValueAt(row, 0), " N/A");
 				}
 			}

Deleted: branches/faster/src/org/griphyn/vdl/karajan/ScalabilityTest.java
===================================================================
--- branches/faster/src/org/griphyn/vdl/karajan/ScalabilityTest.java	2013-01-29 07:31:09 UTC (rev 6170)
+++ branches/faster/src/org/griphyn/vdl/karajan/ScalabilityTest.java	2013-01-29 08:03:42 UTC (rev 6171)
@@ -1,181 +0,0 @@
-/*
- * Copyright 2012 University of Chicago
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-/*
- * Created on Jun 20, 2006
- */
-package org.griphyn.vdl.karajan;
-
-import java.awt.GridLayout;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-
-import org.globus.cog.karajan.Loader;
-import org.globus.cog.karajan.arguments.AbstractWriteOnlyVariableArguments;
-import org.globus.cog.karajan.arguments.VariableArguments;
-import org.globus.cog.karajan.stack.VariableStack;
-import org.globus.cog.karajan.workflow.ElementTree;
-import org.globus.cog.karajan.workflow.ExecutionContext;
-import org.globus.cog.karajan.workflow.ExecutionException;
-import org.globus.cog.karajan.workflow.events.EventListener;
-
-public class ScalabilityTest {
-	private static volatile int jobsSubmitted, jobsFailed, jobsCompleted, workflowsStarted,
-			workflowsFailed, workflowsCompleted;
-
-	private static int sleepTime;
-
-	private static long startTime, endTime;
-
-	public static void main(String[] args) {
-		if (args.length != 3) {
-			System.out.println("Usage: my-name <instanceCount> <jobCount> <jobSleepTime>");
-			System.exit(1);
-		}
-		startTime = System.currentTimeMillis();
-		sleepTime = Integer.parseInt(args[2]);
-		int instanceCount = Integer.parseInt(args[0]);
-		for (int i = 0; i < instanceCount; i++) {
-			try {
-				ElementTree tree = Loader.load("scalability.k");
-				ExecutionContext ec = new ExecutionContext(tree);
-				ec.setStdout(new Stdout());
-				List<String> l = new LinkedList<String>();
-				l.add(args[1]);
-				l.add(args[2]);
-				ec.setArguments(l);
-				ec.addEventListener(new Listener());
-				ec.start();
-				workflowsStarted++;
-			}
-			catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
-		Monitor m = new Monitor();
-		while (workflowsStarted > workflowsCompleted + workflowsFailed) {
-			try {
-				m.update();
-				Thread.sleep(1000);
-			}
-			catch (InterruptedException e) {
-				break;
-			}
-		}
-		m.update();
-		endTime = System.currentTimeMillis();
-		System.out.println("Workflows started: " + workflowsStarted);
-		System.out.println("Workflows completed: " + workflowsCompleted);
-		System.out.println("Workflows failed: " + workflowsFailed);
-		System.out.println("Jobs started: " + jobsSubmitted);
-		System.out.println("Jobs completed: " + jobsCompleted);
-		System.out.println("Jobs failed: " + jobsFailed);
-		System.out.println("Total time: " + (endTime - startTime) / 1000 + "s");
-		System.out.println("Total time excluding sleep time: "
-				+ ((endTime - startTime) / 1000 - sleepTime) + "s");
-	}
-
-	public static class Stdout extends AbstractWriteOnlyVariableArguments {
-		public void merge(VariableArguments args) {
-			appendAll(args.getAll());
-		}
-
-		public void append(Object value) {
-			if (".".equals(value)) {
-				jobsSubmitted++;
-			}
-			else if ("O".equals(value)) {
-				jobsCompleted++;
-			}
-			else if ("-".equals(value)) {
-				jobsFailed++;
-			}
-			System.out.print(value);
-		}
-
-		public void appendAll(List args) {
-			Iterator i = args.iterator();
-			while (i.hasNext()) {
-				append(i.next());
-			}
-		}
-
-		public boolean isCommutative() {
-			return true;
-		}
-	}
-
-	public static class Listener implements EventListener {
-        public void completed(VariableStack stack) throws ExecutionException {
-        	workflowsCompleted++;
-        }
-
-        public void failed(VariableStack stack, ExecutionException e)
-                throws ExecutionException {
-        	workflowsFailed++;
-        }
-	}
-
-	public static class Monitor {
-		private JFrame frame;
-		private JLabel time, js, jf, jc, ws, wf, wc;
-
-		public Monitor() {
-			frame = new JFrame();
-			JPanel p = new JPanel();
-			p.setLayout(new GridLayout(0, 2));
-			p.add(new JLabel("Time: "));
-			p.add(time = new JLabel());
-
-			p.add(new JLabel("Workflows started: "));
-			p.add(ws = new JLabel());
-			p.add(new JLabel("Workflows failed: "));
-			p.add(wf = new JLabel());
-			p.add(new JLabel("Workflows completed: "));
-			p.add(wc = new JLabel());
-
-			p.add(new JLabel("Jobs started: "));
-			p.add(js = new JLabel());
-			p.add(new JLabel("Jobs failed: "));
-			p.add(jf = new JLabel());
-			p.add(new JLabel("Jobs completed: "));
-			p.add(jc = new JLabel());
-
-			frame.getContentPane().add(p);
-			frame.setSize(300, 200);
-			frame.setVisible(true);
-		}
-
-		public void update() {
-			time.setText(String.valueOf((System.currentTimeMillis() - startTime) / 1000) + "s");
-
-			ws.setText(String.valueOf(workflowsStarted));
-			wf.setText(String.valueOf(workflowsFailed));
-			wc.setText(String.valueOf(workflowsCompleted));
-
-			js.setText(String.valueOf(jobsSubmitted));
-			jf.setText(String.valueOf(jobsFailed));
-			jc.setText(String.valueOf(jobsCompleted));
-		}
-	}
-
-}




More information about the Swift-commit mailing list