Changeset 36626 for branches/eam_branches/ipp-20140206
- Timestamp:
- Apr 1, 2014, 11:01:56 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140206/Ohana/src
- Files:
-
- 16 edited
-
libdvo/src/dbExtractMeasures.c (modified) (4 diffs)
-
libohana/src (modified) (1 prop)
-
opihi/include/pantasks.h (modified) (2 diffs)
-
opihi/include/pcontrol.h (modified) (2 diffs)
-
opihi/pantasks/ControllerOps.c (modified) (1 diff)
-
opihi/pantasks/JobOps.c (modified) (1 diff)
-
opihi/pantasks/LocalJob.c (modified) (1 diff)
-
opihi/pantasks/TaskOps.c (modified) (1 diff)
-
opihi/pantasks/init.c (modified) (1 diff)
-
opihi/pantasks/init_server.c (modified) (1 diff)
-
opihi/pantasks/task_nice.c (modified) (2 diffs)
-
opihi/pclient/job.c (modified) (2 diffs)
-
opihi/pcontrol/JobOps.c (modified) (2 diffs)
-
opihi/pcontrol/StartJob.c (modified) (1 diff)
-
opihi/pcontrol/job.c (modified) (4 diffs)
-
opihi/pcontrol/status.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140206/Ohana/src/libdvo/src/dbExtractMeasures.c
r36589 r36626 597 597 fieldc = MatchFieldMetadata (measure[0].imageID); 598 598 } else { 599 fprintf (stderr, "non-parallel Xmos broken\n");600 abort();599 // fprintf (stderr, "non-parallel Xmos broken\n"); 600 // abort(); 601 601 // fieldc = MatchField (measure[0].t, measure[0].photcode); 602 fieldc = MatchFieldMetadata (measure[0].imageID); 602 603 } 603 604 if (fieldc == NULL) break; … … 613 614 fieldc = MatchFieldMetadata (measure[0].imageID); 614 615 } else { 615 fprintf (stderr, "non-parallel Xmos broken\n");616 abort();616 // fprintf (stderr, "non-parallel Xmos broken\n"); 617 // abort(); 617 618 // fieldc = MatchField (measure[0].t, measure[0].photcode); 619 fieldc = MatchFieldMetadata (measure[0].imageID); 618 620 } 619 621 if (fieldc == NULL) break; … … 630 632 mosaic = MatchMosaicMetadata (measure[0].imageID); 631 633 } 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); 635 638 } 636 639 if (mosaic == NULL) break; … … 646 649 mosaic = MatchMosaicMetadata (measure[0].imageID); 647 650 } 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); 651 655 } 652 656 if (mosaic == NULL) break; -
branches/eam_branches/ipp-20140206/Ohana/src/libohana/src
- Property svn:mergeinfo set to
-
branches/eam_branches/ipp-20140206/Ohana/src/opihi/include/pantasks.h
r32632 r36626 116 116 117 117 int active; 118 int priority;118 int nicelevel; 119 119 120 120 } Task; … … 161 161 162 162 JobMode mode; /* local or controller? */ 163 int priority;163 int nicelevel; 164 164 char *realhost; 165 165 -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/include/pcontrol.h
r36375 r36626 120 120 int exit_status; 121 121 int Reset; 122 int priority;122 int nicelevel; 123 123 JobMode mode; 124 124 JobStat state; … … 315 315 Job *PullJobByID (IDtype JobID, int *StackID); 316 316 Job *PullJobFromStackByID (int StackID, int ID); 317 IDtype AddJob (char *hostname, JobMode mode, int timeout, int priority, int argc, char **argv, int Nxhosts, char **xhosts);317 IDtype AddJob (char *hostname, JobMode mode, int timeout, int nicelevel, int argc, char **argv, int Nxhosts, char **xhosts); 318 318 void DelJob (Job *job); 319 319 Host *UnlinkJobAndHost (Job *job); -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/ControllerOps.c
r34088 r36626 259 259 } 260 260 261 if (job[0]. priority) {261 if (job[0].nicelevel) { 262 262 char tmp[64]; 263 snprintf (tmp, 64, " -nice %d", job[0]. priority);263 snprintf (tmp, 64, " -nice %d", job[0].nicelevel); 264 264 strcat (cmd, tmp); 265 265 } -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/JobOps.c
r32632 r36626 107 107 job[0].mode = JOB_CONTROLLER; 108 108 } 109 job[0]. priority = task[0].priority;109 job[0].nicelevel = task[0].nicelevel; 110 110 111 111 /* 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 162 162 163 163 /* 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); 166 166 if (status == -1) { 167 gprint (GP_ERR, "error setting priority\n");167 gprint (GP_ERR, "error setting nice level\n"); 168 168 perror ("setpriority: "); 169 169 exit (2); -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/TaskOps.c
r32632 r36626 487 487 488 488 NewTask[0].active = TRUE; 489 NewTask[0]. priority= 0;489 NewTask[0].nicelevel = 0; 490 490 return (NewTask); 491 491 } -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/init.c
r32632 r36626 34 34 {1, "halt", halt, "halt the scheduler (no job harvesting)"}, 35 35 {1, "host", task_host, "define host machine for a task"}, 36 {1, "nice", task_nice, "set nice prioritylevel for a task"},36 {1, "nice", task_nice, "set nice level for a task"}, 37 37 {1, "ipptool2book", ipptool2book, "convert queue with ipptool output to book"}, 38 38 {1, "kill", kill_job, "kill job"}, -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/init_server.c
r32632 r36626 35 35 {1, "delete", delete_job, "delete job"}, 36 36 {1, "host", task_host, "define host machine for a task"}, 37 {1, "nice", task_nice, "set nice prioritylevel for a task"},37 {1, "nice", task_nice, "set nice level for a task"}, 38 38 {1, "ipptool2book", ipptool2book, "convert queue with ipptool output to book"}, 39 39 {1, "kill", kill_job, "kill job"}, -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pantasks/task_nice.c
r32632 r36626 4 4 5 5 char *endptr = NULL; 6 int priority;6 int nicelevel; 7 7 Task *task; 8 8 9 9 if (argc != 2) { 10 gprint (GP_ERR, "USAGE: nice ( priority)\n");10 gprint (GP_ERR, "USAGE: nice (nicelevel)\n"); 11 11 return (FALSE); 12 12 } … … 20 20 } 21 21 22 priority= strtol (argv[1], &endptr, 10);22 nicelevel = strtol (argv[1], &endptr, 10); 23 23 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; 26 26 27 task[0]. priority = priority;27 task[0].nicelevel = nicelevel; 28 28 JobTaskUnlock(); 29 29 return (TRUE); 30 30 31 31 fail: 32 gprint (GP_ERR, "ERROR: nice ( priority) -- prioritymust be an integer 0 to 20\n");32 gprint (GP_ERR, "ERROR: nice (nicelevel) -- nicelevel must be an integer 0 to 20\n"); 33 33 return (FALSE); 34 34 } -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pclient/job.c
r32632 r36626 3 3 int job (int argc, char **argv) { 4 4 5 int i, N, pid, status, priority;5 int i, N, pid, status, nicelevel; 6 6 char **targv; 7 7 8 priority= 0;8 nicelevel = 0; 9 9 if ((N = get_argument (argc, argv, "-nice"))) { 10 10 remove_argument (N, &argc, argv); 11 priority= atoi (argv[N]);11 nicelevel = atoi (argv[N]); 12 12 remove_argument (N, &argc, argv); 13 13 } … … 62 62 63 63 /* 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); 66 66 if (status == -1) { 67 gprint (GP_ERR, "error setting priority\n");67 gprint (GP_ERR, "error setting nicelevel\n"); 68 68 perror ("setpriority: "); 69 69 exit (2); -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pcontrol/JobOps.c
r36375 r36626 207 207 } 208 208 209 IDtype AddJob (char *hostname, JobMode mode, int timeout, int priority, int argc, char **argv, int Nxhosts, char **xhosts) {209 IDtype AddJob (char *hostname, JobMode mode, int timeout, int nicelevel, int argc, char **argv, int Nxhosts, char **xhosts) { 210 210 211 211 int JobID; … … 232 232 233 233 job[0].mode = mode; 234 job[0]. priority = priority;234 job[0].nicelevel = nicelevel; 235 235 236 236 job[0].state = 0; -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pcontrol/StartJob.c
r32632 r36626 25 25 bzero (line, Nline); 26 26 strcpy (line, "job"); 27 if (job[0]. priority) {27 if (job[0].nicelevel) { 28 28 char tmp[64]; 29 snprintf (tmp, 64, " -nice %d", job[0]. priority);29 snprintf (tmp, 64, " -nice %d", job[0].nicelevel); 30 30 strcat (line, tmp); 31 31 } -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pcontrol/job.c
r32632 r36626 5 5 char *Host = NULL; 6 6 char **targv = NULL; 7 int i, N, Mode, targc, Timeout, priority;7 int i, N, Mode, targc, Timeout, nicelevel; 8 8 IDtype JobID; 9 9 char **xhosts = NULL; … … 43 43 } 44 44 45 priority= 0;45 nicelevel = 0; 46 46 if ((N = get_argument (argc, argv, "-nice"))) { 47 47 remove_argument (N, &argc, argv); 48 priority= atoi (argv[N]);48 nicelevel = atoi (argv[N]); 49 49 remove_argument (N, &argc, argv); 50 50 } … … 76 76 77 77 // 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); 79 79 gprint (GP_LOG, "JobID: %d\n", (int) JobID); 80 80 return (TRUE); … … 82 82 usage: 83 83 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"); 85 85 gprint (GP_ERR, " arguments of the form @MAX_THREADS@ will be replaced when the job is launched\n"); 86 86 -
branches/eam_branches/ipp-20140206/Ohana/src/opihi/pcontrol/status.c
r36375 r36626 154 154 155 155 PrintID (GP_LOG, job[0].JobID); 156 gprint (GP_LOG, " %2d ", job[0]. priority);156 gprint (GP_LOG, " %2d ", job[0].nicelevel); 157 157 for (j = 0; j < job[0].argc; j++) { 158 158 gprint (GP_LOG, "%s ", job[0].argv[j]);
Note:
See TracChangeset
for help on using the changeset viewer.
