Changeset 35406
- Timestamp:
- Apr 16, 2013, 1:10:03 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130307/Ohana/src/delstar
- Files:
-
- 1 added
- 5 edited
-
Makefile (modified) (2 diffs)
-
include/delstar.h (modified) (2 diffs)
-
src/ImageIDsOps.c (added)
-
src/args.c (modified) (1 diff)
-
src/delete_duplicate_images.c (modified) (3 diffs)
-
src/delstar_client.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130307/Ohana/src/delstar/Makefile
r35237 r35406 38 38 $(SRC)/find_matches.$(ARCH).o \ 39 39 $(SRC)/parse_time.$(ARCH).o \ 40 $(SRC)/ImageIDsOps.$(ARCH).o \ 40 41 $(SRC)/check_permissions.$(ARCH).o \ 41 42 $(SRC)/Shutdown.$(ARCH).o … … 49 50 $(SRC)/delete_photcodes.$(ARCH).o \ 50 51 $(SRC)/delete_photcodes_single.$(ARCH).o \ 52 $(SRC)/ImageIDsOps.$(ARCH).o \ 51 53 $(SRC)/Shutdown.$(ARCH).o 52 54 -
branches/eam_branches/ipp-20130307/Ohana/src/delstar/include/delstar.h
r35243 r35406 117 117 int delete_duplicate_images (int hostID, char *hostpath, FITS_DB *db); 118 118 int delete_duplicate_image_measures (int hostID, char *hostpath, IndexArray *imageID); 119 int delete_duplicate_image_measures_parallel (SkyList *sky );119 int delete_duplicate_image_measures_parallel (SkyList *sky, IndexArray *imageID); 120 120 int delete_duplicate_image_measures_catalog (Catalog *catalog, IndexArray *imageID); 121 121 … … 123 123 IndexArray *make_index_array (Image *image, off_t Nimage, int mode); 124 124 125 IndexArray *ImageIDLoad(char *filename); 126 int ImageIDSave(char *filename, IndexArray *imageID); -
branches/eam_branches/ipp-20130307/Ohana/src/delstar/src/args.c
r35237 r35406 328 328 remove_argument (N, &argc, argv); 329 329 } 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 } 330 335 331 336 if (MODE == MODE_NONE) delstar_client_usage (); -
branches/eam_branches/ipp-20130307/Ohana/src/delstar/src/delete_duplicate_images.c
r35405 r35406 84 84 // launch the remote jobs 85 85 if (PARALLEL && !hostID) { 86 int status = delete_duplicate_image_measures_parallel (skylist );86 int status = delete_duplicate_image_measures_parallel (skylist, imageID); 87 87 return status; 88 88 } … … 132 132 // write out the subset table of image information 133 133 char imageFile[512]; 134 snprintf (imageFile, 512, "%s/Image s.subset.dat", CATDIR);135 136 if (!Image SubsetSave (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"); 138 138 exit (1); 139 139 } 140 141 140 142 141 // launch the delstar_client jobs to the parallel hosts … … 167 166 168 167 fprintf (stderr, "command: %s\n", command); 169 170 fprintf (stderr, "parallel version is not ready (need to save / load the imageID array\n");171 168 172 169 if (PARALLEL_MANUAL) continue; -
branches/eam_branches/ipp-20130307/Ohana/src/delstar/src/delstar_client.c
r34844 r35406 6 6 int main (int argc, char **argv) { 7 7 8 char imageFile[512]; 9 8 10 SetSignals (); 9 11 ConfigInit (&argc, argv); 10 12 args_client (argc, argv); 11 13 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 26 14 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; 27 27 case MODE_IMAGEFILE: 28 28 break;
Note:
See TracChangeset
for help on using the changeset viewer.
