Errors in running on mgdraw.f routine

Hi FLUKA users,

I posted a couple of days ago about not being able to compile my own mgdraw.f routine, this is now working but it still says “Finished with Errors” when I try to run it, with error code 12 and no 001.out or .err files are generated. Can anyone see why this might be? I’ve simplified the mgdraw.f file to only be looking at 1 region. I’m trying to look at the trajectory of particles entering a quadrupole magnet from the vacuum region around it where the beam starts.

Thanks,
Lucy

TRACK_Quad.out (845 Bytes)

my_mgdraw.f (2.8 KB)
magfld_1quad.f (2.6 KB)
TRACK_Quad.inp (2.5 KB)

Dear Lucy,

the cause of the problem was an extra END instruction at the end pf your mgdraw routine.

However, your magfield routine is a mix of two different FLUKA versions. To make it work you need to adapt the format of the INCLUDE commands. (Lowercase, without brackets and with the .inc ending.)

Or, you may want to take a look of the new feature of FLUKA 4-2.0, which allows the creation of different magnetic field using cards. See: MGNFIELD | FLUKA and
MGNCREATe | FLUKA

Cheers,
David

1 Like

Hi David,

Thank you for your reply and that’s great to hear about the new cards! I will try them out today.

Thanks,
Lucy