[Pw_forum] desc_init

Lazaro Calderin calderin at physics.queensu.ca
Thu Oct 30 16:48:23 CET 2008


Hi Paolo,

>> I still do not understand the need for having exactly the same
>> subroutine (desc_init) included in different files which, besides,
>> go into the same library (libpw.a).
>
> it would be possible, and maybe convenient, to extract a separate
> routine, but this would require to pass some more variables that
> now are directly accessed (CONTAIN-ed routines have access to all
> variables of the containing routine). While I like to say that
> "the only line of code that is bug-free is the one that is not
> there", I also try not to forget another bit of wisdom:
> "if it is not broken, don't fix it"

Excellent bits of wisdom .. I agree .. it is just the case that for some
reason the sun compiler does not see that subroutine as "contained" and
ends up creating a library with repeated symbols. A workaround is to use
-z muldefs for linking, which is not recommended as Axel pointed out.

Thanks, L.

-- 
Lazaro Calderin
Department of Physics
Queen's University
Kingston, Ontario K7L 3N6, Canada
+1 613 533 6000 ext 74811
calderin at physics.queensu.ca



More information about the users mailing list