Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28445 Discussions

INTERNAL ERROR: pgopti_Create_Full_Path: buffer too small

Peter_Meincke
Beginner
1,130 Views

Hello,

currently we are using Intel FORTRAN 2017 Update 7, Visual Studio 2015 and CMake to build our project on Windows. Just recently we have started experimenting with CMake and ninja as alternative to Visual Studio as build driver. We can not use official ninja because it does not support FORTRAN so we have to use non-offical version of ninja with support for FORTRAN (https://github.com/Kitware/ninja).

When compiling our project with CMake and ninja in Debug mode everything works as expected. But when we build our project in Release mode ifort throws internal error:

INTERNAL ERROR: pgopti_Create_Full_Path: buffer too small

The issue seem to arise from source files having an absolute path name that is longer than 139 characters long. After ifort is run and the preprocessed source file is generated ("###.f90-pp.f90), a fortran preprocessor directive is prepended to the file contents, containing the line:

# 1 "{file path of original file}"

It is this line, when the path to the original file is above 139 characters, that the error gets thrown. This is only an issue when compiling in Release mode, compiling in Debug mode results in exactly the same preprocessed file, but no error is thrown.

Attached is a project for reproducing the error. The previously mentioned line of code that breaks the compilation in Release mode can be found at: hello_release\CMakeFiles\FTest.dir\folderis40charactersfolderis40characters\folderis40charactersfolderis40characters\folderis40charactersfolderis40characters\hello.f90-pp.f90

Kind regards,
Goran

 

0 Kudos
2 Replies
KEMPF__Andreas
Beginner
1,130 Views

We seem to hit this exact issue with 19.0.4 (cmake+ninja). As far as I can tell, using optimization flags > -O0 together with -fpp on an already-preprocessed Fortran source file will trigger the error if the path is too long. Either compiling without optimization or removing the -fpp flag seems to work around this issue. Unfortunately, -fpp is generally added without much thought and even cmake seems to add it in places where it is not really required.

Is there anything else that can be done? This topic is almost a year old without an answer so I wonder if there is something I am missing. I think this is a very annoying problem.

0 Kudos
Steve_Lionel
Honored Contributor III
1,130 Views

I would recommend filing an issue with Intel Support. See the orange "Bug Report" button at the top of the main forum page.

0 Kudos
Reply