Are complex*16 variables static by default?
Steffen Boerm
sb@informatik.uni-kiel.de
Sun Feb 19 16:10:00 GMT 2017
Hello.
>> Still, if I replace zlarfg/zlarf by my own code or disable
>> OpenMP, the program seems to work. Wouldn't this indicate that
>> zlarfg/zlarf may introduce strange side effects?
>
> No. What it would indicate is that the code has falled foul of
> OpenMP's shared/private rules, which are 'interestingly
> complicated'.
Shouldn't automatic variables of a called function be always private?
As far as I know, each thread has its own stack in OpenMP.
> Note that 'thread safe' isn't a well-defined term but, given that
> OpenMP is currently the dominant shared-memory threading paradigm,
> should include being safe for OpenMP.
I would have expected "thread-safe" to simply mean that all access to
global variables (including files, hardware and the like) is protected
by critical sections or locks.
> That's the best start. If that fails, there will be solutions, but
> the best one would be to improve LAPACK.
The problem remains even if I compile LAPACK with -frecursive or
-fopenmp. If I compile reference BLAS as well instead of using the
OpenBLAS library provided by OpenSUSE, everything seems to work. Maybe
OpenBLAS tries to do something clever that's incompatible with LAPACK?
Anyway, this is probably no longer a topic for the GCC fortran list.
Thank you very much for your helpful answers.
Best regards,
Steffen
More information about the Fortran
mailing list