[Swift-user] execution error

Michael Wilde wilde at mcs.anl.gov
Fri Mar 16 17:10:49 CDT 2012


Hi Sheri,

This is a Swift bug (not seen before to my knowledge). Your script trips into it in these lines starting at line 275:

string monHSIfiles[] = readData(monHSIFileList);
...
string datapath;
if (monHSIfiles[1] == " "){
  datapath = msroot;
} else {
  datapath = wrkdir;
}

I suspect that in your test case, monHSIFileList has less than 2 lines in it. The array monHSIfiles is "closed", I think, because its returned from readData(). But element [1] of the array doesn't exist. Did you mean to test element[0] for being equal to " "?  Does monHSIFileList get set with an end-of-filelist sentinel of " "?

I think if you work through the intent here, you can avoid testing an element that doesnt exist.

How Swift *should* behave here needs to be discussed and defined precisely in the User Guide and implementation.

- Mike

ps.

Here's the test that reproduces it:

$ cat 1filename 
foo
$ cat 2filenames 
foo
bar
$ cat b1.swift
string fnames[] = readData(@arg("flist"));

if (fnames[1] == " "){
  trace("blank");
} else {
  trace("nonblank");
}

$ swift b1.swift -flist=2filenames
no sites file specified, setting to default: /Users/wilde/swift/src/trunk/cog/modules/swift/dist/swift-svn/etc/sites.xml
Swift trunk swift-r5690 cog-r3361

RunID: 20120316-1700-f7ev3njf
Progress:  time: Fri, 16 Mar 2012 17:00:50 -0500
SwiftScript trace: nonblank
Final status: Fri, 16 Mar 2012 17:00:50 -0500
$ swift b1.swift -flist=1filename
no sites file specified, setting to default: /Users/wilde/swift/src/trunk/cog/modules/swift/dist/swift-svn/etc/sites.xml
Swift trunk swift-r5690 cog-r3361

RunID: 20120316-1700-1xah6tge
Progress:  time: Fri, 16 Mar 2012 17:00:57 -0500
Execution failed:
	First operand is null
$ 


----- Original Message -----
> From: "Sheri Mickelson" <mickelso at mcs.anl.gov>
> To: "Michael Wilde" <wilde at mcs.anl.gov>
> Cc: swift-user at ci.uchicago.edu
> Sent: Friday, March 16, 2012 2:35:34 PM
> Subject: Re: [Swift-user] execution error
> Hi Mike,
> 
> Here's a copy of the log file. It happens consistently with the same
> settings.
> 
> Thanks, Sheri
> 
> 
> 
> 
> 
> On Mar 16, 2012, at 2:21 PM, Michael Wilde wrote:
> 
> > Hi Sheri,
> >
> > Can you point us to the entire log file?
> >
> > Does it happen repeatedly? Same script, same point? Or sporadically?
> >
> > Thanks,
> >
> > - Mike
> >
> > ----- Original Message -----
> >> From: "Sheri Mickelson" <mickelso at mcs.anl.gov>
> >> To: swift-user at ci.uchicago.edu
> >> Sent: Friday, March 16, 2012 1:05:12 PM
> >> Subject: [Swift-user] execution error
> >> Hi,
> >>
> >> I'm seeing this error message when I'm trying to execute a Swift
> >> script:
> >>
> >> Execution failed:
> >> First operand is null
> >>
> >> Here's the information from the log file:
> >>
> >> 2012-03-16 11:54:58,725-0600 DEBUG VDL2ExecutionContext First
> >> operand
> >> is null
> >> First operand is null
> >>
> >> at
> >> org.griphyn.vdl.karajan.lib.Operators.vdlop_eq(Operators.java:181)
> >> at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
> >> at
> >> sun
> >> .reflect
> >> .DelegatingMethodAccessorImpl
> >> .invoke(DelegatingMethodAccessorImpl.java:
> >> 43)
> >> at java.lang.reflect.Method.invoke(Method.java:616)
> >> at
> >> org
> >> .globus
> >> .cog
> >> .karajan
> >> .workflow
> >> .nodes
> >> .functions.FunctionsCollection.function(FunctionsCollection.java:
> >> 82)
> >> at
> >> org
> >> .globus
> >> .cog
> >> .karajan
> >> .workflow
> >> .nodes.functions.AbstractFunction.post(AbstractFunction.java:
> >> 27)
> >> at
> >> org
> >> .globus
> >> .cog
> >> .karajan
> >> .workflow
> >> .nodes
> >> .AbstractSequentialWithArguments
> >> .futureModified(AbstractSequentialWithArguments.java:208)
> >> at org.griphyn.vdl.karajan.DSHandleFutureWrapper
> >> $1.run(DSHandleFutureWrapper.java:63)
> >> at java.util.concurrent.Executors
> >> $RunnableAdapter.call(Executors.java:
> >> 471)
> >> at
> >> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> >> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> >> at
> >> java
> >> .util
> >> .concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
> >> 1110)
> >> at java.util.concurrent.ThreadPoolExecutor
> >> $Worker.run(ThreadPoolExecutor.java:603)
> >> at java.lang.Thread.run(Thread.java:636)
> >>
> >>
> >> I'm having trouble finding the bug in my Swift code. What type of
> >> error usually causes this message?
> >>
> >> Thanks, Sheri
> >> _______________________________________________
> >> Swift-user mailing list
> >> Swift-user at ci.uchicago.edu
> >> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user
> >
> > --
> > Michael Wilde
> > Computation Institute, University of Chicago
> > Mathematics and Computer Science Division
> > Argonne National Laboratory
> >

-- 
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory




More information about the Swift-user mailing list