Please Improve PGI fortran (PGI fortran vs Intel Fortran)

In PGI fortran some options are not available, which are available in standard intel fortran

  1. For example, one can search whether a directory exists are not
    using the command inquire(directory=“directory name”, exist =“value”) in intel fortran
    But in PGI fortran one cannot find such a thing.

  2. If the directory does not exist, one can create the directory using makedirqq in intel fortran. That option is not available in pgi fortran

  3. One can open a file with buffered = Yes or not bufferesize, blocsize in intel fortran. But it is not available in pgi fortran.

Still many more to come… Will post later…

Hi Panch,

Thanks for the request. After talking with our Compiler Architect, we don’t see a compelling reason to add #1 and #3. For #1, you should be able to use “file” instead of “directory”. For #3 where not sure the purpose other then this is an old VAX extension no longer relevant. If you want a way to control the I/O buffering behavior, take a look at the “setvbuf” 3f routine.

#2, makedirqq, seem reasonable to add to our DFLIB support. I have added TPR#18240 and sent it to the appropriate compiler engineer.

Still many more to come… Will post later…

Sounds good. We’ll evaluate them as they come in.

Best Regards,

Just keep in mind that those are compiler extensions and not (yet) standard Fortran. If you want to write portable code, it’s a good idea to avoid compiler extensions or language features that are very new or obsolete.


A late word that this was added to the 12.10 and subsequent releases.


I cannot find documentation on the return value of makedirqq().

When I use it as described in the Intel documentation (here, for example:, the return value fails to detect that the directory was successfully created.

That is to say, when I execute the following code, and the directory in question does not exist, then my code hits the “stop” statement:

        if (.not. iexist) then
            iexist = makedirqq(trim(temp_directory))
            if (iexist) then
                write(*,*) 'Created temp directory.'
                write(*,*) 'Temp directory '//trim(temp_directory)//' did not exist and could not be created.' // i2a(iexist)

Hi Andrew,

Looks like we’re return the system’s return code as an integer. Hence, “0” will mean success and any other value is the error code.

  • Mat