Hi,

        The Communication Optimization work was done in for X10 2.0.6.  There
have been quite a few changes in the X10 distributed object model and the
X10 array libraries from X10 2.0.6 to today (X10 2.4.0).    The compiler
pass that implements communication optimization pattern recognition and
does the transformations has not been kept up to date with the
language/library changes.

        If you are interested in helping update it, that would be great!

--dave


Ivan Kulagin <kadet...@gmail.com> wrote on 11/18/2013 12:08:16 AM:

>
> Publication  "Communication Optimizations for Distributed-Memory
X10Programs"
> provides description "Scalar Replacement with Loop-Invariant Code
Motion".
> The code below shows "Scalar Replacement with Loop-Invariant Code
Motion":
>
>
---------------------------------------------------------------------------------------------

>     1 Scalar Replacement with Loop-Invariant Code Motion
>
>     class T ...
>     ...
>     val A = Rail.make[T](r);
> //  region r is a subset of region R
>     for(point i in R) {
>         val idx = f(i) % Places.MAX_PLACE;
>         async (Place.places(idx)) g(A(idx));
>     }
>
---------------------------------------------------------------------------------------------

> (Code is inserted from publication "Communication Optimizations for
> Distributed-Memory X10 Programs")
>
> I wrote sample like above code, it is not optimized:
>
---------------------------------------------------------------------------------------------

> import x10.regionarray.*;
>
> class HelloWorld {
>
>   public static def func(x:Long) {
>     var sum:Long = x;
>   }
>   public static def main(Rail[String]) {
>     val r = Region.make(0..3999);
>     val A = new Rail[Long](r.size(), here.id);
>
> //    var start : Long = System.nanoTime();
> //    finish {
>       for (i:Point in r) {
>         val idx = i(0) % Place.MAX_PLACES;
>         at (Place.place(idx)) async func(A(idx));
>       }
> //    }
> //    var stop : Long = System.nanoTime();
> //    Console.OUT.printf("Size of Rail %d: %g ms\n", r.size(),
> ((stop-start) as Double) / 1e6);
>   }
> }
>
---------------------------------------------------------------------------------------------

> When i compile this program with option
> "OPTIMIZE_COMMUNICATIONS=true", "Scalar Replacement with Loop-
> Invariant Code Motion" was not apply.
>
> Could you answer to me, why didn't apply "Scalar Replacement with
> Loop-Invariant Code Motion"?
>
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to