IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33899


Ignore:
Timestamp:
May 22, 2012, 3:16:33 PM (14 years ago)
Author:
eugene
Message:

add parallel capability to addstar -resort

Location:
branches/eam_branches/ipp-20120405/Ohana/src/addstar
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120405/Ohana/src/addstar/Makefile

    r33896 r33899  
    2929mkcmf       : $(BIN)/mkcmf.$(ARCH)
    3030
    31 all: addstar sedstar load2mass skycells mkcmf loadwise loadsupercos dumpskycells
    32 
    33 INSTALL = addstar sedstar load2mass skycells mkcmf loadwise loadsupercos dumpskycells
     31all: addstar addstar_client sedstar load2mass skycells mkcmf loadwise loadsupercos dumpskycells
     32
     33INSTALL = addstar addstar_client sedstar load2mass skycells mkcmf loadwise loadsupercos dumpskycells
    3434
    3535# I need to fix the client/server version of addstar now that I have dropped Stars
     
    9898$(SRC)/SkyListForStars.$(ARCH).o \
    9999$(SRC)/SkyRegionUtils.$(ARCH).o \
     100$(SRC)/build_links.$(ARCH).o \
    100101$(SRC)/addstar_client.$(ARCH).o \
    101102$(SRC)/args_parallel_client.$(ARCH).o \
     
    298299$(SRC)/SetSignals.$(ARCH).o \
    299300
    300 $(ADDSTARC)   : $(INC)/addstar.h
    301 $(ADDSTARD)   : $(INC)/addstar.h
    302 $(ADDSTART)   : $(INC)/addstar.h
    303 $(ADDSTAR)    : $(INC)/addstar.h
    304 $(SKYCELLS)   : $(INC)/addstar.h
    305 $(DUMPSKYCELLS): $(INC)/addstar.h
    306 $(LOAD-2MASS) : $(INC)/addstar.h $(INC)/2mass.h
    307 $(LOAD-WISE)  : $(INC)/addstar.h $(INC)/WISE.h
    308 $(MKCMF)      : $(INC)/mkcmf.h
    309 
    310 $(BIN)/addstar.$(ARCH)     : $(ADDSTAR)
    311 $(BIN)/addstard.$(ARCH)    : $(ADDSTARD)
    312 $(BIN)/addstart.$(ARCH)    : $(ADDSTART)
    313 $(BIN)/addstarc.$(ARCH)    : $(ADDSTARC)
    314 $(BIN)/mkacc-2mass.$(ARCH) : $(MKACC-2MASS)
    315 $(BIN)/sedstar.$(ARCH)     : $(SEDSTAR)
    316 $(BIN)/load2mass.$(ARCH)   : $(LOAD-2MASS)
    317 $(BIN)/loadwise.$(ARCH)    : $(LOAD-WISE)
    318 $(BIN)/loadsupercos.$(ARCH): $(LOAD-SUPERCOS)
    319 $(BIN)/skycells.$(ARCH)    : $(SKYCELLS)
    320 $(BIN)/dumpskycells.$(ARCH) : $(DUMPSKYCELLS)
    321 $(BIN)/mkcmf.$(ARCH)       : $(MKCMF)
     301$(ADDSTARC)       : $(INC)/addstar.h
     302$(ADDSTARD)       : $(INC)/addstar.h
     303$(ADDSTART)       : $(INC)/addstar.h
     304$(ADDSTAR)        : $(INC)/addstar.h
     305$(ADDSTAR_CLIENT) : $(INC)/addstar.h
     306$(SKYCELLS)       : $(INC)/addstar.h
     307$(DUMPSKYCELLS)   : $(INC)/addstar.h
     308$(LOAD-2MASS)     : $(INC)/addstar.h $(INC)/2mass.h
     309$(LOAD-WISE)      : $(INC)/addstar.h $(INC)/WISE.h
     310$(MKCMF)          : $(INC)/mkcmf.h
     311
     312$(BIN)/addstar.$(ARCH)        : $(ADDSTAR)
     313$(BIN)/addstar_client.$(ARCH) : $(ADDSTAR_CLIENT)
     314$(BIN)/addstard.$(ARCH)       : $(ADDSTARD)
     315$(BIN)/addstart.$(ARCH)       : $(ADDSTART)
     316$(BIN)/addstarc.$(ARCH)       : $(ADDSTARC)
     317$(BIN)/mkacc-2mass.$(ARCH)    : $(MKACC-2MASS)
     318$(BIN)/sedstar.$(ARCH)        : $(SEDSTAR)
     319$(BIN)/load2mass.$(ARCH)      : $(LOAD-2MASS)
     320$(BIN)/loadwise.$(ARCH)       : $(LOAD-WISE)
     321$(BIN)/loadsupercos.$(ARCH)   : $(LOAD-SUPERCOS)
     322$(BIN)/skycells.$(ARCH)       : $(SKYCELLS)
     323$(BIN)/dumpskycells.$(ARCH)   : $(DUMPSKYCELLS)
     324$(BIN)/mkcmf.$(ARCH)          : $(MKCMF)
    322325
    323326# I need to fix the client/server version of addstar now that I have dropped Stars
  • branches/eam_branches/ipp-20120405/Ohana/src/addstar/include/addstar.h

    r33896 r33899  
    6464
    6565/* globals which define database info / data sources (KEEP) */
    66 char   ImageCat[256];
     66char   ImageCat[DVO_MAX_PATH];
    6767char   GSCFILE[256];
    68 char   CATDIR[256];
     68char  *CATDIR;
    6969char   CATMODE[16];    /* raw, mef, split, mysql */
    7070char   CATFORMAT[16];  /* internal, elixir, loneos, panstarrs */
     
    166166/*** addstar prototypes ***/
    167167
    168 AddstarClientOptions ConfigInit   PROTO((int *argc, char **argv));
    169 AddstarClientOptions args         PROTO((int argc, char **argv, AddstarClientOptions options));
     168AddstarClientOptions ConfigInit           PROTO((int *argc, char **argv));
     169AddstarClientOptions args                 PROTO((int argc, char **argv, AddstarClientOptions options));
     170AddstarClientOptions args_parallel_client PROTO((int argc, char **argv, AddstarClientOptions options));
    170171
    171172void       AddToCalibration       PROTO((Average *average, SecFilt *secfilt, Measure *measure, Measure *new, off_t *next, off_t Nstar));
  • branches/eam_branches/ipp-20120405/Ohana/src/addstar/src/ConfigInit.c

    r33653 r33899  
    125125  ScanConfig (config, "TYCHO_DIR",              "%s",  0, TYCHO_DIR);
    126126
     127  // force CATDIR to be absolute (so parallel mode will work)
     128  char tmpcatdir[DVO_MAX_PATH];
     129  GetConfig (config, "CATDIR" ,                 "%s",  0, tmpcatdir);
     130  CATDIR = abspath (tmpcatdir, DVO_MAX_PATH);
     131
    127132  GetConfig (config, "GSCFILE",                 "%s",  0, GSCFILE);
    128   GetConfig (config, "CATDIR",                  "%s",  0, CATDIR);
    129133  GetConfig (config, "PHOTCODE_FILE",           "%s",  0, MasterPhotcodeFile);
    130134  ScanConfig (config, "CATMODE",                "%s",  0, CATMODE);
  • branches/eam_branches/ipp-20120405/Ohana/src/addstar/src/addstar_client.c

    r33896 r33899  
    2424  SkyTableSetFilenames (sky, CATDIR, "cpt");
    2525
    26   if (options.mode == M_RESORT) {
     26  if (options.mode == ADDSTAR_MODE_RESORT) {
    2727    resort_unthreaded (&options, sky, HOST_ID, HOSTDIR);
    2828    exit (0);
  • branches/eam_branches/ipp-20120405/Ohana/src/addstar/src/args_parallel_client.c

    r33896 r33899  
    88//   options.nosort
    99
    10 AddstarClientOptions args (int argc, char **argv, AddstarClientOptions options) {
     10AddstarClientOptions args_parallel_client (int argc, char **argv, AddstarClientOptions options) {
    1111 
    12   int i, N;
    13   int QUALITY_AIRMASS;
     12  int N;
    1413
    1514  NREFSTAR_GROUP = 1; // not used by -resort
     
    2221    help ();
    2322  }
     23
     24  memset (&options, 0, sizeof(AddstarClientOptions));
    2425
    2526  /* basic mode: image, list, refcat */
     
    7374
    7475  /*** modify behavior ***/
    75   /* only add to existing objects */
     76  /* only add to or resort existing objects */
    7677  options.existing_regions = FALSE;
    7778  if ((N = get_argument (argc, argv, "-existing-regions"))) {
     
    8081  }
    8182
    82   /* don't re-sort the measure sequence */
    83   options.nosort = FALSE;
    84   if ((N = get_argument (argc, argv, "-nosort"))) {
    85     options.nosort = TRUE;
    86     remove_argument (N, &argc, argv);
    87   }
    88   /* only add new rows (-update) or re-write complete measure table (forces -nosort) */
    89   options.update = FALSE;
    90   if ((N = get_argument (argc, argv, "-update"))) {
    91     options.update = TRUE;
    92     options.nosort = TRUE;
    93     remove_argument (N, &argc, argv);
    94   }
     83  // resort even tables that claim to have been sorted
    9584  if ((N = get_argument (argc, argv, "-force-sort"))) {
    9685    options.nosort = 3;  // temporary mode to mean 'force-sort'
  • branches/eam_branches/ipp-20120405/Ohana/src/addstar/src/resort_unthreaded.c

    r33896 r33899  
    4040  }
    4141
    42   resort_unthreaded_catalogs (options, 0, NULL)
     42  resort_unthreaded_catalogs (options, skylist, 0, NULL);
    4343
    4444  gettimeofday (&stop, NULL);
    4545  dtime = DTIME (stop, start);
    46   fprintf (stderr, "SUCCESS: elapsed time %9.4f sec for, "OFF_T_FMT" average, "OFF_T_FMT" measure\n", dtime, Naverage, Nmeasure);
     46  fprintf (stderr, "SUCCESS: elapsed time %9.4f sec\n", dtime);
    4747
    4848  return TRUE;
  • branches/eam_branches/ipp-20120405/Ohana/src/addstar/src/resort_unthreaded_catalogs.c

    r33896 r33899  
    11# include "addstar.h"
     2
     3int resort_unthreaded_parallel (AddstarClientOptions *options, SkyList *sky);
    24
    35// pass in options and skylist?
     
    9294
    9395    char tmpline[1024];
    94     if (VERBOSE)       { snprintf (tmpline, 1024, "%s -v",              command);                    strcpy (command, tmpline); }
    95     if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
     96    if (VERBOSE)                   { snprintf (tmpline, 1024, "%s -v",                command); strcpy (command, tmpline); }
     97    if (options->nosort == 3)      { snprintf (tmpline, 1024, "%s -force-sort",       command); strcpy (command, tmpline); }
     98    if (options->existing_regions) { snprintf (tmpline, 1024, "%s -existing-regions", command); strcpy (command, tmpline); }
    9699
    97100    fprintf (stderr, "command: %s\n", command);
Note: See TracChangeset for help on using the changeset viewer.