[torqueusers] How can we cancel a job array with qdel of torque4.1.0?[SOLVED]

Go Yoshimura go-yoshimura at sstc.co.jp
Wed Sep 5 05:15:58 MDT 2012


Hi!

- It seems that if we add -t option, jobname should have [].
- I'm not sure this is good approach but
  if we edit torque-4.1.1/src/cmds/qdel.c so that "[]" is added to job_id,
    we can cancel jobs in a job array with qdel.
 
((qdel.c modification))   
[test01 at torque02 cmds]$ pwd
/usr/local/src/torque-4.1.1/src/cmds
[test01 at torque02 cmds]$ diff -u qdel.c qdel.c.orig 
--- qdel.c	2012-09-05 19:23:32.000000000 +0900
+++ qdel.c.orig	2012-08-25 05:42:48.000000000 +0900
@@ -31,7 +31,6 @@
   int any_failed = 0;
   int purge_completed = FALSE;
   int located = FALSE;
-  int tflg = FALSE;
   char *pc;
 
   char job_id[PBS_MAXCLTJOBID]; /* from the command line */
@@ -134,7 +133,6 @@
         snprintf(extend,sizeof(extend),"%s%s",
           ARRAY_RANGE,
           pc);
-        tflg = 1;
 
         break;
 
@@ -211,11 +209,7 @@
     /* check to see if user specified 'all' to delete all jobs */
 
     strcpy(job_id, argv[optind]);
-    /* add [] to job_id if with -t option */
-    if ( tflg != FALSE ) {
-      strcat(job_id, "[]");
-      tflg = FALSE;
-    }
+
     if (get_server(job_id, job_id_out, server_out))
       {
       fprintf(stderr, "qdel: illegally formed job identifier: %s\n",

((qdel -t test))
[test01 at torque02 ~]$ qstat -t
Job id                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
445[5].torque02            STDIN-5          test01          00:00:00 C batch          
445[6].torque02            STDIN-6          test01          00:00:00 C batch          
445[7].torque02            STDIN-7          test01          00:00:00 C batch          
445[8].torque02            STDIN-8          test01          00:00:00 C batch          
446[1].torque02            STDIN-1          test01                 0 R batch          
446[2].torque02            STDIN-2          test01                 0 R batch          
446[3].torque02            STDIN-3          test01                 0 R batch          
446[4].torque02            STDIN-4          test01                 0 R batch          
446[5].torque02            STDIN-5          test01                 0 R batch          
446[6].torque02            STDIN-6          test01                 0 R batch          
446[7].torque02            STDIN-7          test01                 0 R batch          
446[8].torque02            STDIN-8          test01                 0 R batch          
[test01 at torque02 ~]$ /dev/shm/usr/local/torque/bin/qdel -t 5-8 446
[test01 at torque02 ~]$ qdel -t 1-4 446 
qdel: Unauthorized Request  MSG=must have operator or manager privilege to use -m parameter 446.torque02

thank you
go
---

----
Go Yoshimura <go-yoshimura at sstc.co.jp>
Scalable Systems Co., Ltd.  <http://www.sstc.co.jp/>
Osaka Office            HONMACHI-COLLABO Bldg. 4F, 4-4-2 Kita-kyuhoji-machi, Chuo-ku, Osaka 541-0057 Japan
              Tel: 81-6-6224-4115
Tokyo Kojimachi Office  BUREX Kojimachi 11F, 3-5-2 Kojimachi, Chiyoda-ku, Tokyo 102-0083 Japan 
              Tel: 81-3-5875-4718 Fax: 81-3-3237-7612              



More information about the torqueusers mailing list