IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 1, 2014, 11:01:56 AM (12 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20140206/Ohana/src
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140206/Ohana/src/libdvo/src/dbExtractMeasures.c

    r36589 r36626  
    597597          fieldc = MatchFieldMetadata (measure[0].imageID);
    598598        } else {
    599           fprintf (stderr, "non-parallel Xmos broken\n");
    600           abort();
     599          // fprintf (stderr, "non-parallel Xmos broken\n");
     600          // abort();
    601601          // fieldc = MatchField (measure[0].t, measure[0].photcode);
     602          fieldc = MatchFieldMetadata (measure[0].imageID);
    602603        }
    603604        if (fieldc == NULL) break;
     
    613614          fieldc = MatchFieldMetadata (measure[0].imageID);
    614615        } else {
    615           fprintf (stderr, "non-parallel Xmos broken\n");
    616           abort();
     616          // fprintf (stderr, "non-parallel Xmos broken\n");
     617          // abort();
    617618          // fieldc = MatchField (measure[0].t, measure[0].photcode);
     619          fieldc = MatchFieldMetadata (measure[0].imageID);
    618620        }
    619621        if (fieldc == NULL) break;
     
    630632          mosaic = MatchMosaicMetadata (measure[0].imageID);
    631633        } else {
    632           fprintf (stderr, "non-parallel Xmos broken\n");
    633           abort();
    634           mosaic = MatchMosaic (measure[0].t, measure[0].photcode);
     634          // fprintf (stderr, "non-parallel Xmos broken\n");
     635          // abort();
     636          // mosaic = MatchMosaic (measure[0].t, measure[0].photcode);
     637          mosaic = MatchMosaicMetadata (measure[0].imageID);
    635638        }
    636639        if (mosaic == NULL) break;
     
    646649          mosaic = MatchMosaicMetadata (measure[0].imageID);
    647650        } else {
    648           fprintf (stderr, "non-parallel Xmos broken\n");
    649           abort();
    650           mosaic = MatchMosaic (measure[0].t, measure[0].photcode);
     651          // fprintf (stderr, "non-parallel Xmos broken\n");
     652          // abort();
     653          // mosaic = MatchMosaic (measure[0].t, measure[0].photcode);
     654          mosaic = MatchMosaicMetadata (measure[0].imageID);
    651655        }
    652656        if (mosaic == NULL) break;
  • branches/eam_branches/ipp-20140206/Ohana/src/libohana/src

  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/include/pantasks.h

    r32632 r36626  
    116116
    117117  int active;
    118   int priority;
     118  int nicelevel;
    119119
    120120} Task;
     
    161161
    162162  JobMode     mode;                     /* local or controller? */
    163   int     priority;
     163  int     nicelevel;
    164164  char   *realhost;
    165165
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/include/pcontrol.h

    r36375 r36626  
    120120  int          exit_status;
    121121  int          Reset;
    122   int          priority;
     122  int          nicelevel;
    123123  JobMode      mode;
    124124  JobStat      state;
     
    315315Job   *PullJobByID (IDtype JobID, int *StackID);
    316316Job   *PullJobFromStackByID (int StackID, int ID);
    317 IDtype AddJob (char *hostname, JobMode mode, int timeout, int priority, int argc, char **argv, int Nxhosts, char **xhosts);
     317IDtype AddJob (char *hostname, JobMode mode, int timeout, int nicelevel, int argc, char **argv, int Nxhosts, char **xhosts);
    318318void   DelJob (Job *job);
    319319Host  *UnlinkJobAndHost (Job *job);
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/ControllerOps.c

    r34088 r36626  
    259259  }
    260260 
    261   if (job[0].priority) {
     261  if (job[0].nicelevel) {
    262262    char tmp[64];
    263     snprintf (tmp, 64, " -nice %d", job[0].priority);
     263    snprintf (tmp, 64, " -nice %d", job[0].nicelevel);
    264264    strcat (cmd, tmp);
    265265  }
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/JobOps.c

    r32632 r36626  
    107107    job[0].mode = JOB_CONTROLLER;
    108108  }
    109   job[0].priority = task[0].priority;
     109  job[0].nicelevel = task[0].nicelevel;
    110110
    111111  /* we need our own copy of task[0].argv argc is the number of valid args, like the usual command line.  we
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/LocalJob.c

    r32632 r36626  
    162162
    163163  /* set nice level for the child process -- maybe I should not exit here... */
    164   if (job[0].priority) {
    165       status = setpriority (PRIO_PROCESS, pid, job[0].priority);
     164  if (job[0].nicelevel) {
     165      status = setpriority (PRIO_PROCESS, pid, job[0].nicelevel);
    166166      if (status == -1) {
    167           gprint (GP_ERR, "error setting priority\n");
     167          gprint (GP_ERR, "error setting nice level\n");
    168168          perror ("setpriority: ");
    169169          exit (2);
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/TaskOps.c

    r32632 r36626  
    487487
    488488  NewTask[0].active = TRUE;
    489   NewTask[0].priority = 0;
     489  NewTask[0].nicelevel = 0;
    490490  return (NewTask);
    491491}
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/init.c

    r32632 r36626  
    3434  {1, "halt",       halt,          "halt the scheduler (no job harvesting)"},
    3535  {1, "host",       task_host,     "define host machine for a task"},
    36   {1, "nice",       task_nice,     "set nice priority level for a task"},
     36  {1, "nice",       task_nice,     "set nice level for a task"},
    3737  {1, "ipptool2book", ipptool2book, "convert queue with ipptool output to book"},
    3838  {1, "kill",       kill_job,      "kill job"},
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/init_server.c

    r32632 r36626  
    3535  {1, "delete",     delete_job,    "delete job"},
    3636  {1, "host",       task_host,     "define host machine for a task"},
    37   {1, "nice",       task_nice,     "set nice priority level for a task"},
     37  {1, "nice",       task_nice,     "set nice level for a task"},
    3838  {1, "ipptool2book", ipptool2book, "convert queue with ipptool output to book"},
    3939  {1, "kill",       kill_job,      "kill job"},
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/task_nice.c

    r32632 r36626  
    44
    55  char *endptr = NULL;
    6   int priority;
     6  int nicelevel;
    77  Task *task;
    88
    99  if (argc != 2) {
    10     gprint (GP_ERR, "USAGE: nice (priority)\n");
     10    gprint (GP_ERR, "USAGE: nice (nicelevel)\n");
    1111    return (FALSE);
    1212  }
     
    2020  }
    2121
    22   priority = strtol (argv[1], &endptr, 10);
     22  nicelevel = strtol (argv[1], &endptr, 10);
    2323  if (*endptr) goto fail;
    24   if (priority < 0) goto fail;
    25   if (priority > 20) goto fail;
     24  if (nicelevel < 0) goto fail;
     25  if (nicelevel > 20) goto fail;
    2626
    27   task[0].priority = priority;
     27  task[0].nicelevel = nicelevel;
    2828  JobTaskUnlock();
    2929  return (TRUE);
    3030
    3131fail:
    32     gprint (GP_ERR, "ERROR: nice (priority) -- priority must be an integer 0 to 20\n");
     32    gprint (GP_ERR, "ERROR: nice (nicelevel) -- nicelevel must be an integer 0 to 20\n");
    3333    return (FALSE);
    3434}
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pclient/job.c

    r32632 r36626  
    33int job (int argc, char **argv) {
    44
    5   int i, N, pid, status, priority;
     5  int i, N, pid, status, nicelevel;
    66  char **targv;
    77
    8   priority = 0;
     8  nicelevel = 0;
    99  if ((N = get_argument (argc, argv, "-nice"))) {
    1010    remove_argument (N, &argc, argv);
    11     priority = atoi (argv[N]);
     11    nicelevel = atoi (argv[N]);
    1212    remove_argument (N, &argc, argv);
    1313  }
     
    6262
    6363  /* set nice level for the child process */
    64   if (priority) {
    65       status = setpriority (PRIO_PROCESS, pid, priority);
     64  if (nicelevel) {
     65      status = setpriority (PRIO_PROCESS, pid, nicelevel);
    6666      if (status == -1) {
    67           gprint (GP_ERR, "error setting priority\n");
     67          gprint (GP_ERR, "error setting nicelevel\n");
    6868          perror ("setpriority: ");
    6969          exit (2);
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pcontrol/JobOps.c

    r36375 r36626  
    207207}
    208208
    209 IDtype AddJob (char *hostname, JobMode mode, int timeout, int priority, int argc, char **argv, int Nxhosts, char **xhosts) {
     209IDtype AddJob (char *hostname, JobMode mode, int timeout, int nicelevel, int argc, char **argv, int Nxhosts, char **xhosts) {
    210210
    211211  int JobID;
     
    232232
    233233  job[0].mode     = mode;
    234   job[0].priority = priority;
     234  job[0].nicelevel = nicelevel;
    235235
    236236  job[0].state = 0;
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pcontrol/StartJob.c

    r32632 r36626  
    2525  bzero (line, Nline);
    2626  strcpy (line, "job");
    27   if (job[0].priority) {
     27  if (job[0].nicelevel) {
    2828    char tmp[64];
    29     snprintf (tmp, 64, " -nice %d", job[0].priority);
     29    snprintf (tmp, 64, " -nice %d", job[0].nicelevel);
    3030    strcat (line, tmp);
    3131  }
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pcontrol/job.c

    r32632 r36626  
    55  char *Host = NULL;
    66  char **targv = NULL;
    7   int i, N, Mode, targc, Timeout, priority;
     7  int i, N, Mode, targc, Timeout, nicelevel;
    88  IDtype JobID;
    99  char **xhosts = NULL;
     
    4343  }
    4444
    45   priority = 0;
     45  nicelevel = 0;
    4646  if ((N = get_argument (argc, argv, "-nice"))) {
    4747    remove_argument (N, &argc, argv);
    48     priority = atoi (argv[N]);
     48    nicelevel = atoi (argv[N]);
    4949    remove_argument (N, &argc, argv);
    5050  }
     
    7676
    7777  // a JobID < 0 mean the job was not accepted
    78   JobID = AddJob (Host, Mode, Timeout, priority, targc, targv, Nxhosts, xhosts);
     78  JobID = AddJob (Host, Mode, Timeout, nicelevel, targc, targv, Nxhosts, xhosts);
    7979  gprint (GP_LOG, "JobID: %d\n", (int) JobID);
    8080  return (TRUE);
     
    8282 usage:
    8383    gprint (GP_ERR, "USAGE: job [options] (arg0) (arg1) ... (argN)\n");
    84     gprint (GP_ERR, "  options: -host, +host, -timeout, -xhost (host)\n");
     84    gprint (GP_ERR, "  options: -host, +host, -timeout, -xhost (host) -nice (level)\n");
    8585    gprint (GP_ERR, "  arguments of the form @MAX_THREADS@ will be replaced when the job is launched\n");
    8686
  • branches/eam_branches/ipp-20140206/Ohana/src/opihi/pcontrol/status.c

    r36375 r36626  
    154154
    155155    PrintID (GP_LOG, job[0].JobID);
    156     gprint (GP_LOG, " %2d ", job[0].priority);
     156    gprint (GP_LOG, " %2d ", job[0].nicelevel);
    157157    for (j = 0; j < job[0].argc; j++) {
    158158      gprint (GP_LOG, "%s ", job[0].argv[j]);
Note: See TracChangeset for help on using the changeset viewer.