IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36578


Ignore:
Timestamp:
Mar 7, 2014, 2:44:39 PM (12 years ago)
Author:
eugene
Message:

correct handling of REGION_HOST_ID and neighbor; uniquify relastro temp data

Location:
branches/eam_branches/ipp-20140206/Ohana/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/indexCatalogs.c

    r36574 r36578  
    1010  int i;
    1111  off_t j;
     12
     13  if (!Ncatalog) return TRUE;
    1214
    1315  // find the max value of catID
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/load_catalogs.c

    r35105 r36578  
    115115Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog) {
    116116
     117  char uniquer[12];
     118  int TIME = time(NULL);
     119  int PID = getpid();
     120  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
     121
    117122  // load the list of hosts
    118123  HostTable *table = HostTableLoad (CATDIR, sky->hosts);
     
    131136
    132137    ALLOCATE (table->hosts[i].results, char, 1024);
    133     snprintf (table->hosts[i].results, 1024, "%s/relastro.catalog.subset.dat", table->hosts[i].pathname);
     138    snprintf (table->hosts[i].results, 1024, "%s/relastro.catalog.%s.dat", table->hosts[i].pathname, uniquer);
    134139
    135140    // options / arguments that can affect relastro_client -load:
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro_parallel_images.c

    r36577 r36578  
    4848  MARKTIME("-- load catalog data: %f sec\n", dtime);
    4949 
    50   if (Ncatalog == 0) {
    51     fprintf (stderr, "ERROR: no valid data for relastro, exiting\n");
    52     exit (2);
    53   }
    54 
    5550  // generate tables go from catID,objID -> catSeq,objSeq
    5651  indexCatalogs (catalog, Ncatalog);
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/share_images_pos.c

    r36577 r36578  
    5353  for (i = 0; i < regionHosts->Nhosts; i++) {
    5454    if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue;
    55     if ((REGION_HOST_ID > -1) && !regionHosts->hosts[i].isNeighbor) continue;
     55    if (REGION_HOST_ID && !regionHosts->hosts[i].isNeighbor) continue;
    5656
    5757    char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagepos.sync");
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/share_mean_pos.c

    r36577 r36578  
    6767  for (i = 0; i < regionHosts->Nhosts; i++) {
    6868    if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue;
    69     if ((REGION_HOST_ID > -1) && !regionHosts->hosts[i].isNeighbor) continue;
     69    if (REGION_HOST_ID && !regionHosts->hosts[i].isNeighbor) continue;
    7070
    7171    char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanpos.sync");
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/help.c

    r36516 r36578  
    22
    33void relphot_usage (void) {
    4   fprintf (stderr, "ERROR: USAGE: relphot (photcode[s]) -region RA RA DEC DEC\n");
    5   fprintf (stderr, "       or:    relphot (photcode[s]) -catalog (name)\n");
    6   fprintf (stderr, "       or:    relphot -averages -region RA RA DEC DEC\n");
    7   fprintf (stderr, "       or:    relphot -apply-offsets -region RA RA DEC DEC\n");
    8   fprintf (stderr, "       or:    relphot -parallel-regions -region-hosts (RegionFile)\n");
    9   fprintf (stderr, "       or:    relphot -parallel-images (ImageTable) -region-hosts (RegionFile)\n");
     4  fprintf (stderr, "ERROR: USAGE: relphot (photcodes) -images\n");
     5  fprintf (stderr, "       or:    relphot -averages\n");
     6  fprintf (stderr, "       or:    relphot -apply-offsets\n");
     7  fprintf (stderr, "       or:    relphot (photcodes) -parallel-regions -region-hosts (RegionFile)\n");
     8  fprintf (stderr, "       or:    relphot (photcodes) -parallel-images (ImageTable) -region-hosts (RegionFile)\n\n");
     9  fprintf (stderr, "  regions:    -region RA RA DEC DEC)\n");
     10  fprintf (stderr, "       or:    -catalog (name)\n");
    1011  fprintf (stderr, "  use -h for more usage information\n");
    1112  exit (2);
     
    2122
    2223show_help:
    23   fprintf (stderr, "ERROR: USAGE: relphot (photcode[s]) -region RA RA DEC DEC\n");
    24   fprintf (stderr, "       or:    relphot (photcode[s]) -catalog (name)\n");
    25   fprintf (stderr, "       or:    relphot -averages -region RA RA DEC DEC\n");
    26   fprintf (stderr, "       or:    relphot -apply-offsets -region RA RA DEC DEC\n");
    27   fprintf (stderr, "       or:    relphot -parallel-regions ()\n");
    28   fprintf (stderr, "       or:    relphot -parallel-images ()\n");
     24  fprintf (stderr, "ERROR: USAGE: relphot (photcodes) -images\n");
     25  fprintf (stderr, "       or:    relphot -averages\n");
     26  fprintf (stderr, "       or:    relphot -apply-offsets\n");
     27  fprintf (stderr, "       or:    relphot (photcodes) -parallel-regions -region-hosts (RegionFile)\n");
     28  fprintf (stderr, "       or:    relphot (photcodes) -parallel-images (ImageTable) -region-hosts (RegionFile)\n\n");
     29  fprintf (stderr, "  regions:    -region RA RA DEC DEC)\n");
     30  fprintf (stderr, "       or:    -catalog (name)\n");
    2931  fprintf (stderr, "  options: \n");
    3032  fprintf (stderr, "  -time (start) (stop)\n");
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/load_catalogs.c

    r36516 r36578  
    8989
    9090  fprintf (stderr, "using "OFF_T_FMT" of "OFF_T_FMT" stars ("OFF_T_FMT" of "OFF_T_FMT" measurements)\n", Nstar, Nstar_total, Nmeas, Nmeas_total);
    91   if (!hostID && (Nstar < 1)) Shutdown ("%s", "ERROR: no stars match the minimum requirements; exiting \n");
     91  if (!hostID && !REGION_HOST_ID && (Nstar < 1)) Shutdown ("%s", "ERROR: no stars match the minimum requirements; exiting \n");
    9292  // in regular relphot, we shutdown here; in relphot_client, we generate and return an empty table (for consistency)
    93    
    9493
    9594  // XXX consider only returning the populated catalogs
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/share_image_mags.c

    r36577 r36578  
    5353  for (i = 0; i < regionHosts->Nhosts; i++) {
    5454    if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue;
    55     if ((REGION_HOST_ID > -1) && !regionHosts->hosts[i].isNeighbor) continue;
     55    if (REGION_HOST_ID && !regionHosts->hosts[i].isNeighbor) continue;
    5656
    5757    char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.sync");
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/share_mean_mags.c

    r36577 r36578  
    7777    // if (not_neighbor(host[i])) continue;
    7878    if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue;
    79     if ((REGION_HOST_ID > -1) && !regionHosts->hosts[i].isNeighbor) continue;
     79    if (REGION_HOST_ID && !regionHosts->hosts[i].isNeighbor) continue;
    8080
    8181    char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.sync");
Note: See TracChangeset for help on using the changeset viewer.