| 1 | == HOWTO: Use IFort Traceback Error Message for Own Purposes == |
| 2 | |
| 3 | |
| 4 | While using the IFort compilers, you may get at failure a listing of routines (and lines) where the code came from until it crashed. The following shows an example: |
| 5 | {{{ |
| 6 | Image PC Routine Line Source |
| 7 | ... ... ... ....... ... |
| 8 | main.x 080C9CCA collisionterm_mp_ 811 collisionTerm.f90 |
| 9 | main.x 080C44DB collisionterm_mp_ 410 collisionTerm.f90 |
| 10 | main.x 0804A69D gibuu_.run_ 1101 main.f90 |
| 11 | main.x 08048839 MAIN__ 154 main.f90 |
| 12 | }}} |
| 13 | |
| 14 | It is possible to use the same machinery for your own programmer purposes: |
| 15 | |
| 16 | |
| 17 | Insert at the beginning of your module: |
| 18 | {{{ |
| 19 | USE IFCORE |
| 20 | }}} |
| 21 | and at the position, where you want to get the error message: |
| 22 | {{{ |
| 23 | call TraceBackQQ |
| 24 | }}} |
| 25 | |
| 26 | It is also possible, to emit an error message just as a warning and return to the calling routines. |
| 27 | |
| 28 | See also: Ifort documentation, TraceBackQQ |