Teaching and debugging OpenMP in gfortran (or otherwise!)
N.M. Maclaren
nmm1@cam.ac.uk
Sat Sep 15 12:02:00 GMT 2018
Sorry about this, but searching in the usual places has found nothing
useful, and I am interested in gfortran's direction.
The kiddies do not like my OpenMP course, because it is all about what not
to do, but the problem is that even egregious data races do not show up in
test codes and there doesn't seem to be a usable testing tool. The best for
use with gfortran and gcc seems to be valgrind (helgrind or drd), but both
produce a hopeless number of false positives even in gcc 4.9.4 rebuilt with
no futexes and valgrind 3.13. Interestingly, gfortran is worse than gcc,
and my examples are functionally identical (I teach both languages at once).
This isn't just a teaching problem, as OpenMP experts will know. It's
horribly common for programs to fail, sometimes, after long running times,
on some systems - usually giving wrong answers with no diagnostic :-(
Has anyone any comments on this - except "you're stuffed" :-) I know the
difficulty involved, so am not expecting a good solution, nor thinking
about doing it, but is there even a partial solution to this for gfortran?
Regards,
Nick Maclaren.
More information about the Fortran
mailing list