By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,719 Members | 1,046 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,719 IT Pros & Developers. It's quick & easy.

Anyone else has seen "forrtl: error (200) ..."

P: n/a
Hello,

Ctrl+C is not passed to the interpreter (i guess it) while I'm executing a
script. Instead i get:
forrtl: error (200): program aborting due to control-C event

If I start python in interactive mode Ctrl+C is passed:

bash-3.2$ python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>raw_input()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyboardInterrupt
>>>
Any idea ?

Thanks
Alexander
May 30 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On May 30, 9:33 am, Alexander Eisenhuth <newsu...@stacom-software.de>
wrote:
Hello,

Ctrl+C is not passed to the interpreter (i guess it) while I'm executing a
script. Instead i get:
forrtl: error (200): program aborting due to control-C event

If I start python in interactive mode Ctrl+C is passed:

bash-3.2$ python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>raw_input()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyboardInterrupt
>>>

Any idea ?

Thanks
Alexander
Forrtl indicates that your script is running a Fortran library or
program. Remember that Python exceptions only apply during Python.
If a Fortran DLL performs a divide-by-zero error, or accesses invalid
memory, it will kill the interpreter instead of throwing a Python
exception. With Compaq Visual Fortran, the Fortran library calls can
kill your entire program if a function receives an invalid value.
(Try raising a negative real number to a fractional exponent, for
example.)

I'd guess that the Fortran code is intercepting the CTRL-C signal and
killing the running script.

Without knowing anything about your script and the library calls it
makes, I can't give you much advice. There may be little that you can
do, especially if you don't have the Fortran source code in question
and/or can't recompile it. Maybe someone with some Fortran/Python
experience can assist you.

--Jason

May 30 '07 #2

P: n/a
Alexander Eisenhuth wrote:
Hello,

Ctrl+C is not passed to the interpreter (i guess it) while I'm executing a
script. Instead i get:
forrtl: error (200): program aborting due to control-C event
I don't know what forrtl is, but I think it is hijacking your SIGINT signal
handler. Python installs an OS-level signal handler that raises the
KeyboardInterrupt in the main thread. If a library installs its own
handler, Python won't catch it.

--

Regards,
Tijs
May 30 '07 #3

P: n/a
Jason schrieb:
Forrtl indicates that your script is running a Fortran library or
program. Remember that Python exceptions only apply during Python.
If a Fortran DLL performs a divide-by-zero error, or accesses invalid
memory, it will kill the interpreter instead of throwing a Python
exception. With Compaq Visual Fortran, the Fortran library calls can
kill your entire program if a function receives an invalid value.
(Try raising a negative real number to a fractional exponent, for
example.)

I'd guess that the Fortran code is intercepting the CTRL-C signal and
killing the running script.

Without knowing anything about your script and the library calls it
makes, I can't give you much advice. There may be little that you can
do, especially if you don't have the Fortran source code in question
and/or can't recompile it. Maybe someone with some Fortran/Python
experience can assist you.

--Jason
Thanks for that hint.

Indeed a extension I'm using in my script uses matlab, and matlab uses (I'm
quite sure) fortran.

But does that mean, if a fortran dll is loaded, a underlying software layer
passes Ctrl+C to the fortran dll instead to python? (I can reproduce that in
doing a ctrl+c while my script is currently at time.sleep(10)

Thanks,
Alexander
May 31 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.