Are complex*16 variables static by default?

Jerry DeLisle jvdelisle@charter.net
Fri Jan 27 23:19:00 GMT 2017


On 01/27/2017 02:46 PM, Steffen Boerm wrote:
>
> Hello,
>
> how are complex*16 variables handled by gfortran if "-frecursive" is
> not specified?
>
> Is it possible that they are stored as static variables?
>
> I am using LAPACK's zlarfg and zlarf functions within a C program, and
> my code works just fine as long as OpenMP is disabled. When I enable
> multi-threading, the code behaves erratically, and I am wondering
> whether this might be due to the complex*16 constants "one" and "zero"
> in zlarf or the complex*16 variable "temp" in zgerc.

I am not the best person to answer this.

I am doubtful LAPACK is thread safe. I think you need to force single thread 
through execution of those functions.

We may need more information. Have you asked on comp.lang.fortran. It would be 
more appropriate to ask your question there.

Jerry



More information about the Fortran mailing list