~ubuntu-branches/ubuntu/trusty/globus-gram-job-manager-sge/trusty

« back to all changes in this revision

Viewing changes to seg/seg_sge_module.c

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2013-11-11 19:54:48 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20131111195448-6rg6hwus1z2u29z6
Tags: 1.7-1
* Update to Globus Toolkit 5.2.5
* Implement Multi-Arch support

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
        globus_l_sge_logfile_state_t * state);
178
178
 
179
179
 
180
 
/**** RJP 4.2 change -- replace aobve with this  *****/
 
180
/**** RJP 4.2 change -- replace above with this  *****/
181
181
 
182
182
GlobusExtensionDefineModule(globus_seg_sge) =
183
183
{
226
226
    }
227
227
    shutdown_called = GLOBUS_FALSE;
228
228
    callback_count = 0;
229
 
 
 
229
    if (getenv("SEG_SGE_DEBUG") == NULL)
 
230
    {
 
231
        setenv("SEG_SGE_DEBUG", "SEG_SGE_DEBUG_ERROR", 1);
 
232
    }
230
233
    GlobusDebugInit(
231
234
            SEG_SGE,
232
235
            SEG_SGE_DEBUG_INFO
812
815
        rc = stat(state->path, &s);
813
816
        if(rc == 0)
814
817
          {
 
818
            if ((s.st_mode & S_IFREG) == 0)
 
819
            {
 
820
                SEG_SGE_DEBUG(SEG_SGE_DEBUG_ERROR,
 
821
                    ("SEG looks for SGE log file but finds "
 
822
                     "non-regular file at %s\n",
 
823
                    state->path));
 
824
                exit(EXIT_FAILURE);
 
825
            }
815
826
            rc = globus_l_sge_get_file_timestamp(state);
816
827
          } else {
817
828
            SEG_SGE_DEBUG(SEG_SGE_DEBUG_TRACE,
1184
1195
        }
1185
1196
 
1186
1197
        /* Batch accounting: resources consumed by the job  */
1187
 
        if (strstr(fields[1], "acct") == fields[1])
 
1198
        /* 
 
1199
         * UGE reporting file notes that an "extra" acct record is sent to the reporting file at
 
1200
         * midnight for long running jobs. These will be uniquely identified with 
 
1201
         * exit_status (fields[14]) = -1 and should be skipped.  rjporter 05/2013
 
1202
         *
 
1203
         */
 
1204
        if ((strstr(fields[1], "acct") == fields[1]) && !(strstr(fields[14], "-1") == fields[14]))
1188
1205
        {
1189
1206
            char * job_id;
1190
1207
            int failed;