On Tuesday, January 04, 2011 06:07:20 pm Igor Peshansky wrote:
> I would look for hints in the following part of the message:
>
> init: (a1:x10.array.Point{self.rank==reg.rank})=>
> x10.array.RemoteArray
>
> You are passing in a closure of type (Point)=>RemoteArray, and the
> constructor expects a closure of type
> (Point{rank==Dv_tmp.region().rank})=>RemoteArray .
> Of course, the type system cannot express the above constraint directly,
> so you would have to write the code in the following manner:
>
> [...]
> val r_tmp = Dv_tmp.region();
> v_loc = new Array[Array1D](r_tmp,
> (r:Point(r_tmp.rank))=>
> (new Array[Double](0..(n-1), (0.0 as Double))) );
> r_loc = new Array[RemoteArray](r_tmp,
> (r:Point(r_tmp.rank)) => (new RemoteArray(v_loc(r))) );
> [...]
>
> or, if Dv_tmp is statically known to be of rank 1, you can also write:
>
> [...]
> v_loc = new Array[Array1D](Dv_tmp.region(),
> (r:Point(1))=>(new Array[Double](0..(n-1), (0.0 as Double)))
> );
> r_loc = new Array[RemoteArray](Dv_tmp.region(),
> (r:Point(1)) => (new RemoteArray(v_loc(r))) );
> [...]
>
> Hope this helps,
> Igor
Igor,
I tried the first option, and the error message changed to the following.
/home/cp/xample/MatMul/mm_X10/src/matmul.x10:93-94: Constructor this(reg:
x10.array.Region, init: (a1:x10.array.Point{self.rank==reg.rank})=>
x10.array.RemoteArray): x10.array.Array[x10.array.RemoteArray]
{self.region==reg}
cannot be invoked with arguments
(x10.array.Region{self==r_tmp, Dv_tmp.region==r_tmp}, <anonymous class>).
Any suggestion on how to proceed ?
BTW, Dv_tmp is defined as follows.
// Finally, we set up a distribution
// with one point per place
val Dv_tmp:Dist = Dist.makeUnique(D.places());
val r_tmp = Dv_tmp.region();
So, I know that it has rank 1. How can I make that known to the compiler ?
Once that is accomplished, I can try your second suggestion.
--
Mit freundlichen Grüßen / Kind regards
Dr. Christoph Pospiech
High Performance & Parallel Computing
Phone: +49-351 86269826
Mobile: +49-171-765 5871
E-Mail: [email protected]
-------------------------------------
IBM Deutschland GmbH
Vorsitzender des Aufsichtsrats: Erich Clementi
Geschäftsführung: Martin Jetter (Vorsitzender),
Reinhard Reschke, Dieter Scholz,
Gregor Pillen, Michael Diemer, Martina Koederitz
Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB
14562 WEEE-Reg.-Nr. DE 99369940
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users