Skip to content

Instantly share code, notes, and snippets.

@ultimatile
Created June 11, 2017 18:49
Show Gist options
  • Save ultimatile/38a8bb5e11439a1dd27674c503f6dd40 to your computer and use it in GitHub Desktop.
Save ultimatile/38a8bb5e11439a1dd27674c503f6dd40 to your computer and use it in GitHub Desktop.
If a condition is false, ifort with -traceback -fpe0 will abort and tell us the line.
subroutine assert(condition)
implicit none
logical, intent(in) condition
int :: a=0
if(condition==.false.) a=1/a
end subroutine assert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment