Utility library hpcsperf : Différence entre versions

Un article de Informaticiens département des sciences de la Terre et l'atmosphère
Aller à: navigation, charcher
m (moved Useful Control Routines to Utility library hpcsperf: structure change)
m
 
Ligne 11: Ligne 11:
 
== library hpcsperf  ==
 
== library hpcsperf  ==
  
=== stuck/looping program protection<br> ===
+
available with:
 +
 
 +
'''.'''&nbsp; s.ssmuse.dot hpcs-dev
 +
 
 +
(also included in some development bundles)
 +
 
 +
=== stuck/looping program protection<br> ===
  
 
*start_dead_process_timer <br>call start_dead_process_timer(value_in_seconds)<br>sets the maximum value of the allowable interval between calls to i_am_alive  
 
*start_dead_process_timer <br>call start_dead_process_timer(value_in_seconds)<br>sets the maximum value of the allowable interval between calls to i_am_alive  

Version actuelle datée du 1 de décembre 2011 à 14:21

en construction(cette page s'adresse principalement aux développeurs)

under construction(this page is mainly for developers)

library hpcsperf

available with:

.  s.ssmuse.dot hpcs-dev

(also included in some development bundles)

stuck/looping program protection

  • start_dead_process_timer
    call start_dead_process_timer(value_in_seconds)
    sets the maximum value of the allowable interval between calls to i_am_alive
  • i_am_alive
    call i_am_alive
    resets the dead process timer

C language example

void main()
{
int timeout=15; /* set timeout to 15 seconds */
useconds_t j=5000000;

start_dead_process_timer(&timeout);
while(1){
fprintf(stderr,"sleeping %d seconds \n",j/1000000);
i_am_alive();
usleep(j);
j=j+3000000;
}
}

FORTRAN language example

program stuck
integer timeout
integer i

timeout=10
call start_dead_process_timer(timeout)
do while(1.eq.1)
i=i+1
enddo
stop
end


program timing routines