Hi there,
since I have started to make use fo submodules a lot, every know and then I am getting such an error message:
/home/USER/.local/lib/Fortran/Lib_Tools_ifort_NoOMP_20150830/Lib_Tools_ifort_20150830.a(SubMod_Pedigree_Single_FromToFile.o):(.bss+0x980): multiple definition of `MOD_PEDIGREE_SINGLE_20160424$outer_.var$2273'
/home/USER/.local/lib/Fortran/Lib_Tools_ifort_NoOMP_20150830/Lib_Tools_ifort_20150830.a(SubMod_Pedigree_Single_Sort.o):(.data+0x0): first defined here
ld: Warning: size of symbol `MOD_PEDIGREE_SINGLE_20160424$outer_.var$2273' changed from 1080 in /home/USER/.local/lib/Fortran/Lib_Tools_ifort_NoOMP_20150830/Lib_Tools_ifort_20150830.a(SubMod_Pedigree_Single_Sort.o) to 304 in /home/USER/.local/lib/Fortran/Lib_Tools_ifort_NoOMP_20150830/Lib_Tools_ifort_20150830.a(SubMod_Pedigree_Single_FromToFile.o)
This disappears with stuff like commenting/uncommenting write statements etc somewhere, so totally out of nothing. I had such error messages never before. They started to appear when cutting up modules.
The structure I am using in the Modules is
Module Mod_A Type :: Type_A Integer, allocatable :: a contains Procedure, PAss :: SetA => SubA End Type_A Private :: SubA Interface Module Subroutine SubA(this,a) Implicit None Class(Type_A), Intent(InOut) :: this Integer, Intent(In) :: a End Subroutine ......... End Interface End Mod_A
The structure in the submodule similar to
Submodule(Mod_A) SubMod_A contains Module Procedure SubA Implicit None outer:block if(not.allocated(this%a)) Then exit outer end if this%a=this%a+a end outer End Procedure End SubMod_A
Thus, the main structural elements are: interface definition in the module only, non interface repetition in the submodule, every subroutine contains a "outer:block .... end oute" statement.
Since the error message leads to a total compiliation abort and therefore renders a 10,000 lines library useless, I am already banging my head against the wall about what's going on.
The error is very difficult to reproduce and, as written above, may disapear with uncommenting/commenting almost arbitrary pieces of code.
A first step would be to decrypt the varibales in the error message (outer_.var$2273) but I have no clue how to do that.
Any ideas??
Thanks a lot
Karl