[GE dev] Modification in qsub source to match cluster policy

templedf dan.templeton at sun.com
Thu Mar 18 04:36:45 GMT 2010


You should probably consider implementing this approach from a JSV.  
Easier to maintain and more portable.  Thanks for the code!

Daniel

On 3/17/10 2:54 PM, tvsingh wrote:
> sure diff is as follows:
>
> $ diff qsub.c qsub.c_org
> 112,113d111
> <    int has_priority=0;
> <    int has_reservation=0;
> 205,234d202
> <
> <
> <    for (ep=lFirst(opts_all);ep;ep=lNext(ep))
> <             {
> <  /*make sure- there is no advanced reservation */
> <   if(strcmp("-R",lGetString(ep,SPA_switch))==0)
> <                          {
> <                            lSetString(ep,SPA_switch_arg ,"n") ;
> <                            lSetInt(ep,SPA_argval_lIntT ,0) ;
> <                            has_reservation=1;
> <                          }
> <   if(strcmp("-l",lGetString(ep,SPA_switch))==0)
> <                          {
> <                             if( (strstr(lGetString(ep,SPA_switch_arg),"highp") != NULL))has_priority=1;
> <                          }
> <             }
> <     if (has_priority==1&&  has_reservation == 1) {
> <                               for (ep=lFirst(opts_all);ep;ep=lNext(ep)){
> <                                             if(strcmp("-R",lGetString(ep,SPA_switch))==0)
> <                                                                             {
> <                                                                               lSetString(ep,SPA_switch_arg ,"y") ;
> <                                                                               lSetInt(ep,SPA_argval_lIntT ,1) ;
> <                                                                              }
> <                                                                        }
> <                                                  }
> <
> <     if (has_priority==1&&  has_reservation == 0) { fprintf(stderr,"*** Job Not Submitted *** \n Please resubmit the job with -l hp and -R y options\n");
> <                                                          exit_status=99239;
> <                                                          goto Error; }
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=39&dsMessageId=249237
>
> To unsubscribe from this discussion, e-mail: [dev-unsubscribe at gridengine.sunsource.net].
>

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=39&dsMessageId=249303

To unsubscribe from this discussion, e-mail: [dev-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list