Hum, sorry about it. Here is a fix : https://github.com/serge-sans-paille/pythran/pull/219 . I think the "how many OpenMP does I have" is too much. If we display all possible usefull information, you screen will be overflooded. To debug this kind of issue, you should look in the cpp file using the -E flags. In the cpp you will see your transformed code so if you search "#pragma omp" you will see how many are present. I think there are no other possible approche. May be we can add a flags to display the final transformed Python code which will show this kind of issue? Cheers, Pierrick ----- Mail original ----- > De: "Ian Ozsvald" <ian@xxxxxxxxxxxxxx> > À: "pythran" <pythran@xxxxxxxxxxxxx> > Envoyé: Vendredi 14 Mars 2014 20:10:48 > Objet: [pythran] Bug report - "# omp..." is silently ignored (whilst > "#omp..." is good) > > I've just discovered the bug that I had at PyDataLondon (phew, I'm not > mad). I couldn't get an omp reduction to work - it looks like I > ignored the specification and prepended a whitespace which then causes > the openmp line to be silently ignored. > > In the midst of my critical function if I have: > #omp parallel for reduction(+:nbr_trials_in_unit_circle) > then my runtime is: > 0.118036031723 seconds # parallel! > but if I have: > # omp parallel for reduction(+:nbr_trials_in_unit_circle) > then my runtime is: > 0.221085786819 seconds # single threaded > > I'll make a feature suggestion - could pythran (perhaps with -v) > output the number of openmp declarations it has found? This would have > helped me with debugging the issue. > > As an intermediate step for now - maybe edit the docs to note the > exact syntax that's required, noting that extra whitespace will cause > the omp declaration to be silently ignored? > > For future reference - what's the easiest way to debug this problem? I > see (now) that if I use the -E flag I can investigate the generated > C++ and indeed I see the omp declaration appearing/not appearing, so I > can definitely verify it this way. Is there any other approach? > > Cheers, i. > > -- > Ian Ozsvald (A.I. researcher) > ian@xxxxxxxxxxxxxx > > http://IanOzsvald.com > http://MorConsulting.com/ > http://Annotate.IO > http://SocialTiesApp.com/ > http://TheScreencastingHandbook.com > http://FivePoundApp.com/ > http://twitter.com/IanOzsvald > http://ShowMeDo.com > >