(j3.2006) (SC22WG5.4026) [ukfortran] LOCK/UNLOCK question
N.M. Maclaren
nmm1
Wed Jun 24 04:12:55 EDT 2009
On Jun 24 2009, Bill Long wrote:
>>
>> In my experience, the unstructured nature of aliasing control is a more
>> important factor, but I agree that getting unstructured parallelism
>> controls right is error-prone in the hands of experts and completely
>> hopeless in the hands of non-experts.
>
>I dislike this sort of imperious condescension. While it might be the
>case that some hapless beginners will get things wrong, there are a lot
>of very good programmers out there who directly benefit from access to
>powerful features. They should not have their hands tied. Rather, we
>should cater to their needs.
Needs? Or wants?
You have rather jumped to the conclusion that I am claiming that I can
get unstructured parallelism controls right - well, for the record, I
know that I can't. Over many years, I have learnt that I can write code
that mostly works, but I lack the intellectual ability to be sure that my
logic will behave correctly in all cases. And it usually doesn't ....
However, I do have the experience to realise that, when I hit trouble, the
solution is to back off, and put draconian self-imposed constraints on my
logic. In that way, I can simplify the problem enough that I can get my
head around it. Given that is EXACTLY the same conclusion that Hoare came
to, I don't feel too stupid for doing it :-)
In particular, when I hit that problem, I remove the synchronisation logic
from open code and implement some sort of more structured primitive that
is clean anough for me to reason about. I can then debug that primitive
on its own. All classic stuff!
>I also don't entirely agree with the philosophy that all sophisticated
>coding should be confined in libraries where it is hidden from all but a
>few self-appointed experts. It's quite possible that someone else would
>come up with a new approach that is better - as long as (s)he has access
>to the tools.
I didn't say that the module should be forbidden to any user who feels
confident enough to use it - I agree that is unreasonable. But it should
be very clear which were the recommended (i.e. fairly safe) techniques and
which need considerable caution.
Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nmm1 at cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
More information about the J3
mailing list