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

Go Yoshimura go-yoshimura at sstc.co.jp
Thu Sep 6 07:01:24 MDT 2012


Hi!

- I'm sorry disturbing you but we found the good approach.
  qdel -t 4-8 479[]
- How to cancel jobs in a job array with qdel 
  is
  adding "[]" to jobid.
   (Good)  qdel -t 4-8 479[]  
   (Bad)   qdel -t 4-8 479


[test01 at torque02 ~]$ qstat -t
Job id                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
479[1].torque02            NPB01-1          test01                 0 Q batch          
479[2].torque02            NPB01-2          test01                 0 Q batch          
479[3].torque02            NPB01-3          test01                 0 Q batch          
479[4].torque02            NPB01-4          test01                 0 Q batch          
479[5].torque02            NPB01-5          test01                 0 Q batch          
479[6].torque02            NPB01-6          test01                 0 Q batch          
479[7].torque02            NPB01-7          test01                 0 Q batch          
479[8].torque02            NPB01-8          test01                 0 Q batch          
[test01 at torque02 ~]$ qdel -t 4-8 479
qdel: Unauthorized Request  MSG=must have operator or manager privilege to use -m parameter 479.torque02.ahoaho
[test01 at torque02 ~]$ qdel -t 4-8 479[]
[test01 at torque02 ~]$ qstat -t
Job id                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
479[1].torque02            NPB01-1          test01                 0 R batch          
479[2].torque02            NPB01-2          test01                 0 R batch          
479[3].torque02            NPB01-3          test01                 0 Q batch          
479[4].torque02            NPB01-4          test01                 0 C batch          
479[5].torque02            NPB01-5          test01                 0 C batch          
479[6].torque02            NPB01-6          test01                 0 C batch          
479[7].torque02            NPB01-7          test01                 0 C batch          
479[8].torque02            NPB01-8          test01                 0 C batch          

thank you
go
---
Go Yoshimura wrote:
>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              
>
>_______________________________________________
>torqueusers mailing list
>torqueusers at supercluster.org
>http://www.supercluster.org/mailman/listinfo/torqueusers

----
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