Ignore:
Timestamp:
04/20/11 17:20:29 (13 years ago)
Author:
mmamonski
Message:

version 1.0.7 release candidate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/submit.c

    • Property svn:keywords set to Id
    r10 r12  
    1 /* $Id: submit.c 386 2011-01-06 18:13:33Z mamonski $ */ 
     1/* $Id$ */ 
    22/* 
    33 *  FedStage DRMAA for PBS Pro 
     
    4646                __attribute__ ((unused)) 
    4747#       endif 
    48         = "$Id: submit.c 386 2011-01-06 18:13:33Z mamonski $"; 
     48        = "$Id$"; 
    4949#endif 
    5050 
     
    546546                        else 
    547547                        { 
    548                                 fsd_exc_raise_fmt(FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE, "Invalid native specification: %s (Invalid resource specification: %s)", resources, arg); 
    549  
     548                                fsd_exc_raise_fmt(FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE, "Invalid native specification: %s (Invalid resource specification: %s)", resources, arg); 
    550549                        } 
    551550                } 
     
    569568        TRY 
    570569          { 
    571                 for (arg = strtok_r(add_attr_copy, ",", &ctxt); arg; arg = strtok_r(NULL, ":",&ctxt) ) 
     570                for (arg = strtok_r(add_attr_copy, ";", &ctxt); arg; arg = strtok_r(NULL, ";",&ctxt) ) 
    572571                { 
    573572                        name = fsd_strdup(strtok_r(arg, "=", &ctxt2)); 
     
    606605 
    607606                TRY 
    608                  { 
     607                  { 
    609608                        for (arg = strtok_r(native_spec_copy, " \t", &ctxt); arg; arg = strtok_r(NULL, " \t",&ctxt) ) { 
    610                                 if (!opt) { 
    611                                         if ( (arg[0] != '-') || ((strlen(arg) != 2) &&  arg[2] != ' ' && arg[1] !='-' ) ) 
     609                                if (!opt) 
     610                                  { 
     611                                        if ( (arg[0] != '-') || (strlen(arg) != 2) ) 
    612612                                                fsd_exc_raise_fmt(FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE, 
    613                                                                 "Invalid native specification: %s", 
    614                                                                 native_specification); 
    615                                         if(arg[1] == '-') { 
    616                                                 parse_additional_attr(pbs_attr, arg+2); 
     613                                                        "Invalid native specification: -o(ption) expected (arg=%s native=%s).", 
     614                                                        arg, native_specification); 
     615 
     616                                                case 'h' : 
     617                                                        pbs_attr->set_attr( pbs_attr, "Hold_Types" , arg ); 
     618                                                        break; 
     619 
     620                                        opt = arg[1]; 
     621 
     622                                        /* handle NO-arg options */ 
     623 
     624                                        switch (opt) { 
     625                                                case 'h' : 
     626                                                        pbs_attr->set_attr( pbs_attr, "Hold_Types" , "u" ); 
     627                                                        break; 
     628                                                default : 
     629                                                        continue; /*no NO-ARG option */ 
    617630                                        } 
    618                                         else { 
    619                                                 opt = arg[1]; 
    620                                         } 
    621                                          
    622                                 } else { 
     631 
     632                                        opt = 0; 
     633                                  } 
     634                                else 
     635                                  { 
    623636                                        switch (opt) { 
    624637                                                 
     
    644657                                                        pbs_attr->set_attr( pbs_attr, "Execution_Time" , arg ); 
    645658                                                        break; 
    646                                                 case 'h' : 
    647                                                         pbs_attr->set_attr( pbs_attr, "Hold_Types" , arg ); 
    648                                                         break; 
    649659                                                case 'A' : 
    650660                                                        pbs_attr->set_attr( pbs_attr, "Account_Name" , arg ); 
     
    672682                                                        break; 
    673683                                                case 'v' : 
    674                                                 case 'V' : 
    675684                                                        pbs_attr->set_attr( pbs_attr, "Variable_List" , arg ); 
    676685                                                        break; 
     
    687696                                                                        native_specification, opt); 
    688697                                        } 
    689  
    690698                                        opt = 0; 
    691699                                } 
Note: See TracChangeset for help on using the changeset viewer.