[MBDyn-users] Modules loading

Riccardo Gori goriccardo at gmail.com
Mon Dec 8 22:24:10 CET 2008


On Monday 08 December 2008 20:53:39 you wrote:
> Riccardo Gori wrote:
> > Dear MBDyn developers,
> > I'm trying to develop a train wheel module for MBDyn. I started writing
> > it upon the wheel2 module, but I'm experiencing problems when I try to
> > load it.
> >
> > Even if I try to load the vanilla wheel2 module it gives me a
> > Segmentation fault.
> >
> > Am I doing something wrong? To load the wheel2 module I use:
> >
> > module load: "module-wheel2.so";
> >
> > I compiled mbdyn 1.3.4-Beta using:
> >
> > LDFLAGS=-rdynamic ./configure --enable-runtime-loading
> > --with-module=wheel2
> >
> > I'm using gcc-4.1.2 and libtool 1.5.26
> >
> > Loading other modules like module-drive works fine.
> > Wheel2 module works just if it's statically linked.
>
> Yes, there seems to be a misunderstanding (related to the fact that the
> syntax for loadable elements differs from that of regular modules, as it
> was introduced much earlier in MBDyn).
>
> The module needs to be loaded when the "loadable" element that uses it
> is instantiated.  See the attached example.
>
> Just loading the module, and dereferencing it later, should work but
> probably the wheel2 module has never been foxed to work that way.  I'll
> give it a look.  Thanks for pointing it out.
>
> Cheers, p.

Thank you very much, now it's working perfectly! I was misusing the loadable 
element declaration, it works fine also with module load.
Thanks again

Regards
Riccardo Gori





More information about the Mbdyn-users mailing list