IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23512


Ignore:
Timestamp:
Mar 25, 2009, 11:12:55 AM (17 years ago)
Author:
eugene
Message:

check on SubmitJob result, delete job if needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/eam_branch_20090322/Ohana/src/opihi/pantasks/CheckTasks.c

    r23484 r23512  
    77  int status;
    88  float time_running, next_timeout, fuzz;
    9   // struct timeval now;
    109
    1110  // actual maximum delay is controlled in job_threads.c
     
    6665    }
    6766
    68     // gettimeofday (&now, (void *) NULL);
    69     // fprintf (stderr, "t1: %d %6d  - \n", now.tv_sec, now.tv_usec);
    70 
    7167    /* check if there are errors with this task */
    7268    if (!ValidateTask (task, TRUE)) {
     
    7470    }
    7571   
    76     // gettimeofday (&now, (void *) NULL);
    77     // fprintf (stderr, "t2: %d %6d  - \n", now.tv_sec, now.tv_usec);
    78 
    7972    /* construct job from task */
    8073    job = CreateJob (task);
    8174    if (DEBUG) fprintf (stderr, "create job: (%zx) %d of %d\n", (size_t) job[0].stdout_buff.buffer, job[0].stdout_buff.Nbuffer, job[0].stdout_buff.Nalloc);
    8275
    83     // gettimeofday (&now, (void *) NULL);
    84     // fprintf (stderr, "t3: %d %6d  - \n", now.tv_sec, now.tv_usec);
    85 
    86     /* execute job - XXX add status test */
    87     SubmitJob (job);
    88 
    89     // fprintf (stderr, "nl: %d %6d  - ",
    90     // task[0].last.tv_sec, task[0].last.tv_usec);
    91 
    92     /* increment job counters */
    93     task[0].Njobs ++;
    94     task[0].Npending ++;
    95 
    96     // fprintf (stderr, "%d %6d\n",
    97     // task[0].last.tv_sec, task[0].last.tv_usec);
     76    /* execute job */
     77    if (!SubmitJob (job)) {
     78      DeleteJob (job);
     79      continue;
     80    }
     81    task[0].Njobs ++; // number of jobs successfully submitted
    9882
    9983    /* increment Nrun for inclusive ranges with Nmax */
Note: See TracChangeset for help on using the changeset viewer.