Changeset 34877 for branches/eam_branches/ipp-20121219/Ohana/src/opihi
- Timestamp:
- Dec 26, 2012, 1:48:44 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20121219/Ohana/src/opihi
- Files:
-
- 3 edited
-
dvo/dvo_host_utils.c (modified) (1 diff)
-
dvo/remote.c (modified) (2 diffs)
-
include/dvoshell.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/Ohana/src/opihi/dvo/dvo_host_utils.c
r34749 r34877 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 // load fields from file 333 for (i = 0; i < table->Nhosts; i++) { 334 335 snprintf (name, 256, "RESULT_FILE:%d", i); 336 set_str_variable (name, table->hosts[i].results); 337 338 // DATA : 0 (unread), 1 (read) 339 snprintf (name, 256, "RESULT_DATA:%d", i); 340 set_int_variable (name, 0); 341 342 // STATUS : 0 (normal exit), -1 (crash), N (failure exit status) 343 snprintf (name, 256, "RESULT_STATUS:%d", i); 344 set_int_variable (name, table->hosts[i].status); 345 } 346 347 free (table); 348 return TRUE; 349 } -
branches/eam_branches/ipp-20121219/Ohana/src/opihi/dvo/remote.c
r34749 r34877 26 26 gprint (GP_ERR, " -v : verbose mode:\n"); 27 27 gprint (GP_ERR, "OR: remote -reload (uniquer)\n"); 28 gprint (GP_ERR, "OR: remote -get-results (uniquer)\n"); 28 29 return FALSE; 29 30 } … … 48 49 } 49 50 51 if ((N = get_argument (argc, argv, "-get-results"))) { 52 remove_argument (N, &argc, argv); 53 if (argc != 2) { 54 gprint (GP_ERR, "USAGE: remote -get-results (uniquer)\n"); 55 gprint (GP_ERR, " (uniquer) is the element in the middle of the results file\n"); 56 gprint (GP_ERR, " eg: dvo.results.XXXXX.YYYYY.fits\n"); 57 return FALSE; 58 } 59 int status = HostTableGetResults (argv[1], VERBOSE); 60 return status; 61 } 62 50 63 // strip of the 'remote' and send the remaining arguments to the remote machine 51 64 int status = HostTableParallelOps (argc - 1, &argv[1], NULL, ReadVectors, 0, VERBOSE); -
branches/eam_branches/ipp-20121219/Ohana/src/opihi/include/dvoshell.h
r34749 r34877 102 102 int HostTableParallelOps PROTO((int argc, char **argv, char *ResultFile, int ReadVectors, int Nelements, int VERBOSE)); 103 103 int HostTableReloadResults PROTO((char *uniquer, int VERBOSE)); 104 int HostTableGetResults PROTO((char *uniquer, int VERBOSE)); 104 105 105 106 # endif // DVOSHELL_H
Note:
See TracChangeset
for help on using the changeset viewer.
