Changeset 45 for trunk/pbs_drmaa/submit.c
- Timestamp:
- 11/28/11 15:02:58 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pbs_drmaa/submit.c
r37 r45 145 145 const fsd_template_t *pbs_tmpl = self->pbs_job_attributes; 146 146 unsigned i; 147 int tries_left = ((pbsdrmaa_session_t *)self->session)->max_retries_count; 148 int sleep_time = 1; 147 149 148 150 for( i = 0; i < PBSDRMAA_N_PBS_ATTRIBUTES; i++ ) … … 173 175 if (pbsself->pbs_conn >= 0 ) 174 176 pbs_disconnect( pbsself->pbs_conn ); 175 sleep(1); 177 retry_connect: 178 sleep(sleep_time++); 176 179 pbsself->pbs_conn = pbs_connect( pbsself->super.contact ); 177 if( pbsself->pbs_conn < 0 ) 178 pbsdrmaa_exc_raise_pbs( "pbs_connect" ); 180 if( pbsself->pbs_conn < 0) 181 if (tries_left--) 182 goto retry_connect; 183 else 184 pbsdrmaa_exc_raise_pbs( "pbs_connect" ); 179 185 else 180 186 goto retry; … … 612 618 TRY 613 619 { 614 for (arg = strtok_r( native_spec_copy, " \t", &ctxt); arg; arg = strtok_r(NULL, " \t",&ctxt) ) {620 for (arg = strtok_r((char *)native_spec_copy, " \t", &ctxt); arg; arg = strtok_r(NULL, " \t",&ctxt) ) { 615 621 if (!opt) 616 622 { … … 718 724 #endif 719 725 args_list->destroy(args_list); 720 fsd_free( native_spec_copy);726 fsd_free((char *)native_spec_copy); 721 727 } 722 728 END_TRY
Note: See TracChangeset
for help on using the changeset viewer.