On Thursday, September 09, 2010 12:29:19 pm Josh Milthorpe wrote:
> Hi Christoph,
>
> this type:
>
> x10::array::DistArray<x10aux::ref<x10::array::Array<double> > >
>
> looks like the type of v_dst and v_src and not of A. This suggests
> that for some reason the evaluations of v_dst(pt) and v_src(pt) are not
> reused between iterations of the for loop. Can you pull them out of the
> loop i.e.
>
> val p:Place = v_src.dist()(pt);
> val dst = v_dst(pt);
> val src = v_src(pt);
> for ( (i,j) in (A|p) ) {
> dst(i) += A(i,j)*src(j);
> }
>
> and report whether this makes a difference?
>
> Cheers,
>
> Josh
Josh,
thanks for pointing that out. It makes a big difference.
$ mpiexec -np 1 ./matmul 500 10 1
****************************************************
* X10 test program for matrix vector multiplication
****************************************************
matrix size = 500
loop count = 10
places = 1
axis for parallelization = 1
The time is 1.162122911000552 s
This narrows the gap to 2.10 orders of magnitude.
The previous hot spot has disappeared.
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
47.37 0.09 0.09
matmul__closure__15::apply()
26.32 0.14 0.05 342 0.15 0.15
x10aux::alloc_internal(unsigned int, bool)
15.79 0.17 0.03 5513626 0.00 0.00
x10::lang::Iterator<x10aux::ref<x10::array::Point>
>::itable<x10::lang::Reference>*
x10aux::findITable<x10::lang::Iterator<x10aux::ref<x10::array::Point> >
>(x10aux::itable_entry*)
5.26 0.18 0.01 250000 0.00 0.00
matmul__closure__1::_getITables()
5.26 0.19 0.01 1 10.00 23.01
x10_array_DistArray__closure__0<double>::apply()
--
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, Christoph Grandpierre,
Klaus Lintelmann, Michael Diemer, Martina Koederitz
Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB
14562 WEEE-Reg.-Nr. DE 99369940
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users