Utility library hpcsperf

Un article de Informaticiens département des sciences de la Terre et l'atmosphère
Aller à: navigation, charcher

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