Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

OpenMP in practice

Name: Anonymous 2012-01-05 14:53

Is OpenMP actually usable? I had a very simply parallelizable problem written in C that executed fast enough (under 2 minutes), but I thought it would make a nice benchmark. Basically, it had n (roughly equally sized, n being < 200) sections that could be executed totally independently, and only needed a join at the end.

I installed the latest gcc with the OpenMP `task' support to test it, and the execution got only around five seconds faster compared to the non-MP version with the same compiler. Moreover, only one of the two CPUs was active during the #ompd part. This stuff is supposed to be simple. What gives?

Name: Anonymous 2012-01-05 15:58

>>6
Did you compile with -fopenmp?
Of course I did.
Why didn't you just use omp sections?
I couldn't please gcc well enough for it to accept my omp sections. I have no idea what it expected, but it seems that error-reporting hasn't been their first priority.
What did the omp directives look like?
#pragma omp task before each task (a single function call) and #pragma omp taskwait at the end before output.
Why are you posting this if you are unable to provide vital information?
Because I'm drunk and mildly intrigued by the prospect of trivial parallellization of trivially parallelizable programs in C? This is /prog/, did you expect something deeper?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List