<div dir="ltr"><div>There's a bug in one of our library functions. Thanks for reporting. I've fixed it in the repository so it'll get into the next point release. If you want to quickly patch your version as a workaround, you can edit line 535 of turbine/lib/files.tcl in the Swift/T source as below, then run "make install" to install the fixed version of the file.<br><br>- proc blob_read_body { result input } {<br>+ proc blob_read_body { result src } {<br> <br></div>- Tim<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 23, 2014 at 9:47 AM, Ozik, Jonathan <span dir="ltr"><<a href="mailto:jozik@anl.gov" target="_blank">jozik@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I’m attempting the blob example (<a href="http://swift-lang.org/Swift-T/leaf.html#_complete_example_3_c_function_with_binary_data" target="_blank">http://swift-lang.org/Swift-T/leaf.html#_complete_example_3_c_function_with_binary_data</a>) and am seeing this error:<br>
<br>
>> turbine test-b-simple.tcl<br>
0.000 MODE: SERVER<br>
0.000 MODE: WORKER<br>
0.000 WORKERS: 2 RANKS: 0 - 1<br>
0.000 SERVERS: 1 RANKS: 2 - 2<br>
0.000 MODE: WORKER<br>
0.001 function:swift:constants<br>
0.001 function:swift:constants<br>
0.001 enter function: main<br>
0.002 allocated u:b=<1> u:v=<2><br>
0.002 allocated file: u:data=<3><br>
0.002 store: <3>=path input.data<br>
CAUGHT ERROR:<br>
can't read "src": no such variable<br>
while executing<br>
"retrieve_decr_file $src "<br>
(procedure "blob_read_body" line 2)<br>
invoked from within<br>
"blob_read_body 1 {file 3 is_mapped 0}"<br>
Turbine worker task error in: blob_read_body 1 {file 3 is_mapped 0}<br>
invoked from within<br>
"c::worker_loop $WORK_TYPE(WORK)"<br>
(procedure "worker" line 28)<br>
invoked from within<br>
"worker $rules $startup_cmd"<br>
(procedure "enter_mode_unchecked" line 5)<br>
invoked from within<br>
"enter_mode_unchecked $rules $startup_cmd"<br>
(procedure "enter_mode" line 5)<br>
invoked from within<br>
"enter_mode $rules $startup_cmd "<br>
CALLING adlb::abort<br>
ADLB_Abort(1)<br>
MPI_Abort(1)<br>
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0<br>
<br>
It appears that this is being triggered by the line:<br>
printf("size(v) = %i", size(v));<br>
<br>
Any thoughts on what might be going on?<br>
<br>
I’m testing this on a Mac OS X setup.<br>
<span class="HOEnZb"><font color="#888888"><br>
Jonathan<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sep 22, 2014, at 10:20 PM, Ozik, Jonathan <<a href="mailto:jozik@anl.gov">jozik@anl.gov</a>> wrote:<br>
<br>
> Thank you Justin. That should work great.<br>
><br>
> Jonathan<br>
><br>
> On Sep 22, 2014, at 8:05 PM, Justin M Wozniak <<a href="mailto:wozniak@mcs.anl.gov">wozniak@mcs.anl.gov</a>> wrote:<br>
><br>
>> Hi<br>
>> You can do this based on the instructions for C binary data:<br>
>><br>
>> <a href="http://swift-lang.org/Swift-T/leaf.html#_complete_example_3_c_function_with_binary_data" target="_blank">http://swift-lang.org/Swift-T/leaf.html#_complete_example_3_c_function_with_binary_data</a><br>
>><br>
>> The Swift blob is a void* - you can cast to whatever you want. You can cast it to a double* that is actually a 2D array (following BLAS conventions).<br>
>><br>
>> Justin<br>
>><br>
>> On 9/22/2014 6:32 PM, Ozik, Jonathan wrote:<br>
>>> Hello all,<br>
>>><br>
>>> I’m curious about how people generally go about passing (and returning) two (or n-) dimensional arrays to leaf functions. Are there simple examples using SWIG and Tcl? Or are file based approaches used via app fuctions?<br>
>>><br>
>>> Any thoughts would be appreciated,<br>
>>><br>
>>> Jonathan<br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> ExM-user mailing list<br>
>>> <a href="mailto:ExM-user@lists.mcs.anl.gov">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>
>> --<br>
>> Justin M Wozniak<br>
>><br>
><br>
> _______________________________________________<br>
> ExM-user mailing list<br>
> <a href="mailto:ExM-user@lists.mcs.anl.gov">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>
_______________________________________________<br>
ExM-user mailing list<br>
<a href="mailto:ExM-user@lists.mcs.anl.gov">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>
</div></div></blockquote></div><br></div>