From noreply at svn.ci.uchicago.edu Thu Dec 3 12:03:29 2009
From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu)
Date: Thu, 3 Dec 2009 12:03:29 -0600 (CST)
Subject: [Swift-commit] r3195 - trunk/src/org/griphyn/vdl/mapping/file
Message-ID: <20091203180329.3FF4E9CC95@vm-125-59.ci.uchicago.edu>
Author: wozniak
Date: 2009-12-03 12:03:29 -0600 (Thu, 03 Dec 2009)
New Revision: 3195
Modified:
trunk/src/org/griphyn/vdl/mapping/file/RegularExpressionMapper.java
Log:
Minor error message improvement to regexp_mapper.
Modified: trunk/src/org/griphyn/vdl/mapping/file/RegularExpressionMapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/file/RegularExpressionMapper.java 2009-11-30 20:48:30 UTC (rev 3194)
+++ trunk/src/org/griphyn/vdl/mapping/file/RegularExpressionMapper.java 2009-12-03 18:03:29 UTC (rev 3195)
@@ -60,9 +60,15 @@
Matcher m2 = p2.matcher(transform);
StringBuffer sb = new StringBuffer();
while (m2.find()) {
- String group = m2.group(1);
+ String group = m2.group(1);
int g = Integer.parseInt(group.substring(1));
- m2.appendReplacement(sb, m.group(g));
+ try {
+ m2.appendReplacement(sb, m.group(g));
+ }
+ catch (IndexOutOfBoundsException e)
+ {
+ throw new RuntimeException("regexp_mapper error: No group: \\\\" + g);
+ }
}
m2.appendTail(sb);
return new AbsFile(sb.toString());
From noreply at svn.ci.uchicago.edu Thu Dec 3 14:19:20 2009
From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu)
Date: Thu, 3 Dec 2009 14:19:20 -0600 (CST)
Subject: [Swift-commit] r3196 - in trunk: libexec src/org/griphyn/vdl/engine
src/org/griphyn/vdl/karajan/lib/swiftscript
Message-ID: <20091203201920.6593C9CCAA@vm-125-59.ci.uchicago.edu>
Author: wozniak
Date: 2009-12-03 14:19:20 -0600 (Thu, 03 Dec 2009)
New Revision: 3196
Modified:
trunk/libexec/vdl-lib.xml
trunk/src/org/griphyn/vdl/engine/ProcedureSignature.java
trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java
Log:
New tracef() function. Documented in Misc.java .
Modified: trunk/libexec/vdl-lib.xml
===================================================================
--- trunk/libexec/vdl-lib.xml 2009-12-03 18:03:29 UTC (rev 3195)
+++ trunk/libexec/vdl-lib.xml 2009-12-03 20:19:20 UTC (rev 3196)
@@ -12,6 +12,7 @@
+
Modified: trunk/src/org/griphyn/vdl/engine/ProcedureSignature.java
===================================================================
--- trunk/src/org/griphyn/vdl/engine/ProcedureSignature.java 2009-12-03 18:03:29 UTC (rev 3195)
+++ trunk/src/org/griphyn/vdl/engine/ProcedureSignature.java 2009-12-03 20:19:20 UTC (rev 3196)
@@ -137,6 +137,11 @@
trace.setAnyNumOfInputArgs();
trace.setInvocationMode(INVOCATION_INTERNAL);
proceduresMap.put("trace", trace);
+
+ ProcedureSignature tracef = new ProcedureSignature("tracef");
+ trace.setAnyNumOfInputArgs();
+ trace.setInvocationMode(INVOCATION_INTERNAL);
+ proceduresMap.put("tracef", trace);
ProcedureSignature writeData = new ProcedureSignature("writeData");
FormalArgumentSignature wdInputArg = new FormalArgumentSignature(true);
Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2009-12-03 18:03:29 UTC (rev 3195)
+++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java 2009-12-03 20:19:20 UTC (rev 3196)
@@ -32,6 +32,7 @@
static {
setArguments("swiftscript_trace", new Arg[] { Arg.VARGS });
+ setArguments("swiftscript_tracef", new Arg[] { Arg.VARGS });
setArguments("swiftscript_strcat", new Arg[] { Arg.VARGS });
setArguments("swiftscript_strcut", new Arg[] { PA_INPUT, PA_PATTERN });
setArguments("swiftscript_strsplit", new Arg[] { PA_INPUT, PA_PATTERN });
@@ -57,6 +58,123 @@
return null;
}
+ /**
+ Formatted trace output.
+ Example: tracef("\t%s\n", "hello");
+ Differences from trace(): 1) respects \t, \n and \\;
+ 2) allows for typechecked format specifiers; 3) allows for
+ consumption of variables without display (%k); 4) does not
+ impose any formatting (commas, etc.).
+ Format specifiers:
+ %%: % sign.
+ %p: Not typechecked, output as in trace().
+ %i: Typechecked int output.
+ %s: Typechecked string output.
+ %k: Variable sKipped, no output.
+ */
+ public DSHandle swiftscript_tracef(VariableStack stack) throws ExecutionException, NoSuchTypeException,
+ InvalidPathException {
+
+ DSHandle[] args = SwiftArg.VARGS.asDSHandleArray(stack);
+
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < args.length; i++) {
+ DSHandle handle = args[i];
+ VDLFunction.waitFor(stack, handle);
+ }
+ String msg = format(args);
+ buf.append(msg);
+ traceLogger.warn(buf);
+ return null;
+ }
+
+ /**
+ Helper for {@link #swiftscript_tracef}.
+ */
+ private String format(DSHandle[] args) throws ExecutionException {
+ if (! (args[0].getType() == Types.STRING))
+ throw new ExecutionException("First argument to tracef() must be a string!");
+
+ String spec = args[0].toString();
+ StringBuffer output = new StringBuffer();
+ int i = 0;
+ int a = 1;
+ while (i < spec.length()) {
+ char c = spec.charAt(i);
+ if (c == '%') {
+ char d = spec.charAt(++i);
+ a = append(d, a, args, output);
+ }
+ else if (c == '\\') {
+ char d = spec.charAt(++i);
+ escape(d, output);
+ }
+ else {
+ output.append(c);
+ }
+ i++;
+ }
+ String result = output.toString();
+ return result;
+ }
+
+ /**
+ Helper for {@link #swiftscript_tracef}.
+ */
+ private int append(char c, int arg, DSHandle[] args, StringBuffer output) throws ExecutionException {
+ if (c == '%') {
+ output.append('%');
+ return arg;
+ }
+ if (arg >= args.length) {
+ throw new ExecutionException("tracef(): too many specifiers!");
+ }
+ if (c == 'p') {
+ output.append(args[arg].toString());
+ }
+ else if (c == 's') {
+ if (args[arg].getType() == Types.STRING) {
+ output.append(args[arg]).toString();
+ }
+ else {
+ throw new ExecutionException("tracef(): %s requires a string!");
+ }
+ }
+ else if (c == 'i') {
+ if (args[arg].getType() == Types.INT) {
+ output.append(args[arg]).toString();
+ }
+ else {
+ throw new ExecutionException("tracef(): %i requires an int!");
+ }
+ }
+ else if (c == 'k') {
+ ;
+ }
+ else {
+ throw new ExecutionException("tracef(): Unknown format: %" + c);
+ }
+ return arg+1;
+ }
+
+ /**
+ Helper for {@link #swiftscript_tracef}.
+ */
+ private void escape(char c, StringBuffer output) throws ExecutionException {
+ if (c == '\\') {
+ output.append('\\');
+ }
+ else if (c == 'n') {
+ output.append('\n');
+ }
+ else if (c == 't') {
+ output.append('\t');
+ }
+ else {
+ throw new ExecutionException("tracef(): unknown backslash escape sequence!");
+ }
+ }
+
public DSHandle swiftscript_strcat(VariableStack stack) throws ExecutionException, NoSuchTypeException,
InvalidPathException {
Object[] args = SwiftArg.VARGS.asArray(stack);
From noreply at svn.ci.uchicago.edu Wed Dec 16 19:38:42 2009
From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu)
Date: Wed, 16 Dec 2009 19:38:42 -0600 (CST)
Subject: [Swift-commit] r3197 -
branches/1.0/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui
Message-ID: <20091217013842.B79F99CC7E@vm-125-59.ci.uchicago.edu>
Author: hategan
Date: 2009-12-16 19:38:41 -0600 (Wed, 16 Dec 2009)
New Revision: 3197
Modified:
branches/1.0/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java
Log:
actually scroll tables
Modified: branches/1.0/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java
===================================================================
--- branches/1.0/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java 2009-12-03 20:19:20 UTC (rev 3196)
+++ branches/1.0/src/org/griphyn/vdl/karajan/monitor/monitors/ansi/tui/Table.java 2009-12-17 01:38:41 UTC (rev 3197)
@@ -159,6 +159,12 @@
((TableColumn) c).setSelectedRow(selectedRow);
}
}
+ if (selectedRow < firstRow) {
+ firstRow = Math.min(selectedRow - height + 4, 0);
+ }
+ if (selectedRow > firstRow + height - 4) {
+ firstRow = selectedRow;
+ }
redraw();
}
}
From noreply at svn.ci.uchicago.edu Thu Dec 17 13:16:04 2009
From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu)
Date: Thu, 17 Dec 2009 13:16:04 -0600 (CST)
Subject: [Swift-commit] r3198 - trunk/libexec
Message-ID: <20091217191604.2A7769CC9A@vm-125-59.ci.uchicago.edu>
Author: wozniak
Date: 2009-12-17 13:16:03 -0600 (Thu, 17 Dec 2009)
New Revision: 3198
Modified:
trunk/libexec/scheduler.xml
Log:
Crash if user-supplied file does not exist.
Modified: trunk/libexec/scheduler.xml
===================================================================
--- trunk/libexec/scheduler.xml 2009-12-17 01:38:41 UTC (rev 3197)
+++ trunk/libexec/scheduler.xml 2009-12-17 19:16:03 UTC (rev 3198)
@@ -21,6 +21,15 @@
Using sites file: {sites}
+
+
+
+
+
+ Could not find sites file: {sites}
+
+
+
Using tc.data: {tcfile}
From noreply at svn.ci.uchicago.edu Thu Dec 17 13:52:18 2009
From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu)
Date: Thu, 17 Dec 2009 13:52:18 -0600 (CST)
Subject: [Swift-commit] r3199 - trunk/libexec
Message-ID: <20091217195218.36F869CC9A@vm-125-59.ci.uchicago.edu>
Author: wozniak
Date: 2009-12-17 13:52:18 -0600 (Thu, 17 Dec 2009)
New Revision: 3199
Modified:
trunk/libexec/scheduler.xml
Log:
More appropriate use of generateError.
Modified: trunk/libexec/scheduler.xml
===================================================================
--- trunk/libexec/scheduler.xml 2009-12-17 19:16:03 UTC (rev 3198)
+++ trunk/libexec/scheduler.xml 2009-12-17 19:52:18 UTC (rev 3199)
@@ -25,9 +25,9 @@
-
+
Could not find sites file: {sites}
-
+
Using tc.data: {tcfile}
From noreply at svn.ci.uchicago.edu Thu Dec 17 14:31:27 2009
From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu)
Date: Thu, 17 Dec 2009 14:31:27 -0600 (CST)
Subject: [Swift-commit] r3200 - trunk/libexec
Message-ID: <20091217203128.001E69CC9A@vm-125-59.ci.uchicago.edu>
Author: wozniak
Date: 2009-12-17 14:31:27 -0600 (Thu, 17 Dec 2009)
New Revision: 3200
Modified:
trunk/libexec/vdl-int.k
Log:
Report executable bit problem to user.
Modified: trunk/libexec/vdl-int.k
===================================================================
--- trunk/libexec/vdl-int.k 2009-12-17 19:52:18 UTC (rev 3199)
+++ trunk/libexec/vdl-int.k 2009-12-17 20:31:27 UTC (rev 3200)
@@ -550,6 +550,10 @@
catch("^(?!Abort$).*"
vdl:setprogress("Failed but can retry")
log(LOG:DEBUG, "APPLICATION_EXCEPTION jobid={jobid} - Application exception: ", exception)
+ if(matches(exception,".*executable bit.*")
+ generateError(exception)
+ )
+
vdl:cacheUnlockFiles(stagein, sharedDir, rhost, force=false
cleanupFiles(cacheFilesToRemove, rhost)
)