IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2013, 3:30:44 PM (13 years ago)
Author:
eugene
Message:

option to specify output format for fits table columns; add dbinsert; pass db info on command line; option to make a guess for vgauss; option to rename a spline; option to get results files for remote clients; some improvments to gstar (sorting, optional fields)

Location:
trunk/Ohana/src/opihi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi

  • trunk/Ohana/src/opihi/dvo/dvo_host_utils.c

    r34749 r35109  
    295295  return TRUE;
    296296}
     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
     300int 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.