[pythran] Re: First test on macOS: Pb with OMPg

  • From: Olivier Borderies <olivier.borderies@xxxxxxxxx>
  • To: pythran@xxxxxxxxxxxxx
  • Date: Wed, 12 Dec 2018 12:19:28 +0100

I can reproduce your problems, and after a look at the parallel run, tehre
are *a lot* of shared access in the parallel loop, and you're not
protecting them. All accesses to n_accept, redefinition of new_path etc are
done on shared variable...


Thx for the pointer ! Indeed I'm new to omp. I fixed it. Now it does work
on macOS and Linux. But surprisingly the speedup is much larger in macOS
(laptop and desktop) than on the Linux VM.
On macOS the speed up from omp (branch omp) is very much in line with that
from concurrent.futures (branch master) - as expected since each top loop
runs an entirely separate simulation.
But on Linux, the speed up is far less. No crash, no warning, good results
though. Since it is a VM I cannot really see the CPU use (and check it
climbs to 100%). I checked that 'apt list --installed | grep omp' shows
'libgomp1'....
What kind of reason could explain that ??

PS: I updated the repo README to make it reproducible.
https://gitlab.com/oscar6echo/tsp-pythran

Other related posts: