dot product

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

dot product

Postby aihaike » Fri Sep 05, 2014 2:05 am

Dear all,

I'm trying to run the dotproduct example but fail.
The code crash when loading the .srec binary to the board.
I'm wondering if someone has experienced the same issue.
Thank you,

Eric.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: dot product

Postby manklee » Fri Sep 05, 2014 9:40 pm

I also was unable to run the dot product sample. The output I got was:

Calculating sum of products of two integer vectors of length 4096 initalized to all 0x1's using 16 Ccores.
........FAIL

Was any one able to run this demo successfully?
manklee
 
Posts: 24
Joined: Sun Jun 29, 2014 10:06 pm

Re: dot product

Postby aihaike » Sat Sep 06, 2014 2:28 am

yeah, same here.
This happen when
Code: Select all
e_load_group("e_task.srec", &dev, 0, 0, platform.rows, platform.cols, E_TRUE);

is called.
I can't figure what's wrong with e_task.c code.
The error code is 139.
Help would be very appreciated.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: dot product

Postby manklee » Mon Sep 08, 2014 11:21 pm

I traced the program to:
e_load_group("e_task.srec", &dev, 0, 0, platform.rows, platform.cols, E_TRUE);
and that's when it crashed too!
manklee
 
Posts: 24
Joined: Sun Jun 29, 2014 10:06 pm

Re: dot product

Postby aihaike » Wed Sep 10, 2014 4:18 am

I tried to modify the epiphany code and make something easy but it doesn't help.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: dot product

Postby manklee » Fri Sep 12, 2014 3:08 am

Does this mean that we got defective epiphany chips?
manklee
 
Posts: 24
Joined: Sun Jun 29, 2014 10:06 pm

Re: dot product

Postby aihaike » Fri Sep 12, 2014 3:10 am

No, I can run several other examples and do some stuff myself.
I but definitely need to understand what's going wrong with this code.
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: dot product

Postby aihaike » Mon Sep 15, 2014 8:23 am

The error code is 139, which correspond to segmentation fault.
To me e_load_group returns a segmentation fault, how is that possible?
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: dot product

Postby aihaike » Tue Sep 16, 2014 3:08 am

I figured out.
if you look at the run.sh script, it basically execute the binary this way:
Code: Select all
sudo -E LD_LIBRARY_PATH=${ELIBS} EPIPHANY_HDF=${EHDF} ./bin/main.elf


Now, if you do
Code: Select all
cd bin
sudo -E LD_LIBRARY_PATH=${ELIBS} EPIPHANY_HDF=${EHDF} ./main.elf


it works !

Well, it still crash but for other reason.
Now, I REALLY want to understand why we can not do ./bin/main.elf.

Any hints here?
User avatar
aihaike
 
Posts: 31
Joined: Wed Aug 06, 2014 5:41 am
Location: Shanghai, China

Re: dot product

Postby manklee » Tue Sep 16, 2014 6:42 am

I know why!

You HAVE to run it in the bin directory because of this line of code:

e_load_group("e_task.srec", &dev, 0, 0, platform.rows, platform.cols, E_TRUE);

It wants to load the array of processors with the file "e_task.srec" and you can only find it in the bin directory. I suppose if you changed the code to:

e_load_group("bin/e_task.srec", &dev, 0, 0, platform.rows, platform.cols, E_TRUE);

Then you can run it from where the shell scripts are, the "dotproduct" directory.

I ran it from the bin directory by typing

../run.sh

and I got this from the program:

All cores loaded and running
All cores done calculations.
Results copied to host
Sum of Product Is 4096!
/home/linaro/epiphany-examples/apps/dotproduct/run.sh PASSED
manklee
 
Posts: 24
Joined: Sun Jun 29, 2014 10:06 pm

Next

Return to Programming Q & A

Who is online

Users browsing this forum: Google [Bot] and 8 guests

cron