Dear jiewang,
Your magnetic field routine is incompatible with the FLUKA version released by CERN. To fix the issue, please have a look on this topic:
Cheers, David