Hi,
It's strange, with same code, when I compiled with Native backend and ran on 3
different machines, only 1 machine worked
MAC OSX 10.5 works (GC Warning: repeated allocation of very large block
(appr. size 18862080): May lead to memory leak and poor performance
MAC OSX 10.7 w/out -O -NO_CHECKS
Uncaught exception at place 0: x10.lang.MultipleExceptions
x10.lang.IllegalArgumentException: Specified range is beyond bounds of
source array
x10.lang.IllegalArgumentException: Specified range is beyond bounds of source
array
at x10::lang::Throwable::fillInStackTrace()
at x10aux::throwException(x10aux::ref<x10::lang::Throwable>)
at void x10::array::Array<void>::copy<signed
char>(x10aux::ref<x10::array::Array<signed char> >, int,
x10aux::ref<x10::array::Array<signed char> >, int, int)
at AES::enc(x10aux::ref<x10::io::File>, int)
at
AES::main(x10aux::ref<x10::array::Array<x10aux::ref<x10::lang::String> > >)
at x10aux::BootStrapClosure::__apply()
at x10::lang::VoidFun_0_0::__apply(x10aux::ref<x10::lang::Reference>)
at x10_lang_Runtime__closure__1::__apply()
at x10::lang::VoidFun_0_0::__apply(x10aux::ref<x10::lang::Reference>)
at x10::lang::Activity::run()
at x10::lang::Runtime__Worker::loop()
at x10::lang::Runtime__Worker::__apply()
at x10::lang::Runtime__Pool::__apply(int)
at x10::lang::Runtime::start(x10aux::ref<x10::lang::VoidFun_0_0>,
x10aux::ref<x10::lang::VoidFun_0_0>)
at int x10aux::template_main<x10::lang::Runtime, AES>(int, char**)
at main
at start
at 0x0
with -O -NO_CHECKS segmentation fault 11
Ubuntu 11.10 with -O -NO_CHECKS segmentation fault 11
same codes that you gave me. Any hints on this?
Thanks
Anh T
On Nov 4, 2011, at 2:46 PM, David P Grove wrote:
> sorry. I grabbed the wrong version to attach before. The only change was to
> use equals instead of == to compare Strings. This is the fixed one. (See
> attached file: AES.x10)
>
> After fixing the string comparision, it ran for me on both backends on
> Linux/x86_64.
>
> --dave
>
>
> <graycol.gif>Anh ---11/04/2011 05:42:49 PM---Hi, I think you attached wrong
> file. there is no changes the attachment. So were you able to run
>
> <ecblank.gif>
> From:
> <ecblank.gif>
> Anh <a...@pacbell.net>
> <ecblank.gif>
> To:
> <ecblank.gif>
> David P Grove/Watson/IBM@IBMUS, "x10-users@lists.sourceforge.net"
> <x10-users@lists.sourceforge.net>,
> <ecblank.gif>
> Date:
> <ecblank.gif>
> 11/04/2011 05:42 PM
> <ecblank.gif>
> Subject:
> <ecblank.gif>
> Re: [X10-users] AES in X10
>
>
>
> Hi,
> I think you attached wrong file. there is no changes the attachment. So
> were you able to run it under Native back-end?
>
> This is what i found out, so running with compiled version of X10 (instead of
> pre-compiled version), this is what I got for output. Native version is way
> longer than Java-backend, and java-version of AES is 21seconds for 18M file.
> I expect Native version would run faster than Java-Backend
> ----------
> odin000960361:Desktop anhtrinh$ x10 AES -e 2 PPSTUFF/zip18mb.zip
> Unable to load x10rt_sockets. Forcing single place execution
> Unable to load x10rt_sockets. Forcing single place execution
> 0
> 1
> 25629 milliseconds
> Done ENC
> odin000960361:Desktop anhtrinh$ ./AES_O_NC -e 2 PPSTUFF/zip18mb.zip
> 1
> 0
> 71156 milliseconds
> GC Warning: Repeated allocation of very large block (appr. size 18862080):
> May lead to memory leak and poor performance.
> Done ENC
> -------------------
>
>
>
>
> Thanks
> Anh
>
> From: David P Grove <gro...@us.ibm.com>
> To: Anh <a...@pacbell.net>
> Sent: Friday, November 4, 2011 11:14 AM
> Subject: Re: [X10-users] AES in X10
>
> A somewhat obscure problem, but a bug in your code.
>
> In the run method you had
>
> if( this.op == "ENC" ){
> this.output = this.encrypt(this.input, this.key.bytes());
> }else if(this.op == "DEC" ){
> this.output = this.decrypt(this.input, this.key.bytes());
> }else{
>
> }
>
> Strings are objects, so this was doing pointer equality. You really should
> do this.op.equals("ENC"). You were getting lucky with the Java backend
> because Java happens to share String objects between literals in the same
> class file. The Native backend doesn't do this.
>
> I changed to equals and it ran. Modified version attached.
>
> --dave
>
>
> <AES.x10>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users