[Q-e-developers] Undefined variables in espresso

Carlo Cavazzoni c.cavazzoni at cineca.it
Mon Apr 19 11:18:38 CEST 2010


>> You may get away with undefined variables until the espresso
>> environment (fortran run time, compiler, shell) zeroes allocated
>> variables and zero is an acceptable initialization variable, but you
>> are living dangerously.
> 
> I don't think it is that serious: there may be some components of arrays
> that are not initialized, but they are never used. I run all examples  
> with
> initial value NaN for real and 12345678 for integer and nothing nasty
> happened

I know of some arrays (like those used in FFT) intentionally not
initialized in order to speed up the code (on some machine
initialization cost as much as the operation on the array itself...).
I would suggest to use "valgrind" http://valgrind.org/ to
trace down initialization problmes, we have done it (on some relevant
cases) and we have not find accesses to uninitialized memory locations.
Note that many tools, valgrind included, give a lot of false positive,
because they work staying on the safe side and tend to be pedantic.
An item they point out have to be investigated, but not necessarely
is an error in the code,


carlo 



More information about the developers mailing list