IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35406


Ignore:
Timestamp:
Apr 16, 2013, 1:10:03 PM (13 years ago)
Author:
eugene
Message:

enable parallel delstar

Location:
branches/eam_branches/ipp-20130307/Ohana/src/delstar
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130307/Ohana/src/delstar/Makefile

    r35237 r35406  
    3838$(SRC)/find_matches.$(ARCH).o     \
    3939$(SRC)/parse_time.$(ARCH).o       \
     40$(SRC)/ImageIDsOps.$(ARCH).o       \
    4041$(SRC)/check_permissions.$(ARCH).o \
    4142$(SRC)/Shutdown.$(ARCH).o         
     
    4950$(SRC)/delete_photcodes.$(ARCH).o \
    5051$(SRC)/delete_photcodes_single.$(ARCH).o \
     52$(SRC)/ImageIDsOps.$(ARCH).o       \
    5153$(SRC)/Shutdown.$(ARCH).o         
    5254
  • branches/eam_branches/ipp-20130307/Ohana/src/delstar/include/delstar.h

    r35243 r35406  
    117117int delete_duplicate_images (int hostID, char *hostpath, FITS_DB *db);
    118118int delete_duplicate_image_measures (int hostID, char *hostpath, IndexArray *imageID);
    119 int delete_duplicate_image_measures_parallel (SkyList *sky);
     119int delete_duplicate_image_measures_parallel (SkyList *sky, IndexArray *imageID);
    120120int delete_duplicate_image_measures_catalog (Catalog *catalog, IndexArray *imageID);
    121121
     
    123123IndexArray *make_index_array (Image *image, off_t Nimage, int mode);
    124124
     125IndexArray *ImageIDLoad(char *filename);
     126int ImageIDSave(char *filename, IndexArray *imageID);
  • branches/eam_branches/ipp-20130307/Ohana/src/delstar/src/args.c

    r35237 r35406  
    328328    remove_argument (N, &argc, argv);
    329329  }
     330  if ((N = get_argument (argc, argv, "-dup-images"))) {
     331    if (MODE != MODE_NONE) usage();
     332    MODE = MODE_DUP_IMAGES;
     333    remove_argument (N, &argc, argv);
     334  }
    330335
    331336  if (MODE == MODE_NONE) delstar_client_usage ();
  • branches/eam_branches/ipp-20130307/Ohana/src/delstar/src/delete_duplicate_images.c

    r35405 r35406  
    8484  // launch the remote jobs
    8585  if (PARALLEL && !hostID) {
    86     int status = delete_duplicate_image_measures_parallel (skylist);
     86    int status = delete_duplicate_image_measures_parallel (skylist, imageID);
    8787    return status;
    8888  }
     
    132132  // write out the subset table of image information
    133133  char imageFile[512];
    134   snprintf (imageFile, 512, "%s/Images.subset.dat", CATDIR);
    135 
    136   if (!ImageSubsetSave (imageFile, image, Nimage)) {
    137     fprintf (stderr, "failed to write image subset\n");
     134  snprintf (imageFile, 512, "%s/ImageIDs.tmp.fits", CATDIR);
     135
     136  if (!ImageIDSave (imageFile, imageID)) {
     137    fprintf (stderr, "failed to write image ID table\n");
    138138    exit (1);
    139139  }
    140 
    141140
    142141  // launch the delstar_client jobs to the parallel hosts
     
    167166
    168167    fprintf (stderr, "command: %s\n", command);
    169 
    170     fprintf (stderr, "parallel version is not ready (need to save / load the imageID array\n");
    171168
    172169    if (PARALLEL_MANUAL) continue;
  • branches/eam_branches/ipp-20130307/Ohana/src/delstar/src/delstar_client.c

    r34844 r35406  
    66int main (int argc, char **argv) {
    77
     8  char imageFile[512];
     9
    810  SetSignals ();
    911  ConfigInit (&argc, argv);
    1012  args_client (argc, argv);
    1113
    12   // load the current sky table (layout of all SkyRegions)
    13   SkyTable *sky = SkyTableLoadOptimal (CATDIR, NULL, NULL, TRUE, -1, VERBOSE);
    14   if (!sky) {
    15       fprintf (stderr, "ERROR running loading sky table from %s\n", CATDIR);
    16       exit (2);
    17   }
    18   SkyTableSetFilenames (sky, CATDIR, "cpt");
    19 
    20   SkyList *skylist = SkyListByPatch (sky, -1, &UserPatch);
    21   if (!skylist) {
    22       fprintf (stderr, "ERROR setting up skylist for %s\n", CATDIR);
    23       exit (2);
    24   }
    25 
    2614  switch (MODE) {
     15    case MODE_DUP_IMAGES:
     16      // read the subset table of image information
     17      snprintf (imageFile, 512, "%s/ImageIDs.tmp.fits", CATDIR);
     18     
     19      IndexArray *imageID = ImageIDLoad (imageFile);
     20      if (!imageID) {
     21        fprintf (stderr, "failed to read image ID table\n");
     22        exit (1);
     23      }
     24      if (!delete_duplicate_image_measures (HOST_ID, HOSTDIR, imageID)) exit (1);
     25      exit (0);
     26      break;
    2727    case MODE_IMAGEFILE:
    2828      break;
Note: See TracChangeset for help on using the changeset viewer.