Changeset 35109 for trunk/Ohana/src/opihi/dvo/dvo_host_utils.c
- Timestamp:
- Feb 6, 2013, 3:30:44 PM (13 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
dvo/dvo_host_utils.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20121219/Ohana/src/opihi (added) merged: 34858,34876-34877,34886-34887,34890-34891,34895,34898,34901,34903,34935,34999,35096
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/dvo/dvo_host_utils.c
r34749 r35109 295 295 return TRUE; 296 296 } 297 298 // re-gather the remote results files: this can be used in case one of the clients failed, 299 // and has since been re-run 300 int HostTableGetResults (char *uniquer, int VERBOSE) { 301 302 int i; 303 304 // load the list of hosts 305 SkyTable *sky = GetSkyTable(); 306 if (!sky) { 307 gprint (GP_ERR, "failed to load sky table for database\n"); 308 return FALSE; 309 } 310 311 char *CATDIR = GetCATDIR (); 312 if (!CATDIR) { 313 gprint (GP_ERR, "failed to get CATDIR for database\n"); 314 return FALSE; 315 } 316 317 HostTable *table = HostTableLoad (CATDIR, sky->hosts); 318 if (!table) { 319 gprint (GP_ERR, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR); 320 return FALSE; 321 } 322 323 // create the result file list 324 char name[256]; 325 snprintf (name, 256, "RESULT_FILE:n"); 326 set_int_variable (name, table->Nhosts); 327 snprintf (name, 256, "RESULT_DATA:n"); 328 set_int_variable (name, table->Nhosts); 329 snprintf (name, 256, "RESULT_STATUS:n"); 330 set_int_variable (name, table->Nhosts); 331 332 char results[DVO_MAX_PATH]; 333 334 // load fields from file 335 for (i = 0; i < table->Nhosts; i++) { 336 337 // need to save the results filename with the uniquer 338 snprintf (results, DVO_MAX_PATH, "%s/dvo.results.%s.fits", table->hosts[i].pathname, uniquer); 339 340 snprintf (name, 256, "RESULT_FILE:%d", i); 341 set_str_variable (name, results); 342 343 // DATA : 0 (unread), 1 (read) 344 snprintf (name, 256, "RESULT_DATA:%d", i); 345 set_int_variable (name, 0); 346 347 // STATUS : 0 (normal exit), -1 (crash), N (failure exit status) 348 snprintf (name, 256, "RESULT_STATUS:%d", i); 349 set_int_variable (name, table->hosts[i].status); 350 } 351 352 free (table); 353 return TRUE; 354 }
Note:
See TracChangeset
for help on using the changeset viewer.
