Changeset 98


Ignore:
Timestamp:
11/26/13 18:11:20 (6 years ago)
Author:
mmamonski
Message:

Torque 4, on site fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/pbs_conn.c

    r96 r98  
    1818 */ 
    1919 
    20  #ifdef HAVE_CONFIG_H 
     20#ifdef HAVE_CONFIG_H 
    2121#       include <config.h> 
    2222#endif 
     
    3737#include <signal.h> 
    3838#include <unistd.h> 
     39 
    3940 
    4041 
     
    154155} 
    155156 
    156 #define HAS_PBS_SUBMIT_HASH              
    157 #ifdef HAS_PBS_SUBMIT_HASH 
    158  
    159 #include <qsub_functions.h> 
     157#ifdef HAVE_PBS_SUBMIT_HASH 
     158 
     159 
     160#include <torque4.h> 
    160161 
    161162void set_job_defaults(job_info *ji) { 
    162   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_c, CHECKPOINT_UNSPECIFIED, STATIC_DATA); 
    163  
    164   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_h, NO_HOLD, STATIC_DATA); 
    165  
    166   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_j, NO_JOIN, STATIC_DATA); 
    167  
    168   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_k, NO_KEEP, STATIC_DATA); 
    169  
    170   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_m, MAIL_AT_ABORT, STATIC_DATA); 
    171  
    172   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_p, DEFAULT_PRIORITY, STATIC_DATA); 
    173  
    174   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_r, "FALSE", STATIC_DATA); 
    175   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_f, "FALSE", STATIC_DATA); 
     163  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_c, CHECKPOINT_UNSPECIFIED, STATIC_DATA); 
     164 
     165  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_h, NO_HOLD, STATIC_DATA); 
     166 
     167  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_j, NO_JOIN, STATIC_DATA); 
     168 
     169  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_k, NO_KEEP, STATIC_DATA); 
     170 
     171  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_m, MAIL_AT_ABORT, STATIC_DATA); 
     172 
     173  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_p, DEFAULT_PRIORITY, STATIC_DATA); 
     174 
     175  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_r, "FALSE", STATIC_DATA); 
     176  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_f, "FALSE", STATIC_DATA); 
    176177   
    177   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->client_attr, "pbs_dprefix", "#PBS", STATIC_DATA); 
    178   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_job_radix, "0", STATIC_DATA); 
    179   _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji->mm, &ji->job_attr, ATTR_v, ""); 
     178  hash_add_or_exit_c(&ji->mm, &ji->client_attr, "pbs_dprefix", "#PBS", STATIC_DATA); 
     179  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_job_radix, "0", STATIC_DATA); 
     180  hash_add_or_exit_c(&ji->mm, &ji->job_attr, ATTR_v, "", ENV_DATA); 
    180181 
    181182 
     
    192193        memset(&ji, 0, sizeof(job_info)); 
    193194 
    194         if (_Z11memmgr_initPP6memmgri(&ji.mm, 8192) != PBSE_NONE) /* do not want to use g++ just for this file*/ 
     195        if (memmgr_init_c(&ji.mm, 8192) != PBSE_NONE) /* do not want to use g++ just for this file*/ 
    195196          { 
    196197                pbsdrmaa_exc_raise_pbs( "memmgr_init", connection_fd); 
     
    201202        for (p = attrib; p; p = p->next) { 
    202203                if (p->resource) { 
    203                         _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji.mm, &ji.res_attr, p->resource, p->value); 
     204                        hash_add_or_exit_c(&ji.mm, &ji.res_attr, p->resource, p->value, CMDLINE_DATA); 
    204205                } else { 
    205                         _Z16hash_add_or_exitPP6memmgrPP8job_dataPKcS6_i(&ji.mm, &ji.job_attr, p->name, p->value); 
     206                        hash_add_or_exit_c(&ji.mm, &ji.job_attr, p->name, p->value, CMDLINE_DATA); 
    206207                } 
    207208        } 
     
    223224        jobname_copy = fsd_strdup(new_jobname); 
    224225 
    225         _Z14memmgr_destroyPP6memmgr(&ji.mm); 
     226        memmgr_destroy_c(&ji.mm); 
    226227 
    227228        return jobname_copy; 
     
    246247retry: 
    247248 
    248 #ifdef HAS_PBS_SUBMIT_HASH 
     249#ifdef HAVE_PBS_SUBMIT_HASH 
    249250                job_id = pbs_submit_4_wrapper(self->connection_fd, attrib, script, destination); 
    250251#else 
Note: See TracChangeset for help on using the changeset viewer.