Commit c5f191d4 authored by Carl-Johan Haster's avatar Carl-Johan Haster
Browse files

Merge branch 'osg' into 'master'

Changes lalinference pipe to allow OSG running

See merge request lscsoft/lalsuite!1353
parents 62fed63a 80f4657d
......@@ -252,9 +252,12 @@ static void install_resume_handler(int checkpoint_exit)
/* Install a periodic alarm that will trigger a checkpoint */
int sigretcode=0;
struct sigaction sa;
int checkpoint_time = 3600; /* Default 1 hour */
if (checkpoint_exit)
{
sa.sa_sigaction=catch_interrupt;
/* Increase time between checkpoints because there is overhead in restarting */
checkpoint_time = 3*3600; /* 3 hours */
}
else
{
......@@ -266,7 +269,7 @@ static void install_resume_handler(int checkpoint_exit)
/* Condor sends SIGUSR2 to checkpoint and continue */
sigretcode=sigaction(SIGUSR2,&sa,NULL);
if(sigretcode!=0) fprintf(stderr,"WARNING: Cannot establish checkpoint on SIGUSR2.\n");
checkpoint_timer.it_interval.tv_sec=60*60; /* Default timer 60 mins */
checkpoint_timer.it_interval.tv_sec=checkpoint_time;
checkpoint_timer.it_interval.tv_usec=0;
checkpoint_timer.it_value=checkpoint_timer.it_interval;
setitimer(ITIMER_VIRTUAL,&checkpoint_timer,NULL);
......
......@@ -166,9 +166,11 @@ static void install_resume_handler(int checkpoint_exit)
/* Install a periodic alarm that will trigger a checkpoint */
int sigretcode=0;
struct sigaction sa;
int checkpoint_time=3600; /* default 1 hour */
if (checkpoint_exit)
{
sa.sa_sigaction=catch_interrupt;
checkpoint_time=3*3600;
}
else
{
......@@ -180,7 +182,7 @@ static void install_resume_handler(int checkpoint_exit)
/* Condor sends SIGUSR2 to checkpoint and continue */
sigretcode=sigaction(SIGUSR2,&sa,NULL);
if(sigretcode!=0) fprintf(stderr,"WARNING: Cannot establish checkpoint on SIGUSR2.\n");
checkpoint_timer.it_interval.tv_sec=60*60; /* Default timer every hour */
checkpoint_timer.it_interval.tv_sec=checkpoint_time;
checkpoint_timer.it_interval.tv_usec=0;
checkpoint_timer.it_value=checkpoint_timer.it_interval;
setitimer(ITIMER_VIRTUAL,&checkpoint_timer,NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment