IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4603


Ignore:
Timestamp:
Jul 24, 2005, 9:20:33 AM (21 years ago)
Author:
eugene
Message:

added Nmax jobs

Location:
trunk/Ohana/src/opihi
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/include/scheduler.h

    r4602 r4603  
    6565  TimeRange *ranges;
    6666
    67   int     Ntotal;  // only construct Ntotal jobs for this task
     67  int     Nmax;  // only construct Ntotal jobs for this task
    6868  int     Njobs;
    6969
  • trunk/Ohana/src/opihi/pantasks/CheckTasks.c

    r4602 r4603  
    1717    /* need to check if the current time is within valid/invalid periods */
    1818    if (!CheckTimeRanges (task[0].ranges, task[0].Nranges)) continue;
     19    if (task[0].Nmax && (task[0].Njobs >= task[0].Nmax)) continue;
    1920
    2021    SetCurrentTask (task[0].name);
  • trunk/Ohana/src/opihi/pantasks/Makefile

    r4602 r4603  
    5252$(SDIR)/controller_output.$(ARCH).o \
    5353$(SDIR)/task.$(ARCH).o \
    54 $(SDIR)/task_command.$(ARCH).o \
    5554$(SDIR)/task_host.$(ARCH).o \
     55$(SDIR)/task_nmax.$(ARCH).o \
    5656$(SDIR)/task_macros.$(ARCH).o \
    5757$(SDIR)/task_trange.$(ARCH).o \
    58 $(SDIR)/task_periods.$(ARCH).o
     58$(SDIR)/task_periods.$(ARCH).o \
     59$(SDIR)/task_command.$(ARCH).o
    5960
    6061libs = \
  • trunk/Ohana/src/opihi/pantasks/TaskOps.c

    r4602 r4603  
    138138  gettimeofday (&tasks[Ntasks].last, (void *) NULL);
    139139  tasks[Ntasks].Njobs = 0;
     140  tasks[Ntasks].Nmax = 0;  /* default value means 'no limit' */
    140141
    141142  Ntasks ++;
  • trunk/Ohana/src/opihi/pantasks/init.c

    r4602 r4603  
    44int task            PROTO((int, char **));
    55int task_host       PROTO((int, char **));
     6int task_nmax       PROTO((int, char **));
    67int task_trange     PROTO((int, char **));
    78int task_macros     PROTO((int, char **));
     
    1920  {"task",       task,         "define a schedulable task"},
    2021  {"host",       task_host,    "define host machine for a task"},
     22  {"nmax",       task_nmax,    "define maximum number of jobs for a task"},
    2123  {"trange",     task_trange,  "define valid/invalid time periods for a task"},
    2224  {"task.exit",  task_macros,  "define exit macros for a task"},
Note: See TracChangeset for help on using the changeset viewer.