Option like ifort's -check uninit in PGI?

I was wondering if there was a compiler option similar to ifort’s ‘-check uninit’ with PGI? The description is:

              check uninit               Enables  run-time  checking for
                                         uninitialized variables.  If  a
                                         variable  is  read before it is
                                         written, a run-time error  rou
                                         tine will be called. Only local
                                         scalar variables  of  intrinsic
                                         type  INTEGER,  REAL,  COMPLEX,
                                         and LOGICAL  without  the  SAVE
                                         attribute are checked.

This option recently found a subtle error that had been plaguing me for a week and I’d love to enable it on PGI as well.

Hi Matt,

Sorry, no. I typically recommend user use Valgrind (www.valgrind.org). If find it very good at finding UMR’s (uninitialized memory reads) as well as many other memory issues.

  • Mat