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

  • Thread starter Alexander Eisenhuth
  • Start date
A

Alexander Eisenhuth

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.Traceback (most recent call last):

Any idea ?

Thanks
Alexander
 
J

Jason

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.Traceback (most recent call last):

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
 
D

Dennis Lee Bieber

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
said:
Any idea ?
Well, showing us the minimal script that reproduces the problem
would help.

Off the wall -- are you importing a module that interfaces to some
FORTRAN number crunching library? "forrtl" sure sounds like "FORTRAN Run
Time Library" <G>
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
T

Tijs

Alexander said:
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.
 
A

Alexander Eisenhuth

Jason said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top