Changeset 32585
- Timestamp:
- Oct 28, 2011, 10:06:45 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110906/Ohana/src/opihi
- Files:
-
- 2 added
- 11 edited
-
include/pantasks.h (modified) (1 diff)
-
pantasks/Makefile (modified) (1 diff)
-
pantasks/TaskOps.c (modified) (1 diff)
-
pantasks/init.c (modified) (2 diffs)
-
pantasks/init_server.c (modified) (1 diff)
-
pantasks/task.c (modified) (1 diff)
-
pantasks/task_nice.c (modified) (1 diff)
-
pantasks/test/nice.sh (added)
-
pantasks/test/nice_remote.sh (added)
-
pclient/job.c (modified) (1 diff)
-
pcontrol/JobOps.c (modified) (3 diffs)
-
pcontrol/job.c (modified) (1 diff)
-
pcontrol/status.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110906/Ohana/src/opihi/include/pantasks.h
r32584 r32585 40 40 TASK_END, 41 41 TASK_HOST, 42 TASK_NICE, 42 43 TASK_STDOUT, 43 44 TASK_STDERR, -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pantasks/Makefile
r27995 r32585 83 83 $(SRC)/task.$(ARCH).o \ 84 84 $(SRC)/task_host.$(ARCH).o \ 85 $(SRC)/task_nice.$(ARCH).o \ 85 86 $(SRC)/task_nmax.$(ARCH).o \ 86 87 $(SRC)/task_active.$(ARCH).o \ -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pantasks/TaskOps.c
r32584 r32585 596 596 if (!strcasecmp (command, "END")) hash = TASK_END; 597 597 if (!strcasecmp (command, "HOST")) hash = TASK_HOST; 598 if (!strcasecmp (command, "NICE")) hash = TASK_NICE; 598 599 if (!strcasecmp (command, "NMAX")) hash = TASK_NMAX; 599 600 if (!strcasecmp (command, "ACTIVE")) hash = TASK_ACTIVE; -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pantasks/init.c
r23530 r32585 4 4 int task PROTO((int, char **)); 5 5 int task_host PROTO((int, char **)); 6 int task_nice PROTO((int, char **)); 6 7 int task_nmax PROTO((int, char **)); 7 8 int task_npending PROTO((int, char **)); … … 33 34 {1, "halt", halt, "halt the scheduler (no job harvesting)"}, 34 35 {1, "host", task_host, "define host machine for a task"}, 36 {1, "nice", task_nice, "set nice priority level for a task"}, 35 37 {1, "ipptool2book", ipptool2book, "convert queue with ipptool output to book"}, 36 38 {1, "kill", kill_job, "kill job"}, -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pantasks/init_server.c
r23530 r32585 34 34 {1, "delete", delete_job, "delete job"}, 35 35 {1, "host", task_host, "define host machine for a task"}, 36 {1, "nice", task_nice, "set nice priority level for a task"}, 36 37 {1, "ipptool2book", ipptool2book, "convert queue with ipptool output to book"}, 37 38 {1, "kill", kill_job, "kill job"}, -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pantasks/task.c
r31666 r32585 72 72 case TASK_NMAX: 73 73 case TASK_HOST: 74 case TASK_NICE: 74 75 case TASK_EXIT: 75 76 case TASK_EXEC: -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pantasks/task_nice.c
r32584 r32585 7 7 Task *task; 8 8 9 if (argc != 3) {9 if (argc != 2) { 10 10 gprint (GP_ERR, "USAGE: nice (priority)\n"); 11 11 return (FALSE); -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pclient/job.c
r32584 r32585 3 3 int job (int argc, char **argv) { 4 4 5 int i, pid, status, priority;5 int i, N, pid, status, priority; 6 6 char **targv; 7 7 -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pcontrol/JobOps.c
r32584 r32585 272 272 } 273 273 274 /*** ResortJobStack can be used to adjust priorities based on some info we supply. This 275 is not finished -- to finish this, I need to define the metric of interest and 276 arrange for that to be passed to the jobs in pcontrol 277 274 278 void ResortJobStack (int StackID) { 275 279 … … 277 281 LockStack (stack); 278 282 279 # define SWAPFUNC(A,B){ \280 void *tmpObject = stack[0].object[A];\281 stack[0].object[A] = stack[0].object[B];\282 stack[0].object[B] = tmpObject;\283 void *tmpName = stack[0].name[A];\284 stack[0].name[A] = stack[0].name[B];\285 stack[0].name[B] = tmpName;\286 void *tmpID = stack[0].id[A];\287 stack[0].id[A] = stack[0].id[B];\288 stack[0].id[B] = tmpID;\289 }283 # define SWAPFUNC(A,B){ \ 284 void *tmpObject = stack[0].object[A]; \ 285 stack[0].object[A] = stack[0].object[B]; \ 286 stack[0].object[B] = tmpObject; \ 287 void *tmpName = stack[0].name[A]; \ 288 stack[0].name[A] = stack[0].name[B]; \ 289 stack[0].name[B] = tmpName; \ 290 void *tmpID = stack[0].id[A]; \ 291 stack[0].id[A] = stack[0].id[B]; \ 292 stack[0].id[B] = tmpID; \ 293 } 290 294 291 295 # define COMPARE(A,B)(((Job *)stack[0].object[A]).VALUE < ((Job *)stack[0].object[B]).VALUE) 292 296 293 OHANA_SORT ( N, COMPARE, SWAPFUNC);297 OHANA_SORT (stack[0].Nobject, COMPARE, SWAPFUNC); 294 298 295 299 # undef SWAPFUNC … … 298 302 UnlockStack (stack); 299 303 } 304 305 ***/ -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pcontrol/job.c
r32584 r32585 67 67 } 68 68 69 if (argc < 2) { 70 FREE (Host); 71 goto usage; 72 } 69 if (argc < 2) goto usage; 73 70 74 71 targc = argc - 1; -
branches/eam_branches/ipp-20110906/Ohana/src/opihi/pcontrol/status.c
r21379 r32585 59 59 } 60 60 61 PrintID (GP_LOG, job[0].JobID); 62 gprint (GP_LOG, " %2d ", job[0].priority); 61 63 for (j = 0; j < job[0].argc; j++) { 62 64 gprint (GP_LOG, "%s ", job[0].argv[j]); 63 65 } 64 PrintID (GP_LOG, job[0].JobID);65 66 gprint (GP_LOG, "\n"); 66 67 }
Note:
See TracChangeset
for help on using the changeset viewer.
