[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]/feed.php on line 173: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 174: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community Supercomputing for Everyone 2017-03-26T05:45:11+00:00 https://parallella.org/forums/feed.php?f=18&t=4010 2017-03-26T05:45:11+00:00 2017-03-26T05:45:11+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18807#p18807 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]>
I'll give it a go with the online compiler explorer (http://gcc.parallella.org/). That'll tax my brain. It's been 30 years since I did any of that sort of stuff.

I'll give the coprcc tools a go as well. Right now I've got part one of the algorithm working and so I'll get the next bit going to at least finish the whole algorithm.

I also did some timing last night and the simple "run it all on the host" version runs 20 times quicker than the epiphany version. My next job is to see what the cores are up to. I suspect that the epiphany cores are spending most of the time in idle waiting for the incoming data. I've thought about how to improve this and packing in 4 8-bit grey scale values into one 32-bit integer seems to be better use of space. Transferring 64 bits of these packed integers seems like a better use of the bandwidth.

If anyone is interested in the code, the work in progress version is here: .

nick

Statistics: Posted by nickoppen — Sun Mar 26, 2017 5:45 am


]]>
2017-03-25T06:01:30+00:00 2017-03-25T06:01:30+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18804#p18804 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]>
You might try printing out the stack pointer. If you know exactly how your code operates, you should be able to predict how much stack space is needed by analyzing the assembly. A compiler cannot analyze the code to determine stack usage. And there's the possibility of interrupts being called in some cases.

If you're really close to being able to fit an appealing amount of data, you might look at removing some code. You can use "coprcc-info" on your binary. If you're using the -fhost trick, run "coprcc --extract" on your binary to pull out the Epiphany ELF.

Statistics: Posted by jar — Sat Mar 25, 2017 6:01 am


]]>
2017-03-25T05:13:03+00:00 2017-03-25T05:13:03+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18803#p18803 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]>
The next step is to use as much og yhe available memory as prudent. As you can see I left a 64byte gap between the stack pointer and the end of my "free" memory. This was a little too small. As soon as I run my kernel the core locked up. I'm assuming that the stack was overwritten and everything came to a grinding halt.

Is there a way of estimating how much stack is used per in the subsequent calls? I'd prefer to make an educated guess rather than suck it and see.

Nick

Statistics: Posted by nickoppen — Sat Mar 25, 2017 5:13 am


]]>
2017-03-20T22:11:17+00:00 2017-03-20T22:11:17+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18788#p18788 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]>
Your input is always fantastic and I appreciate it greatly.

I did the bit mask because the value returned from coprthr_tls_sbrk looked too big. The value of baseAddr was 0x2050b while the stack pointer was 0x7b18. Subtracting baseAddr from sp_val gave 0x6970 (or 26,992 in decimal) which is about what I would expect. Therefore I assumed that the high order bits of baseAddr were being stripped off in the subtraction as a side effect. My CS lecturer in 1984 said, "Side effects are a BAD THING" so I thought I'd explicitly strip them off myself. baseLowOrder is 0x11a8 which looks much better.

You might have noticed that this low level stuff is not really my strong point.

nick

Statistics: Posted by nickoppen — Mon Mar 20, 2017 10:11 pm


]]>
2017-03-20T14:46:43+00:00 2017-03-20T14:46:43+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18787#p18787 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]>
I'm not sure why you have to AND the baseAddr with 0xFFFF because coprthr_tls_sbrk(0) should return a local address. The tls in coprthr_tls_sbrk means Thread Local Storage. Every returned address should be between 0x0000 (realistically, 0x0400) and 0x7FFF (realistically, something lower).

Statistics: Posted by jar — Mon Mar 20, 2017 2:46 pm


]]>
2017-03-20T06:44:53+00:00 2017-03-20T06:44:53+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18785#p18785 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]> Statistics: Posted by nickoppen — Mon Mar 20, 2017 6:44 am


]]>
2017-03-20T03:14:51+00:00 2017-03-20T03:14:51+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18784#p18784 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]> Statistics: Posted by jar — Mon Mar 20, 2017 3:14 am


]]>
2017-03-19T23:29:39+00:00 2017-03-19T23:29:39+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18783#p18783 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]>
That actually sounds ok. I'll do some experiments with some function calls and see how that changes the stack pointer and then leave myself a small buffer zone. I don't want the stack to overwrite my data but equally, I'm pretty sure that overwriting the stack will not lead to happiness either.

Does it have to be in assembly though? What about e_reg_read(E_REG_R13)? I thought that the stack pointer is kept in general purpose register 13. Maybe I'm missing something but register 13 does not seem to change on repeated function calls. It seems stuck at: 0x808f0034.

nick

Statistics: Posted by nickoppen — Sun Mar 19, 2017 11:29 pm


]]>
2017-03-19T14:27:39+00:00 2017-03-19T14:27:39+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18782#p18782 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]>
I haven't tested this but it should just be sp-base. To get the stack pointer value, you will need one line of inline assembly.

This may not work like you expect. If you call any routine that increases he stack (decrements the stack pointer) you will overwrite the the end of your data allocation. This may be sort of a trial and error thing when you're working on the margins like this. I wish there was a better way, but there is not (at the moment).

Statistics: Posted by jar — Sun Mar 19, 2017 2:27 pm


]]>
2017-03-19T14:27:35+00:00 2017-03-19T14:27:35+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18781#p18781 <![CDATA[Re: COPRTHR-2 How much free local memory do you have?]]>
I haven't tested this but it should just be sp-base. To get the stack pointer value, you will need one line of inline assembly.

This may not work like you expect. If you call any routine that increases he stack (decrements the stack pointer) you will overwrite the the end of your data allocation. This may be sort of a trial and error thing when you're working on the margins like this. I wish there was a better way, but there is not (at the moment).

Statistics: Posted by jar — Sun Mar 19, 2017 2:27 pm


]]>
2017-03-19T10:07:40+00:00 2017-03-19T10:07:40+00:00 https://parallella.org/forums/viewtopic.php?t=4010&p=18780#p18780 <![CDATA[COPRTHR-2 How much free local memory do you have?]]> "Advances in Run-Time Performance and Interoperability for the Adapteva Epiphany Coprocessor" I note that Free Local Memory resides between the end of usrcore and stack memory (section 3.3).

Is there any way of calculating now much free memory there is? From a previous thread, I'm thinking that the call base = coprthr_tls_sbrk(0) will return you the beginning of free memory but is there any way of finding the end or how much memory is used by the stack? It would be great if it was as simple as 0x8000 - stacksize - base.

I'm working on an image process in application and being able to use all of the available memory will be quite important to getting the best performance.

Any advice would be greatly appreciated.

nick

Statistics: Posted by nickoppen — Sun Mar 19, 2017 10:07 am


]]>