<div dir="ltr"><div>I think the problem is _outB4, which is an undeclared variable. This shouldn't result in a null pointer exception: I'll create a ticket to fix it and produce a more helpful error.<br><br></div>
Tim<br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 7, 2013 at 8:31 PM, Ketan Maheshwari <span dir="ltr"><<a href="mailto:ketancmaheshwari@gmail.com" target="_blank">ketancmaheshwari@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Tim,<br><br></div>I made the change as you suggested but now I am getting java NPE:<br>
<br>$ stc mimo.swift > mimo.tcl<br>STC INTERNAL ERROR<br>Please report this<br>java.lang.NullPointerException<br>
at exm.stc.frontend.ASTWalker.evalAppCmdArgs(ASTWalker.java:2431)<br> at exm.stc.frontend.ASTWalker.genAppFunctionBody(ASTWalker.java:2188)<br> at exm.stc.frontend.ASTWalker.compileAppFunction(ASTWalker.java:2155)<br>
at exm.stc.frontend.ASTWalker.walkTopLevelCompile(ASTWalker.java:327)<br> at exm.stc.frontend.ASTWalker.walkTopLevel(ASTWalker.java:237)<br> at exm.stc.frontend.ASTWalker.walkFile(ASTWalker.java:199)<br> at exm.stc.frontend.ASTWalker.loadModule(ASTWalker.java:385)<br>
at exm.stc.frontend.ASTWalker.walk(ASTWalker.java:168)<br> at exm.stc.ui.STCompiler.compile(STCompiler.java:76)<br> at exm.stc.ui.Main.main(Main.java:93)<br><br></div>The script is as below:<br><br>import files;<br>
import io;<br>import string;<br>import sys;<br><br>app (file _outB1, file _outB2, file _outB3) A (file _inA1, file _inA2, file _inA3){<br> "mimo.sh" @_inA1 @_inA2 @_inA3 @_outB1 @_outB2 @_outB3 @_outB4;<br> }<br>
<br>main{<br><br>file in_a1=input_file("sample.txt");<br>file in_a2=input_file("sample.txt");<br>file in_a3=input_file("sample.txt");<br>file in_a4=input_file("sample.txt");<br><br>
foreach i in [0:1]{<br> string outb1=sprintf("/tmp/swift.work/outb1-%i.dat", i);<br> string outb2=sprintf("/tmp/swift.work/outb2-%i.dat", i);<br> string outb3=sprintf("/tmp/swift.work/outb3-%i.dat", i);<br>
string outb4=sprintf("/tmp/swift.work/outb4-%i.dat", i);<br><br> file o1 <outb1>;<br> file o2 <outb2>;<br> file o3 <outb3>;<br> file o4 <outb4>;<br><br> (o1, o2, o3, o4) = A (in_a1, in_a2, in_a3, in_a4);<br>
<br>}<br>}<br><br></div>Thanks,<br></div>Ketan<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Wed, Aug 7, 2013 at 8:06 PM, Tim Armstrong <span dir="ltr"><<a href="mailto:tim.g.armstrong@gmail.com" target="_blank">tim.g.armstrong@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>You can't declare variables inside a multiple return, you'll have to declare them first, then assign them in a separate statement.<br>
<br>- Tim<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>
On Wed, Aug 7, 2013 at 8:03 PM, Ketan Maheshwari <span dir="ltr"><<a href="mailto:ketancmaheshwari@gmail.com" target="_blank">ketancmaheshwari@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>
<div dir="ltr"><div>Hi,<br><br></div><div>I am writing some benchmark scripts. One of them is SIMO for single input multiple output for which an app looks as follows:<br><br>app (file _outB1, file _outB2, file _outB3, file _outB4) A (file _inA1){<br>
"simo.sh" @_inA1 @_outB1 @_outB2 @_outB3 @_outB4;<br>}<br><br></div><div>Wondering if this is the right way to define multiple outputs to an app?<br><br></div><div>I am getting error message when I call the app in main{} as follows:<br>
<br>(file outb1 <outb1>, file outb2 <outb2>, file outb3 <outb3>, file outb4 <outb4>) = A (in_a);<br><br></div><div>The error is:<br><br>simo.swift l.22:9 mismatched input 'outb1' expecting RPAREN<br>
simo.swift l.22:49 no viable alternative at input 'outb3'<br>simo.swift l.22:82 no viable alternative at input ')'<br>simo.swift l.22:86 mismatched input 'A' expecting GT<br>simo.swift l.24:0 mismatched input '}' expecting EOF<br>
Error occurred during parsing.<br></div><div><div><br></div><div>Thanks for suggestions to fix this.<span><font color="#888888"><br><br></font></span></div><span><font color="#888888"><div>-- <br>
<font face="'courier new', monospace">Ketan</font><br><br>
</div></font></span></div></div>
<br></div></div>_______________________________________________<br>
ExM-user mailing list<br>
<a href="mailto:ExM-user@lists.mcs.anl.gov" target="_blank">ExM-user@lists.mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/exm-user" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/exm-user</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><font face="'courier new', monospace">Ketan</font><br><br>
</font></span></div>
</blockquote></div><br></div>