I came cross a compiling error about mdstck.f user routine. The fortran file is used to stop the transport of all the secondary neutrons born from all fission events. But after put the ‘Build’ button in Compile page, FLUKA told me ‘Error: Variable ‘ip’ at (1) cannot be redefined inside loop beginning at (2)’ in Output page. The information and my fortran file has been showen below.
The variable cannot be redefined in the second do-loop because the first do-loop is not closed yet, as clearly stated in the error message.
Please, also notice that your if statement
if (NNN .GT. 0) THEN
is not closed either.
Have a look at the FORTRAN manual for the DO statement and IF statement.
Finally, I would suggest you to follow a basic FORTRAN tutorial to get acquainted with basic FORTRAN syntax.