Changeset 36623 for trunk/Ohana/src/opihi/pcontrol
- Timestamp:
- Mar 31, 2014, 2:36:01 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
Ohana/src/opihi/pcontrol/JobOps.c (modified) (2 diffs)
-
Ohana/src/opihi/pcontrol/StartJob.c (modified) (1 diff)
-
Ohana/src/opihi/pcontrol/job.c (modified) (4 diffs)
-
Ohana/src/opihi/pcontrol/status.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20140226 (added) merged: 36561,36563,36619-36622
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/pcontrol/JobOps.c
r36375 r36623 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; -
trunk/Ohana/src/opihi/pcontrol/StartJob.c
r32632 r36623 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 } -
trunk/Ohana/src/opihi/pcontrol/job.c
r32632 r36623 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 -
trunk/Ohana/src/opihi/pcontrol/status.c
r36375 r36623 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.
