[Pw_forum] desc_init

Axel Kohlmeyer akohlmey at cmm.chem.upenn.edu
Wed Oct 29 22:24:33 CET 2008


On Wed, 29 Oct 2008, Lazaro Calderin wrote:

LC> Hello everyone,
LC> 
LC> Is there any special reason for the subroutine desc_init to be in more
LC> than one file ( PW/regterg.f90, PW/cegterg.f90, PW/rotate_wfc_k.f90,
LC> PW/rotate_wfc_gamma.f90) ?
LC> 
LC> That gives the following errors for linkers that do not accept symbol
LC> multi definition by default.

lazaro,

this looks like a broken compiler (which one? what platform? etc.).

those are "contained" functions, i.e they should not be 
globally visible. 

cheers,
    axel.



LC> 
LC> The errors are (versions 4.0.2 and 4.0.3):
LC> 
LC> ld: fatal: symbol `__DESC_INIT$COOR_IP$1' is multiply-defined:
LC>         (file libpw.a(cegterg.o) type=OBJT; file libpw.a(regterg.o)
LC> type=OBJT);
LC> ld: fatal: symbol `__DESC_INIT$RANK$1' is multiply-defined:
LC>         (file libpw.a(cegterg.o) type=OBJT; file libpw.a(regterg.o)
LC> type=OBJT);
LC> ld: fatal: symbol `__DESC_INIT$COOR_IP$1' is multiply-defined:
LC>         (file libpw.a(cegterg.o) type=OBJT; file libpw.a(rotate_wfc_k.o)
LC> type=OBJT);
LC> ld: fatal: symbol `__DESC_INIT$RANK$1' is multiply-defined:
LC>         (file libpw.a(cegterg.o) type=OBJT; file libpw.a(rotate_wfc_k.o)
LC> type=OBJT);
LC> ld: fatal: symbol `__DESC_INIT$COOR_IP$1' is multiply-defined:
LC>         (file libpw.a(cegterg.o) type=OBJT; file
LC> libpw.a(rotate_wfc_gamma.o) type=OBJT);
LC> ld: fatal: symbol `__DESC_INIT$RANK$1' is multiply-defined:
LC>         (file libpw.a(cegterg.o) type=OBJT; file
LC> libpw.a(rotate_wfc_gamma.o) type=OBJT);
LC> 
LC> A work around is to use -z muldefs for ld.


not sure if that is a good idea.

LC> 
LC> 
LC> Thanks, L.
LC> 
LC> 

-- 
=======================================================================
Axel Kohlmeyer   akohlmey at cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.



More information about the users mailing list