compiling my library with
ifort -O3 -mkl=sequential -warn nounused -warn declarations -fPIC -c *.f90
and subsequently linking with
ifort -shared -Wl,-soname,tmp.so -o tmp.so *.o
ld: tmp.so: version node not found for symbol mod_Test_20160424_single@sort._ ld: failed to set dynamic section sizes: Bad value
The Subroutine "sort" is located in a submodule SubMod_Test_20160424_Single_Sort.f90 of which parent module is Mod_Test_20160424_Single.f90.
Any idea what the problem is??
And here the minimal example:
Module Mod_A Interface Module Subroutine SubA(a,b) Integer*8, Intent(In) :: a,b End Subroutine End Interface End Module Mod_A
Submodule(Mod_A) SubMod_A contains Module Procedure SubA Implicit None write(*,*) a,b End Procedure End Submodule SubMod_A
ifort -c -fPIC Mod_A.f90 ifort -c -fPIC SubMod_A.f90
and linked with
ifort -shared -o tmp.so *.o
ld: tmp.so: version node not found for symbol mod_a@submod_a._ ld: failed to set dynamic section sizes: Bad value
Perfect! Thank you. I don't believe we've seen this error before. We've received other recent reports of linking issues involving submodules on Linux related to our decoration's use of @ but I don't know whether that is at play here. We'll investigate, stay tuned.
This is related to an earlier case (here) found to be caused by the use of ‘@’ within our submodule name decoration. While not shown in the post, the test case provided for the earlier report produces the identical error to what you showed. I also confirmed your test case does successfully link using an internal development compiler containing the fix for the earlier reported case. The associated fix uses a period (.) in place of the ‘@’.
Unfortunately there is not a convenient work around. The fix is expected to be in our upcoming PSXE 2016 Update 4 in the coming month.
(Internal tracking id: DPD200413624)
(Resolution Update on 06/02/2017): This defect is fixed in the Intel® Parallel Studio XE 2017 Update 4 release (ifort Version 126.96.36.199 Build 20170411 - PSXE 2017.2.056 / CnL 2017.4.196 - Linux)
I just tried to do the above example. It's still the same bug. I have now ifort 17 runnig which I expected to include all the bug fixes from update 4. Is this not the case???