It’s a scientific computing application. It’s pretty old so I’m not sure what version of pgi it’s programmers were using when they wrote it, probably 3.something.
I’m just wondering if it’s safe to discard them, sounds like it is.
Also, is there a flag to initialize memory to a specific value or zero (like gfortran’s -finit-local-zero)? I think this code was programmed with that assumption.
Yes, please discard the -Mx/-My flags. “xflags” are used internally by the compiler and in general should not be used by user.
While we do not have and equivalent “-finit-local-zero”, the flag “-Msave”, which treats all local variables as having the SAVE attribute, has the side effect of initializing local variables to zero when the program is loaded. Note that with SAVE, a variable will retain it’s value from the last call to the subroutine and is not re-initialized each time the subroutine is called.
As an aside, you might want to consider updating your code to initialize your local variables. If it’s a large application, a utility like Valgrind (www.valgrind.org) can be very helpful in finding uninitialized memory reads (UMRs) which is generally the reason users request a flag like “-finit-local-zero”.
Wow, that is a pretty sweet application. It would have been really helpful last week when I was trying to find all the incorrectly sized memory pointers :).