Linking mgdraw.f: multiple definitions

Hello FLUKA experts!
I am currently trying to link a mgdraw.f file to my fluka setup. However when I run $FLUPRO/bin/lfluka I get the following error:
/usr/bin/ld.bfd: /home/s6laklip/physik/fluka4-4.1/lib/libfluka.a(mgdraw.o): in function mgdraw_': /builds/fluka/fluka/src/user/mgdraw.f:4: multiple definition of mgdraw_‘; mgdraw.o:/home/s6laklip/physik/Desktop/FLUKA-examples/mgdraw.f:15: first defined here
/usr/bin/ld.bfd: mgdraw.o: in function `mgdraw_’:
However I have not created multiple files.
The linking is done from a separate directory as explained in the tutorials. In this directory I have my .inp file and the mgdraw.f file.

I would be delighted if anyone can help!
Kind regards
Laney

Dear Laney,

could you share the mgdraw routine you want to compile?

Also, the $FLUPRO environment variable is not used by the CERN release of FLUKA. You can round lfluka directly from the command line.

Cheers,
David

Dear David,
of course, here is my mgdraw.f file.
Thanks for your reply.
Cheers,
mgdraw.f (2.2 KB)
Laney

Dear Laney,

please use the the provided mgdraw(_empty).f template for your routine. It will have the correct arguments for the subroutine.

Cheers,
David

Dear David,
I did see the mgdraw.f file in the src/user folder. Is this file automatically linked to the fluka run? Or do I link it as explained in the tutorials (via fff, lfluka)?
Thanks for your replies!
Kind regards
Laney

Dear Laney,

you need to copy that file to your project, edit it, and then compile it according to the tutorials.

Cheers,
David

1 Like