Yes it is expected and no there’s basically no way around it. You need to patch those away to report the error in a different way and recompile the FORTRAN library . This is exactly why such code should never be used to report errors in a library, just like abort in C.
4 Likes