In message <https://marc.info/?l=openbsd-ports&m=155992865732530&w=1>, j () bitminer ! ca wrote [[about openmp]] > For long calculations, I have seen 2 cores with OpenMP take half the time > as one core with/without. So yes, it works. But Amdahl's Law applies. > If a calculation is long, and 20% is serial, and 80% parallelizable, > then the runtimes will be 100%, 60%, 46% and 40% at 1, 2, 3 and 4 cores. > The difference between 3 and 4 cores is not much. If 100% takes 4 hours, > then the difference between 1 and 2 cores is significant.
I have a code which typically gets a speedup of ~6 using OpenMP on 8 cores and ~12 on 16 cores. Using OpenMP the code runs for anywhere from a few days to a few weeks, so the OpenMP speedup is very significant. The code is ~100K lines of C++, developed on OpenBSD, running on a Linux supercomputer. I added OpenMP support in 2015, so it's all guarded with an #ifdef which is disabled on OpenBSD. (Debugging the OpenMP directly on the supercomputer was slightly painful; fortunately this code's use of OpenMP is very simple, with only 3 parallel loops and one per-thread data structure in the entire code.) ciao, -- -- "Jonathan Thornburg [remove -animal to reply]" <jth...@astro.indiana-zebra.edu> Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA currently on the west coast of Canada "There was of course no way of knowing whether you were being watched at any given moment. How often, or on what system, the Thought Police plugged in on any individual wire was guesswork. It was even conceivable that they watched everybody all the time." -- George Orwell, "1984"