<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 20 August 2013 21:23, Geoff Levand <span dir="ltr"><<a href="mailto:geoff@infradead.org" target="_blank">geoff@infradead.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Tue, 2013-08-20 at 20:30 +0100, Declan Malone wrote:<br>
> $ ./hello_ppe.elf<br>
> Hello world!<br>
<br>
OK, thanks for testing.<br>
<br>
Please let us know the output from the command 'uname -a'.<br>
<br>
Also, could you try this one?<br>
<br>
<a href="https://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-linux-docs/CellProgrammingTutorial/src/example3_2" target="_blank">https://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-linux-docs/CellProgrammingTutorial/src/example3_2</a><br>
<span class=""><font color="#888888"><br>
-Geoff<br>
<br>
<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Here it is:<br><br></div><div class="gmail_extra">$ uname -a<br>Linux cluster 3.5.0 #1 SMP Mon Jul 23 23:15:07 CEST 2012 ppc64 GNU/Linux<br>$ make<br>gcc -Wall -lspe2 abs_ppe.c -o abs_ppe.elf<br>
/usr/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-linux-gnu/4.6/../../../../lib/libspe2.so when searching for -lspe2<br>/usr/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-linux-gnu/4.6/../../../../lib/libspe2.a when searching for -lspe2<br>
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libspe2.so when searching for -lspe2<br>/usr/bin/ld: skipping incompatible /usr/lib/../lib/libspe2.a when searching for -lspe2<br>/usr/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-linux-gnu/4.6/../../../libspe2.so when searching for -lspe2<br>
/usr/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-linux-gnu/4.6/../../../libspe2.a when searching for -lspe2<br>spu-gcc -Wall abs_spe.c -o abs_spe.elf<br>$ ./abs_ppe.elf <br>out[00]=1<br>out[01]=2<br>out[02]=3<br>
out[03]=4<br>out[04]=5<br>out[05]=6<br>out[06]=7<br>out[07]=8<br>out[08]=9<br>out[09]=10<br>out[10]=11<br>out[11]=12<br>out[12]=13<br>out[13]=14<br>out[14]=15<br>out[15]=16<br>out[16]=17<br>out[17]=18<br>out[18]=19<br>out[19]=20<br>
out[20]=21<br>out[21]=22<br>out[22]=23<br>out[23]=24<br>out[24]=25<br>out[25]=26<br>out[26]=27<br>out[27]=28<br>out[28]=29<br>out[29]=30<br>out[30]=31<br>out[31]=32<br>out[32]=33<br>out[33]=34<br>out[34]=35<br>out[35]=36<br>
out[36]=37<br>out[37]=38<br>out[38]=39<br>out[39]=40<br>out[40]=41<br>out[41]=42<br>out[42]=43<br>out[43]=44<br>out[44]=45<br>out[45]=46<br>out[46]=47<br>out[47]=48<br>out[48]=49<br>out[49]=50<br>out[50]=51<br>out[51]=52<br>
out[52]=53<br>out[53]=54<br>out[54]=55<br>out[55]=56<br>out[56]=57<br>out[57]=58<br>out[58]=59<br>out[59]=60<br>out[60]=61<br>out[61]=62<br>out[62]=63<br>out[63]=64<br>$ ./abs_ppe.elf | perl -nle '$i=$_; /out\[(\d+)\]=(\d+)/; print $i unless $1 +1 == $2'<br>
</div><div class="gmail_extra">(no output... all lines in form out[x]=x+1)<br>$ ./abs_ppe.elf | perl -nle '$i=$_; /out\[(\d+)\]=(\d+)/; print $i unless $2 == $.'<br></div><div class="gmail_extra">(no output,...no gaps in above sequence)<br>
<br></div><div class="gmail_extra">I also tried a much more complex test program that I wrote a while back, and it worked fine. It uses 6 SPEs to calculate a version of Reed-Solomon codes. It uses double-buffered DMA and mailboxes so I figured it might be a useful test:<br>
<br>$ svn checkout svn://<a href="http://svn.code.sf.net/p/gnetraid/code/">svn.code.sf.net/p/gnetraid/code/</a> gnetraid-code<br></div><div class="gmail_extra">$ cd gnetraid-code/PS3-IDA/07-shebang<br></div><div class="gmail_extra">
$ make<br></div><div class="gmail_extra">$ dd if=/dev/urandom of=400Mb bs=1M count=400<br>$ ./<a href="http://rabin-ida-ps3.pl">rabin-ida-ps3.pl</a> split -n 5 -k 3 400Mb # splits file into 5 parts using Rabin's IDA<br>
$ rm 400Mb-0.sf 400Mb-4.sf # delete some "shares"<br>$ ./<a href="http://rabin-ida-ps3.pl">rabin-ida-ps3.pl</a> combine -o output 400Mb-*.sf # reconstruct file using remaining 3 shares<br>$ cmp 400Mb output && echo files match<br>
files match<br><br></div><div class="gmail_extra">That's maybe of no use, but I thought I'd test it anyway, fwiw.<br></div><div class="gmail_extra">Thanks,<br>dec<br></div></div>