IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 16, 2012, 7:51:21 AM (14 years ago)
Author:
eugene
Message:

parallelize gstar, update avmatch to work with merged vectors by index; remove elements from dvoshell.h which have moved to libdvo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/gstar.c

    r31667 r33543  
    6868  }
    6969
     70  int PARALLEL = FALSE;
     71  if ((N = get_argument (argc, argv, "-parallel"))) {
     72    remove_argument (N, &argc, argv);
     73    PARALLEL = TRUE;
     74  }
     75
    7076  if (argc != 4) {
    7177    gprint (GP_ERR, "USAGE: gstar RA DEC Radius [-m]\n");
     
    8995  }
    9096
     97  HostTable *table = NULL; 
     98  if (PARALLEL) {
     99    char *CATDIR = GetCATDIR();
     100    table = HostTableLoad (CATDIR, sky->hosts);
     101    if (!table) {
     102      gprint (GP_ERR, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR);
     103      return FALSE;
     104    }   
     105
     106    SkyRegion *region = skylist[0].regions[0];
     107    int hostID = (region->hostFlags & DATA_USE_BCK) ? region->backupID : region->hostID;
     108    int index = table->index[hostID];
     109   
     110    char hostfile[1024];
     111    snprintf (hostfile, 1024, "%s/%s.cpt", table->hosts[index].pathname, region->name);
     112    catalog.filename = hostfile;
     113  } else {
     114    catalog.filename = skylist[0].filename[0];
     115  }
     116
    91117  /* lock, load, unlock catalog */
    92   catalog.filename = skylist[0].filename[0];
    93118  catalog.catflags = GetMeasures ? LOAD_AVES | LOAD_MEAS | LOAD_SECF : LOAD_AVES | LOAD_SECF;
    94119  catalog.Nsecfilt = 0;
Note: See TracChangeset for help on using the changeset viewer.