[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 - problem with the executed time

problem with the executed time

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

problem with the executed time

Postby Anthony » Tue Jun 09, 2015 8:14 am

Anthony
 
Posts: 16
Joined: Thu May 28, 2015 7:59 am

Re: problem with the executed time

Postby sebraa » Tue Jun 09, 2015 5:09 pm

You do not measure the time to run your program on the Epiphany.
Instead, you measure the time it takes to copy your program into the Epiphany. Of course, copying the code into 16 cores takes about 16x as long as copying it to one core only, since there is 16x as much data to copy. :-)

You cannot measure the Epiphany execution time on the host directly; usually, you keep a flag in shared memory which you poll in a loop. Then you measure the time from after the e_load_group() until this flag is set by your core.
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: problem with the executed time

Postby Anthony » Wed Jun 10, 2015 8:21 am

Anthony
 
Posts: 16
Joined: Thu May 28, 2015 7:59 am

Re: problem with the executed time

Postby sebraa » Thu Jun 11, 2015 3:33 pm

Accessing the Epiphany memory from the host or shared memory from the eCores is an access through the eLink. If you poll by reading Epiphany memory, you waste a lot of bandwidth on the eLink interface, which might or might not affect your timing.
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: problem with the executed time

Postby Anthony » Fri Jun 12, 2015 2:03 am

Hi,sebraa!
i agree with your opinion,but i have to get the time to caculate the speed of my algorithm :cry: :cry: :cry: ,do you have any idea about this,so that i can get the executed time correctly as far as possible

Best Regards

Anthony
Anthony
 
Posts: 16
Joined: Thu May 28, 2015 7:59 am

Re: problem with the executed time

Postby sebraa » Fri Jun 12, 2015 3:28 pm

Well, first:
- don't spam the forum with similar questions.

Then:
- read the documentation.

You will notice that the eCores contain two timer units each, which you can use to measure clock cycles on the Epiphany. This will provide you with "Epiphany algorithm execution time", instead of "sending program and waiting for result wall clock time", which you get with gettimeofday() on the host.

It depends on what you actually want to do. Judging from your current posts here, you are not sure about this yourself. So, take a step back, and think carefully about what you actually need.

Also, measuring something always comes with overhead, which will affect your measurements. Even if you don't care, you should at least know about it (and maybe give a reason why this doesn't invalidate your measurements).
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 11 guests

cron