Utility library hpcsperf : Différence entre versions
m (Created page with "{| width="100%" cellspacing="2" cellpadding="10" style="border: 0px none;" |- | width="50%" valign="top" style="background: none repeat scroll 0% 0% rgb(238, 255, 255); border: 0...") |
m |
||
Ligne 9: | Ligne 9: | ||
|} | |} | ||
− | == | + | == library hpcsperf == |
− | === stuck/looping program protection | + | === 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 | ||
Ligne 47: | Ligne 45: | ||
− | </pre> | + | </pre> |
− | |||
=== program timing routines === | === program timing routines === |
Version depuis le 1 de décembre 2011 à 14:12
en construction(cette page s'adresse principalement aux développeurs) |
under construction(this page is mainly for developers) |
library hpcsperf
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