Ishii-san,

I have just committed a fix to support reduce/allreduce over user-defined
struct types (r28605).  The struct type must implement the appropriate
interface e.g. Arithmetic[T] for Team.ADD as in your example.  This should
allow you to use GLBResult with a user-defined struct type.

Are you able to update to SVN HEAD, or else merge the changes from r28605,
to confirm this fix?

Kind regards,

Josh



From:   Daisuke ISHII <dsk.is...@gmail.com>
To:     Mailing list for users of the X10 programming language
            <x10-users@lists.sourceforge.net>
Date:   20/11/2014 22:34
Subject:        Re: [X10-users] GLBResult



Dear Dave,

Thank you for your explanation of the implementation.
I quickly tried with X10 2.5 but I got the same errors.
I will look into the implementation as you suggested.

Best regards,

--
Daisuke ISHII


2014-11-20 21:59 GMT+09:00 David P Grove <gro...@us.ibm.com>:
> Daisuke ISHII <dsk.is...@gmail.com> wrote on 11/20/2014 04:10:59 AM:
>>
>> I am using the GLB library in X10 2.4.3.2.
>> I wonder if there is a way to wrap a user-defined class or struct with
>> GLBResult.
>> When I implemented something like
>>     public class MyResult extends GLBResult[MyData] { ... }
>> where MyData is a struct that implements Arithmetic[MyData], I got
>> errors in compilation as follows:
>>
> <...C++ compilation error elided....>
>
> Hi,
>
> Internally GLB uses x10.util.Team.allreduce to collect up the
intermediate
> results and get to a final answer.
>
> In X10 2.4.3 when running using x10rt_sockets, we default to an
> implementation of all-reduce written in C that only understands how to
> manipulate built-in struct types (the typical types that an MPI allreduce
> would also know how to handle: ints of various sizes, floats, doubles,
> complex, boolean).
>
> In X10 2.5 and later with x10rt_sockets, we no longer default to the C
> implementation of Team.allreduce.  We instead use an X10-level emulated
> collective operations.
>
> I'm not sure if it will actually work with a user-defined struct yet (Ben
&
> Josh, your thoughts?), but it in principle could be made to work.
>
> The alternative fix (and probably the only thing to do in X10 2.4.3) is
to
> go into the x10.glb implementation and to replace the uses of
Team.allreduce
> with the equivalent X10 code snippets that implement reduction via
> at/finish/async or a collecting finish in vanilla X10.  It won't scale as
> well, but at moderate scale is probably ok and should be able to handle
> user-defined structs.
>
> Hope this helps,
>
> --dave
>
>
>
------------------------------------------------------------------------------

> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk

> _______________________________________________
> X10-users mailing list
> X10-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x10-users
>

------------------------------------------------------------------------------

Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk

_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&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