Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Python Programming Language

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


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

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

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

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

Jason schrieb:

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

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc