IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 19, 2007, 3:18:27 PM (19 years ago)
Author:
eugene
Message:

removed usleep from job and task threads; increased controller timeout; added verbosity; fixed quit controller; added check points to pcontrol thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/CheckTasks.c

    r11324 r11898  
    66  Task *task;
    77  int status;
     8  struct timeval now;
    89
    910  /** test all tasks: ready to test? ready to run? **/
     
    1314
    1415    /* ready to test? : check exec period */
    15     if (GetTaskTimer(task[0].last) < task[0].exec_period) continue;
     16    if (GetTaskTimer(task[0].last, FALSE) < task[0].exec_period) continue;
    1617
    1718    /* need to check if the current time is within valid/invalid periods */
     
    2526    }
    2627    if (task[0].NpendingMax && (task[0].Npending >= task[0].NpendingMax)) {
    27         fprintf (stderr, "npending: %d, max npending: %d\n", task[0].Npending, task[0].NpendingMax);
     28        // fprintf (stderr, "npending: %d, max npending: %d\n", task[0].Npending, task[0].NpendingMax);
    2829        gettimeofday (&task[0].last, (void *) NULL);
    2930        continue;
    3031    }
     32
     33    // gettimeofday (&now, (void *) NULL);
     34    // fprintf (stderr, "t0: %d %6d  - \n", now.tv_sec, now.tv_usec);
    3135
    3236    /* ready to run? : run task.exec macro */
     
    3943    }
    4044
     45    // gettimeofday (&now, (void *) NULL);
     46    // fprintf (stderr, "t1: %d %6d  - \n", now.tv_sec, now.tv_usec);
     47
    4148    /* check if there are errors with this task */
    4249    if (!ValidateTask (task, TRUE)) {
     
    4451        continue;
    4552    }
     53   
     54    // gettimeofday (&now, (void *) NULL);
     55    // fprintf (stderr, "t2: %d %6d  - \n", now.tv_sec, now.tv_usec);
    4656
    4757    /* construct job from task */
    4858    job = CreateJob (task);
    4959
     60    // gettimeofday (&now, (void *) NULL);
     61    // fprintf (stderr, "t3: %d %6d  - \n", now.tv_sec, now.tv_usec);
     62
    5063    /* execute job - XXX add status test */
    5164    SubmitJob (job);
     65
     66    // fprintf (stderr, "nl: %d %6d  - ",
     67    // task[0].last.tv_sec, task[0].last.tv_usec);
    5268
    5369    /* reset timer on task (don't do this if Create/Submit fails) (why not??) */
     
    5571    task[0].Njobs ++;
    5672    task[0].Npending ++;
     73
     74    // fprintf (stderr, "%d %6d\n",
     75    // task[0].last.tv_sec, task[0].last.tv_usec);
    5776
    5877    /* increment Nrun for inclusive ranges with Nmax */
Note: See TracChangeset for help on using the changeset viewer.