The advice you have already been given, about learning how to use a debugger, is good advice. There are better debuggers than GDB, but if you don't have any of them GDB is OK.
However, before you dive into the entrails of the program with GDB stop and think. You say that changing some constants stops the program. What exactly do you mean ? Do you mean that if you change what Fortran calls PARAMETERs in the source code, recompile and try to run the program fails ? Or do you mean that if you provide certain values as input the program runs and fails ?
What error messages does the compiler or run-time system provide when the program fails ? How far into its execution does the program fail ?
I guess you have already studied these aspects of the program, but if you haven't you should do so. You should still start learning how to use a debugger but they have a justified reputation, in general, of not being very easy to use. That's partly because not many of us use them frequently enough to become fluent with them.