[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - dot product

dot product

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

Re: dot product

Postby aihaike » Tue Sep 16, 2014 10:21 pm

I thought this path was relative to where the binaries are located, but it seem to be relative to where you actually execute the code.
Thank you for pointing out.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: dot product

Postby bayalievu » Wed Dec 03, 2014 7:02 am

bayalievu
 
Posts: 1
Joined: Mon Nov 24, 2014 7:15 am

Re: dot product

Postby 9600 » Wed Dec 03, 2014 12:25 pm

Andrew Back
User avatar
9600
 
Posts: 997
Joined: Mon Dec 17, 2012 3:25 am

Re: dot product

Postby Urhixidur » Fri Feb 13, 2015 4:47 pm

User avatar
Urhixidur
 
Posts: 16
Joined: Mon Jan 19, 2015 7:19 pm
Location: Québec, QC, Canada

Re: dot product

Postby Urhixidur » Fri Feb 13, 2015 7:18 pm

User avatar
Urhixidur
 
Posts: 16
Joined: Mon Jan 19, 2015 7:19 pm
Location: Québec, QC, Canada

Re: dot product

Postby smatthews » Wed Jul 08, 2015 1:43 pm

I've updated the dot-product program that generalizes the example to sop of i = 0 .. N-1
This better illustrates how to achieve task-based parallelism on the Epiphany architecture. The new code is now accessible from the repo.

If you modify this example, please recognize that you will need to update RESULT in main.c to correspond with the N that you use in common.h. Currently N=64 and RESULT=85344.
The equation to use is
RESULT = ( N(N-1)(2N-1) )/6

I've run into troubles with N > 1024. Still looking for a way to fix this.

Best,
Suzanne
smatthews
 
Posts: 13
Joined: Fri Mar 13, 2015 7:04 pm

Re: dot product

Postby MiguelTasende » Thu Jul 16, 2015 6:58 pm

Hi Suzanne,

I read your tutorial, and made my own modifications to the dotproduct code... (tried to do so before reading your answers :) ).
I fixed all the bugs almost the same way as you did, and finally could work with a=b=1:2048 (or 0:2047 whatever...), but couldn't solve the 4096 problem.

I still don't quite get it. I am working with "unsigned long" now, instead of "unsigned int". I see that some of the results go beyond what is manageable with 32 bits and I assume there is the problem...
But, I am working with "unsigned long" (host and device side), and Epiphany supports it, so I assume it correctly multiplies two unsigned long. Maybe my lack of C experience with large integers has something to do with it...
Well, the result is clearly less than 2^64, so if all long operations are working ok, I can't see where the problem is...

I'll try to see it later, now I will follow other paths in my "research", but will keep the problem in mind, and if anyone could generously help with a tip... I would be most grateful :)
MiguelTasende
 
Posts: 51
Joined: Tue Jun 30, 2015 12:44 pm

Re: dot product

Postby MiguelTasende » Thu Aug 06, 2015 2:05 pm

Thinking about another problem now I may have an idea of where the problem may be.
It's not the capacity of the single "long", but the amount of them...

4 bytes (at least) per long
2048 longs
-----------------------------------
= 8192 = 8KB = the size of a memory bank

Above that it doesn't work correctly.

I think the problem is with memory management (should look at the linker script to see the memory allocation).
MiguelTasende
 
Posts: 51
Joined: Tue Jun 30, 2015 12:44 pm

Re: dot product

Postby smatthews » Mon Aug 24, 2015 6:45 pm

Hi Miguel,

I think your last post gets to the heart of what I suspect to be the case as well.

The individual memory banks are 8KB. If we exceed the capacity of the memory banks, I believe the answer is to fetch from main memory. However, operations like this on the DMA channel is expensive. I think that one thing this example illustrates is that the Parallella exceeds at pure task parallelism. There are some limitations to data parallelism.

-Suzanne
smatthews
 
Posts: 13
Joined: Fri Mar 13, 2015 7:04 pm

Re: dot product

Postby sebraa » Tue Aug 25, 2015 6:20 pm

sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

PreviousNext

Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 16 guests

cron