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

Many "Global name too long" warnings

martinmath
New Contributor I
1,049 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
11 Replies
Barbara_P_Intel
Moderator
993 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
969 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
990 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
875 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
817 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
747 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_


0 Kudos
Le_Callet__Morgan_M
707 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
693 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
688 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
677 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.)

0 Kudos
Le_Callet__Morgan_M
628 Views

Many thanks. 

0 Kudos
Reply