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

Many "Global name too long" warnings

martinmath
New Contributor I
1,897 Views

Since recently I get many, many "global name too long" warning, burying any other useful output from the compiler. What really confuses me is that involved names themselves are not really long. But those names are combined in a rather exuberant way and sometimes even decorated with some icing like BLK. Just one such example (instead of real names I use descriptive names):

 

"NameModule@NameModule_smodSomeRoutineName_mp_contained_subroutine@BLK"

 

Here a submodule NameModel_smod has been used, which contains subroutine SomeRoutineName. This itself has a contained subroutine which uses an associate block (probably causing the final @BLK).

 

Surely, if these towers of names are necessary (which I readily believe), and the compiler itself finds these names kind of indigestible (which I can easily sympathise with), there should be another way for the compiler to handle this safely and gracefully (e.g. like gits hash value technique, i.e. cryptographic hash values).

 

PS: I compiled with classical ifort in Linux.

0 Kudos
14 Replies
Barbara_P_Intel
Employee
1,841 Views

What version of ifort are you using? The compiler team has been working recently on allowing longer names. The compiler adds to the name you supply for different compiler features.

 

0 Kudos
martinmath
New Contributor I
1,817 Views

Looks like something has gone awry then, as the many warnings only occured after I updated a couple days ago to classical version 2021.10.0 20230609. Before that, I only got such warnings rarely and then the affected names could somehow be shortened.

 

Here is an example with typical names (not really long) which gives such a warning (both with ifx and ifort). Unfortunately, I cannot compare this example with the previous version, as this has been replaced by the update. Compile command is just "ifort long_names.f90 -c" if the code is put into a file named "long_names.f90".

 

module adaptiveTimeStepSize

implicit none
private

public get_adaptiveTimeStep

interface
   module subroutine get_adaptiveTimeStep()
   end subroutine get_adaptiveTimeStep
end interface

end module adaptiveTimeStepSize


submodule (adaptiveTimeStepSize) adaptiveTimeStepSize_smod

implicit none

contains

module subroutine get_adaptiveTimeStep()
   call compute_upperBound()

contains
   subroutine compute_upperBound()
   end subroutine compute_upperBound
end subroutine get_adaptiveTimeStep

end submodule adaptiveTimeStepSize_smod
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,838 Views

FYI

According to this, default external (public) names is 2,047 characters. (Windows Linker restriction)

Jim Dempsey

 

 

0 Kudos
Mark_Lewy
Valued Contributor I
1,723 Views

I've been getting these warnings in OneAPI 2023.1 (ifort 2021.9); you could use "-diag-disable:5462" to suppress them, as I do.

0 Kudos
martinmath
New Contributor I
1,665 Views

Thanks for the work-around, I will use it till this issue is hopefully resolved properly in a future version.

0 Kudos
Ron_Green
Moderator
1,595 Views

Martin, we have a fix to extend the symbol length in 2024.0. We are looking at a more full, longer-term solution but doing so could break the compiler in other places. So for 2024 your case will create a proper symbol, no warning msg. The build 24.0-1171 is a prelim build for the 2024. The edit number is sure to increase before we make our final code drop for 2024.0 verison.


ifx -what -V -c long_names.f90

 Intel(R) Fortran 24.0-1171

[rwgreen@orcsle162 q05935160]$ nm long_names.o

0000000000000000 T adaptivetimestepsize._

0000000000000010 T adaptivetimestepsize.adaptivetimestepsize_smod._

0000000000000030 T adaptivetimestepsize.adaptivetimestepsize_smodget_adaptivetimestep_mp_compute_upperbound_

0000000000000020 T adaptivetimestepsize_mp_get_adaptivetimestep_


HarmenW
Novice
498 Views

I tried to find it, but I could not find any information about the symbol length in the release notes. Has this feature been released?

Building Fortran on windows with ifx 2024.1.0 Build 20240308, it appears that symbols are truncated to 90 characters. Jim Dempsey shared a page that shows that C/C++ symbols are allowed to be 2047 characters long on Windows. Does an option exist to increase the Fortran character limit?

0 Kudos
Ron_Green
Moderator
484 Views

the symbol size in ifx and ifort is 90 characters max.  There is no way to change this limit currently.  It is deeply embedded in the code for ifort and ifx.  This was sufficient in days before modules, submodules, and contained procedures, all of which add to the symbol length.  I will ask the team to revisit this but 90 is what it is today.  

The truncated symbol is usable so long as it does not conflict with another truncated symbol, which while possible is not likely.  I suspect you can compile, run, debug, etc without any issues from the truncated name.

HarmenW
Novice
452 Views

Thank you for your quick response. In that case we will probably suppress the warnings for now, and it would be great if this were addressed in a future release!

0 Kudos
Le_Callet__Morgan_M
1,555 Views

Hello, I have just upgraded to w_HPCKit_p_2023.2.0.49441. I am using the integrated version with visual studio 2022 Version 17.7.0.
When I use “ /Qdiag-disable:5462” I get the following errors:

"

Compiling with Intel® Fortran Compiler Classic 2021.10.0 [Intel(R) 64]..

myfile.f90

 

myfile.f90(2770): error #5462: Global name too long, shortened from:
MYMMODULENAME11111111111111111_MP_MYSUBROUTINEVERYLONGNAME11111111111111111111111111
TO
MYMMODULENAME111111111111_MP_MYSUBROUTINEVERYLONGNAME11111111111111111111111111
Cannot disable Fortran error message 5462

ifort: error #10298: problem during post processing of parallel object compilation
compilation aborted for myfile.f90 (code 1)

"

What could I do ?

Thank you

 

0 Kudos
Steve_Lionel
Honored Contributor III
1,541 Views

You could shorten the module and procedure names. As Ron Green says in a post above yours, a solution for this problem is coming in a future release. The fundamental problem is that the Microsoft object file format and linker limit global symbol names to 63 characters.

Le_Callet__Morgan_M
1,536 Views

Thanks i observed that the good name proposed is 79-80 character long. Is this a guideline and/or coincidence ?

0 Kudos
Steve_Lionel
Honored Contributor III
1,525 Views

You don't have to DO anything - the compiler did it for you. I had thought the limit was 63 characters, maybe it's a bit more. In any case, you can ignore the warning for now (but can't disable it.)

Le_Callet__Morgan_M
1,476 Views

Many thanks. 

0 Kudos
Reply