IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 18, 2014, 2:26:53 PM (12 years ago)
Author:
eugene
Message:

fix some errors tracking repeated merges

Location:
branches/eam_branches/ipp-20140214/Ohana/src/dvomerge/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140214/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c

    r34277 r36523  
    167167  off_t i, oldID, newID;
    168168
     169  if (!IDmap->old) {
     170    fprintf (stderr, "input database has image IDs, but no Image table\n");
     171    return FALSE;
     172  }
     173
     174  off_t lastID = IDmap->old[IDmap->Nmap-1];
     175
    169176  for (i = 0; i < catalog[0].Nmeasure; i++) {
    170177    oldID = catalog[0].measure[i].imageID;
    171178    if (oldID == 0) continue;
    172179
    173     if (!IDmap->old) {
    174       fprintf (stderr, "input database has image IDs, but no Image table\n");
    175     }
    176 
    177180    newID = dvo_map_image_ID (IDmap, oldID);
    178181    if (newID == 0) {
     182      if (oldID > lastID) {
     183        fprintf (stderr, "problem with image IDs : input out of range\n");
     184        fprintf (stderr, "old ID: "OFF_T_FMT", last ID: "OFF_T_FMT"\n", oldID, lastID);
     185        exit (2);
     186      }
    179187      if (!IDmap->notFound[oldID]) {
    180188        fprintf (stderr, "cannot find image ID "OFF_T_FMT"\n",  oldID);
  • branches/eam_branches/ipp-20140214/Ohana/src/dvomerge/src/dvomergeUpdate.c

    r35765 r36523  
    111111  SetPhotcodeTable(NULL);
    112112
    113   dvomergeUpdate_catalogs (input, output, outsky, inlist, NsecfiltInput, NsecfiltOutput, &IDmap, secfiltMap);
     113  int status = dvomergeUpdate_catalogs (input, output, outsky, inlist, NsecfiltInput, NsecfiltOutput, &IDmap, secfiltMap);
    114114
    115115  // save the output sky table copy
     
    123123  gettimeofday (&stop, NULL);
    124124  dtime = DTIME (stop, start);
     125
     126  if (!status) {
     127    fprintf (stderr, "ERROR: elapsed time %9.4f sec\n", dtime);
     128    exit (3);
     129  }
     130
    125131  fprintf (stderr, "SUCCESS: elapsed time %9.4f sec\n", dtime);
    126 
    127132  exit (0);
    128133}
  • branches/eam_branches/ipp-20140214/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r36486 r36523  
    140140    }
    141141
     142    dvo_update_image_IDs (IDmap, &incatalog);
     143
    142144    // merge input into the appropriate output tables
    143145    for (j = 0; j < outlist[0].Nregions; j++) {
     
    156158      LoadCatalog (&outcatalog, outlist[0].regions[j], outcatalog.filename, "w", NsecfiltOutput);
    157159
    158       dvo_update_image_IDs (IDmap, &incatalog);
    159160      merge_catalogs_old (outlist[0].regions[j], &outcatalog, &incatalog, RADIUS, secfiltMap);
    160161
    161162      outcatalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
    162163
    163       if (outstat[i].missed) {
     164      if (outstat[j].missed) {
    164165        dmhObjectAdd (outstat[j].history, &outcatalog.header, inStats);
    165166      }
     
    280281  }
    281282  if (!PARALLEL_MANUAL && !PARALLEL_SERIAL) {
    282     HostTableWaitJobsGetIO (table, __FILE__, __LINE__, VERBOSE);
     283    int status = HostTableWaitJobsGetIO (table, __FILE__, __LINE__, VERBOSE);
     284    if (!status) {
     285      fprintf (stderr, "error running one of the remote clients\n");
     286      return status;
     287    }
    283288  }
    284289
Note: See TracChangeset for help on using the changeset viewer.