Go to advanced search

by ejolson
Tue Apr 28, 2015 7:20 pm
Forum: C/C++
Topic: multithreaded program in Raspi2
Replies: 12
Views: 6460

Re: multithreaded program in Raspi2

My program is a software renderer like mesa3d. I use pthread to create multithread. It appears you are using pthread mutex locks to synchronize work done in parallel by multiple threads. It was recently reported on the Intel developer forum that It turns [out] that a large part [of the] problems is...
by ejolson
Tue Apr 28, 2015 2:51 am
Forum: C/C++
Topic: Compiling for Raspberry Pi 2
Replies: 25
Views: 47540

Re: Compiling for Raspberry Pi 2

Thank you all for having dealt with the topic. In fact I have compiled pulseaudio and other programs in raspberry Pi2 in the same way in which I have compiled for raspberry B+. I followed the instructions on this post: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=87138 But now I realized...
by ejolson
Mon Apr 27, 2015 1:03 am
Forum: C/C++
Topic: Cilkplus on RPi2B
Replies: 24
Views: 21615

Re: Cilkplus on RPi2B

This morning I saw that gcc 5.1 will be released Wednesday, April 22. The new GCC appears to be out. I wonder if my patches still work. Have you downloaded the official release and tried to compile a Raspberry Pi2B compatible version of the Cilk runtime library? I'm a little surprised there has not...
by ejolson
Thu Apr 16, 2015 7:59 am
Forum: C/C++
Topic: Cilkplus on RPi2B
Replies: 24
Views: 21615

Re: Cilkplus on RPi2B

It appears my build of gcc-5.0 with the Intel/MIT Cilk parallel extensions for the Raspberry Pi 2B is working reasonably well. I haven't found any bugs related the cilkrts runtime and the resulting parallel speedup has been good. This post describes one more test, this time an implementation of the ...
by ejolson
Tue Apr 14, 2015 9:35 pm
Forum: C/C++
Topic: how to use the gcc flags to enable NEON optimisations
Replies: 21
Views: 9673

Re: how to use the gcc flags to enable NEON optimisations

If u success using neon. There is no guarantee for better performance. Short vector NEON instructions on the Raspbery Pi 2B are a type of SIMD parallelism with very interesting performance characteristics. If we had a Raspberry Pi forum on parallel processing your thread would fit nicely there. I m...
by ejolson
Tue Apr 14, 2015 7:08 pm
Forum: C/C++
Topic: Is it possible to add a new forum Parallel programming
Replies: 65
Views: 18567

Re: Is it possible to add a new forum Parallel programming

My FFT was an weird thing. Integer maths only and only for a sample size of 1024. The C version was a prototype for creating a assembler version to run on the Parallax Inc. Propeller MCU. I used the standard 3 nested loop and bit reversal approach. I've looked at the code. It see that it was used f...
by ejolson
Tue Apr 14, 2015 10:35 am
Forum: C/C++
Topic: Cilkplus on RPi2B
Replies: 24
Views: 21615

Re: Cilkplus on RPi2B

As suggested by tufty in https://www.raspberrypi.org/forums/viewtopic.php?p=739221#p739221 I changed the define in os-fence.h to use the deprecated armv6 memory barrier instruction and then reconfigured gcc-5.0 using the command $ ../gcc-src/configure -v --enable-languages=c,c++ \ --prefix=/usr/loca...
by ejolson
Mon Apr 13, 2015 6:11 pm
Forum: Bare metal, Assembly language
Topic: DSB instruction and ARMv6
Replies: 3
Views: 3504

Re: DSB instruction and ARMv6

https://www.raspberrypi.org/forums/viewtopic.php?f=72&t=13959 may be of use. Thanks for the reply. I found similar inline memory barrier instructions in the Linux kernel. http://lxr.free-electrons.com/source/arch/arm/include/asm/barrier.h According to official ARM documentation these instructions a...
by ejolson
Mon Apr 13, 2015 7:32 am
Forum: C/C++
Topic: how to use the gcc flags to enable NEON optimisations
Replies: 21
Views: 9673

Re: how to use the gcc flags to enable NEON optimisations

my demo is like: A: float aa=1,bb=1,cc=1,dd=1; for(int i;i<10000000;i++){ aa=aa+aa; bb=bb+bb; cc=cc+cc; dd=dd+dd; } B: float32x4_t ff={1,1,1,1}; for(int i;i<10000000;i++){ ff=vaddq_f32(ff,ff); } the time of code A and B took is same. There appear to be two bugs: The first bug is that the counter va...
by ejolson
Fri Apr 10, 2015 5:06 pm
Forum: Bare metal, Assembly language
Topic: DSB instruction and ARMv6
Replies: 3
Views: 3504

DSB instruction and ARMv6

I'm working on a port of the MIT/Intel Cilk runtime for ARM https://www.raspberrypi.org/forums/viewtopic.php?f=33&t=102743 and am trying to put together a binary package that runs on both the original Raspberry Pi and new Pi 2B. The difficulty is that the Pi 2B needs a DSB Data Synchronization Barri...
by ejolson
Fri Apr 10, 2015 12:49 am
Forum: C/C++
Topic: Cilkplus on RPi2B
Replies: 24
Views: 21615

Re: Cilkplus on RPi2B

How did you determine the cutoff values "if(s>32||n<1024) {" in the routine fftparallel? Have you had time to compare the your cilk version of your parallel fft program to a openmp version? I chose s>32 because that limits the parallel recursion depth to 6 which is enough to keep most SMP machines ...
by ejolson
Wed Apr 08, 2015 6:37 pm
Forum: C/C++
Topic: Is it possible to add a new forum Parallel programming
Replies: 65
Views: 18567

Re: Is it possible to add a new forum Parallel programming

...I have tried to parallelize my own Fast Fourier Transform with OpenMP. So I know first hand it is very hard to get performance to scale linearly with the number of cores available. ... I thought you might be interested in seeing an FFT coded with MIT/Intel Cilk. Using a simple parallel recursive...
by ejolson
Wed Apr 08, 2015 6:27 pm
Forum: C/C++
Topic: Cilkplus on RPi2B
Replies: 24
Views: 21615

Re: Cilkplus on RPi2B

Here is a parallel FFT written using MIT/Intel Cilk. A discrete Fourier transform can be expressed in terms of two Fourier transforms each of half the size. This observation leads to an FFT algorithm which is easy to implement as a parallel recursive routine in Cilk. At modest transform lengths para...
by ejolson
Wed Apr 08, 2015 1:03 am
Forum: C/C++
Topic: Cilkplus on RPi2B
Replies: 24
Views: 21615

Re: Cilkplus on RPi2B

I'm happy you got gcc-5.0 with the Intel/MIT Cilk parallel extensions compiled and working. A binary package would definitely make it easier for people to try Cilk out. For reference, this tarball of my binary is 97MB and takes 455MB when unpacked. Please unpack it as root using # cd /usr/local # un...
by ejolson
Sun Mar 29, 2015 5:52 pm
Forum: C/C++
Topic: Cilkplus on RPi2B
Replies: 24
Views: 21615

Re: Cilkplus on RPi2B

I wrote a program to compute vector dot products to test the parallel performance of Cilk on the Raspberry Pi 2B computer. The calculation proceeds with a recursive parallel algorithm based on the fact that the dot product is the sum of two smaller dot products involving vectors of half the length. ...
by ejolson
Sat Mar 28, 2015 8:01 am
Forum: C/C++
Topic: Is it possible to add a new forum Parallel programming
Replies: 65
Views: 18567

Re: Is it possible to add a new forum Parallel programming

We have these ideas about what young minds can or cannot do and we teach them accordingly. Luckily one in every million or billion young minds is way ahead of the game. Perhaps through genius or excessive curiosity or weird obsession. Along these lines the web page for the world record computation ...
by ejolson
Fri Mar 27, 2015 8:33 am
Forum: C/C++
Topic: Cilkplus on RPi2B
Replies: 24
Views: 21615

Re: Cilkplus on RPi2B

I just compiled libcilkrts from gcc-5.0 for the Raspberry Pi 2B and have managed to run a couple simple tests. It seems to be working fine. I'll detail what I did starting from the beginning, since I expect most people reading this are not familiar with building gcc. For clarity, I shall prefix ever...
by ejolson
Thu Mar 26, 2015 3:47 pm
Forum: C/C++
Topic: Is it possible to add a new forum Parallel programming
Replies: 65
Views: 18567

Re: Is it possible to add a new forum Parallel programming

I just managed to compile the Intel/MIT Cilk runtime for gcc 5.0 on the Raspberry Pi 2B. I'll detail the changes in the topic on Cilk I started March 4. http://www.raspberrypi.org/forums/viewtopic.php?f=33&t=102743 The standard fib.c test program runs fine and gives correct results. One of my own pr...
by ejolson
Wed Mar 25, 2015 4:26 pm
Forum: C/C++
Topic: rowhammer
Replies: 6
Views: 2414

Re: rowhammer

Yes I am aware of that. I linked to a page saying "ARM doesn’t have an unprivileged cache-flush instruction". What I'm asking is "Are there [other] routes to row hammering in the ARM instruction set"? On Raspberry Pi 2B would the DMB memory barrier ARMv7 instruction allow hammering? http://infocent...
by ejolson
Sat Mar 21, 2015 5:02 am
Forum: Staffroom, classroom and projects
Topic: Physical Security for Pis
Replies: 6
Views: 4798

Re: Physical Security for Pis

How about checking the little boxes out like towels at the gym: give Pi in exchange for ID card, return Pi to get ID card back.
by ejolson
Fri Mar 20, 2015 6:23 pm
Forum: C/C++
Topic: Is it possible to add a new forum Parallel programming
Replies: 65
Views: 18567

Re: Is it possible to add a new forum Parallel programming

Clearly a super computer is big and expensive and probably often has no free time for ephemera. On the other hand I have heard from time to time of lesser super computers in universities and the like that are not used to capacity. Just the kind of place where someone might tackle such ephemera. Jus...
by ejolson
Thu Mar 19, 2015 10:18 pm
Forum: C/C++
Topic: Is it possible to add a new forum Parallel programming
Replies: 65
Views: 18567

Re: Is it possible to add a new forum Parallel programming

Hi Heater, I understand. It could be that calculating the digits of Pi is not a problem that is easy to do in parallel, I was trying (probably unsuccessfully) to say that there may be other reasons. You are right people who build these things love to brag. According to the documentation for y-crunc...
by ejolson
Wed Mar 18, 2015 10:27 pm
Forum: C/C++
Topic: Is it possible to add a new forum Parallel programming
Replies: 65
Views: 18567

Re: Is it possible to add a new forum Parallel programming

I would suggest though, that talk of write ordering and multi-cache consistency is rather high level for the target demographic of the Pi, which is primary and secondary school children. Write ordering and multi-CPU cache consistency are definitely specialist topics. That is why availability of a p...
by ejolson
Wed Mar 18, 2015 5:38 pm
Forum: C/C++
Topic: Is it possible to add a new forum Parallel programming
Replies: 65
Views: 18567

Re: Is it possible to add a new forum Parallel programming

if you want good advice on parallel programming then http://www.parallella.org/forums/viewforum.php?f=5 is going to be a great place to start [seriously] Thanks for the suggestion. There are many interesting posts on that forum. I particularly liked the OpenCL post about optimizing the Sobel edge d...
by ejolson
Wed Mar 18, 2015 1:13 am
Forum: C/C++
Topic: Is it possible to add a new forum Parallel programming
Replies: 65
Views: 18567

Re: Is it possible to add a new forum Parallel programming

Why not create such a forum on a third party site, Google groups perhaps, and link to it from this post? Thanks for the suggestion. After thinking about it, I decided there are advantages to having all Raspberry Pi users concentrated in this forum rather than spreading the expertise between multipl...

Go to advanced search