Re: "Final" Procedures
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: "Final" Procedures         

Group: comp.lang.fortran · Group Profile
Author: Gary Scott
Date: Sep 19, 2008 10:36

e p chandler wrote:
> On Sep 19, 12:46 pm, Gary Scott sbcglobal.net> wrote:
>
>>Here's what I need in a "final" procedure.
>>
>>Of course normal termination isn't a problem, but I have various I/O
>>boards that I need to ensure are properly terminated/safed (put in a
>>known state (e.g. not transmitting, outputs reconfigured to inputs) in
>>the event of a program crash. This is in part to ensure that
>>transmitters aren't overheated from prolonged operation (e.g. stuck in
>>the xmit state) or shorted because someone starts dismantling the test
>>setup thinking that the devices are automatically safed upon program
>>crash.
>>
>>How is that handled normally? Will any of the new f2k3, f2k8 features
>>help me in this area (fault detection/recovery)?
>
>
> What about adding a second job step that just turns everything off?
>
> - e
>
:) those wascuwy college newhires...

I guess I'll add a watchdog timer board ($$$)...I think the usual
implementation is for an executive to periodically reset a watchdog
timer at some regular interval, less than the timer interval. If the
timer ever does count down to zero, an interrupt will cause a callback
to a procedure/process that does some cleanup...come to think of it I
have two spare timers (32 bit, 1 usec lsb even) on the discrete board.
It seems like there should be something that the runtime library could
do for you, after all it prints out those nasty traceback messages for
you. Wasn't as concerned with covering every possible condition, mainly
crashes of my own application (:) not that one is more likely than the
other necessarily, but covers at least 50%% of the cases (optimistically)).

--

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

If you want to do the impossible, don't hire an expert because he knows
it can't be done.

-- Henry Ford
no comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
Re: NSVMVC: 1/8e finales CL (I) & UEFA Cup 1/16e finales (II)nl.sport.voetbal ·