Changeset 113 for trunk/oarutils


Ignore:
Timestamp:
Jun 22, 2015, 7:09:25 PM (9 years ago)
Author:
g7moreau
Message:
  • Delay launch of each subjob by one second
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/oarutils/oar-parexec

    r89 r113  
    2929my $sig_transmit;
    3030my $sig_checkpoint = 'USR2';
     31my $job_launch_brake = 1; # one second time brake
    3132
    3233Getopt::Long::GetOptions(
     
    208209# asynchrone start job block
    209210async {
     211   my $timer;
    210212   JOB:
    211213   for my $job (@job) {
     
    228230         }
    229231
     232      # wait to not re-launch oarstat to fast
     233      # equivalent to sleep $job_launch_brake
     234      $timer = AE::now + $job_launch_brake;
     235      while ( AE::now < $timer ) {
     236         # force update of AE time
     237         AE::now_update;
     238         cede;
     239         }
     240
    230241      # take job ressource
    231242      my $job_ressource = $ressources->get;
     
    242253      $fh = unblock $fh;
    243254
    244       my $msg = sprintf "start job %${job_name_maxlen}s / %5i at %s on node %s\n",
    245          $job_name, $job_pid, time, $job_ressource;
     255      my $msg = sprintf "start job %${job_name_maxlen}s / %5i at %s oar job %i on node %s\n",
     256         $job_name, $job_pid, time, $ENV{OAR_JOB_ID}, $job_ressource;
    246257      $log_h->print($msg) if $logtrace;
    247258      print($msg) if $verbose;
     
    302313         # non blocking PID test
    303314         if (waitpid($job_pid, WNOHANG)) {
    304             my $msg = sprintf "end   job %${job_name_maxlen}s / %5i at %s on node %s\n",
     315            my $msg = sprintf "end   job %${job_name_maxlen}s / %5i at %s oar job %i on node %s\n",
    305316               $scheduled{$job_pid}->{name},
    306                $job_pid, time, $scheduled{$job_pid}->{ressource};
     317               $job_pid, time, $ENV{OAR_JOB_ID}, $scheduled{$job_pid}->{ressource};
    307318
    308319            # Job non finish, just suspend if received checkpoint signal
Note: See TracChangeset for help on using the changeset viewer.