AlphaF20
AlphaF20

Reputation: 603

Why fewer segment violation error met in Python than Fortran?

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?

Upvotes: 2

Views: 106

Answers (1)

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).

Upvotes: 4

Related Questions