This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OpenMP issue can someone help?


On 12/15/2010 4:38 AM, N.M. Maclaren wrote:
On Dec 15 2010, Archambault Fabien wrote:

thank you for your answer! Seeing what you gave to me I tried to modify the parallel loops in order to be more "normal".
Seeing that I checked online and I have seen many examples using that reduction as I mentioned but in a different way to write the loop (for example): https://computing.llnl.gov/tutorials/openMP/#REDUCTION


So I modified my test case (see attached file) and now it works! But I do not understand what is the real difference between both writings.

Because in the Web page, the reduction variable is used ONLY to calculate the reduction, and its value isn't used for any other purpose inside the range of the reduction. You are also using it as an index.

If the OpenMP standard had been better, it would have been specified
as a constraint, and you would have got a compilation error.

Regards,
Nick Maclaren.

The insufficiency of OpenMP built-in syntax checks has been known for years. Hence the development of syntax checkers such as Kuck labs Assure (current descendant Intel Parallel Inspector). Perhaps if more Fortran OpenMP people would use it and submit reports on what is missed, recognition of interest level could be raised.

--
Tim Prince


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]