Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
8 Views

strange error message in submodule soaked library

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

0 Kudos
3 Replies
Employee
8 Views

For existing reports relating to submodules and duplicate symbols, nothing appears to match your case. I also do not know how to decrypt the .var$ style names.

For starters I captured your details in an internal tracking report to Development but I expect they need a reproducer to work with so if you happen on the error again, could you capture a snapshot of your build/source at that moment and share that with us?      That might offer something for us to analyze further, maybe even reproduce the link error.

For concerns of sharing that complete snapshot in the public eye, you could either share that with us via Intel Premier or via a private reply to me (via Send Author a Message).

(Internal tracking id: DPD200412654)

0 Kudos
Highlighted
8 Views

Interesting. 

The "outer_" comes from the name of the block, and "var$NNN" is a so-called unique counter to help name variables.

I'm not sure what this is;MOD_PEDIGREE_SINGLE_20160424   

I would guess it was the name of the ancestor module?

Can you show an accurate example of submodule code?  I would just be putting it in a "fake" routine to watch how we name things.

                thanks --

                                    --Lorri

0 Kudos
Highlighted
Beginner
8 Views

Hi,

thanks.

I was about getting an extract from my library for you .................. and now it has disappeared. So in case it reappears I'll get you a working example.

The name MOD_PEDIGREE_SINGLE_20160424 is indeed the ancestor module, both others are submodules of it. The whole sturcture is similar to the above example just that type_a has another feature, say "integer, allocatable :: b", to deal with that feature there is another subroutine, say "subB", that subroutine is put in to an extra submodule, say "submod_B", and the module procedure has also the "outer:block ... end outer block" characteristic.

 

Cheers

 

 

0 Kudos