Why fewer segment violation error met in Python than Fortran?

Viewed 78

From my limited experience, in Python, it is much fewer to meet segment violation error than Fortran (sometime difficult to debug even with many compiling flags). Is that due to Python has more tolerant memory management or?

1 Answers

You just meet other kinds of errors in Python instead, don't you? Python won't let you silently access your arrays out of bounds, it will enforce it checks.

Enable all debugging checks in your Fortran compiler and you will also get other more explicit error messages instead of just segmentation faults. Most importantly, enable array bounds checking and procedure interface checking (if not using modules).

Related