Changeset 36998
- Timestamp:
- Jul 11, 2014, 8:47:39 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140610/Ohana/src/relphot
- Files:
-
- 6 edited
-
Makefile (modified) (1 diff)
-
include/relphot.h (modified) (1 diff)
-
src/load_catalogs.c (modified) (5 diffs)
-
src/relphot_client.c (modified) (1 diff)
-
src/relphot_images.c (modified) (1 diff)
-
src/relphot_parallel_images.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140610/Ohana/src/relphot/Makefile
r36990 r36998 88 88 $(SRC)/liststats.$(ARCH).o \ 89 89 $(SRC)/initialize.$(ARCH).o \ 90 $(SRC)/syncfile.$(ARCH).o \ 90 91 $(SRC)/load_catalogs.$(ARCH).o \ 91 92 $(SRC)/reload_catalogs.$(ARCH).o \ -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/include/relphot.h
r36995 r36998 351 351 void liststats_setmode PROTO((StatType *stats, char *strmode)); 352 352 int liststats PROTO((double *value, double *dvalue, double *wvalue, int N, StatType *stats)); 353 Catalog *load_catalogs PROTO((SkyList *skylist, int *Ncatalog, int hostID, char *hostpath ));354 Catalog *load_catalogs_parallel PROTO((SkyList *sky, int *Ncatalog ));353 Catalog *load_catalogs PROTO((SkyList *skylist, int *Ncatalog, int hostID, char *hostpath, char *syncfile)); 354 Catalog *load_catalogs_parallel PROTO((SkyList *sky, int *Ncatalog, char *syncfile)); 355 355 356 356 SkyList *load_images PROTO((FITS_DB *db, char *regionName, SkyRegion *region)); -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/load_catalogs.c
r36630 r36998 12 12 // if this function is called with a specified hostID, then only the fraction of the 13 13 // database hosted by that hostID is loaded 14 Catalog *load_catalogs (SkyList *skylist, int *Ncatalog, int hostID, char *hostpath ) {14 Catalog *load_catalogs (SkyList *skylist, int *Ncatalog, int hostID, char *hostpath, char *syncfile) { 15 15 16 16 off_t i, Nmeas, Nstar, Nmeas_total, Nstar_total; … … 19 19 // XXX need to decide how to determine PARALLEL mode... 20 20 if (PARALLEL && !hostID) { 21 catalog = load_catalogs_parallel (skylist, Ncatalog );21 catalog = load_catalogs_parallel (skylist, Ncatalog, syncfile); 22 22 return catalog; 23 23 } … … 92 92 // in regular relphot, we shutdown here; in relphot_client, we generate and return an empty table (for consistency) 93 93 94 // if we are running with parallel_images but not a parallel database, we need to 95 // release the lock so the next image host can proceed 96 if (!hostID && syncfile) { 97 update_sync_file (syncfile, 1); 98 } 99 94 100 // XXX consider only returning the populated catalogs 95 101 *Ncatalog = skylist[0].Nregions; … … 105 111 // CATDIR is supplied globally 106 112 # define DEBUG 1 107 Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog ) {113 Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog, char *syncfile) { 108 114 109 115 char uniquer[12]; … … 206 212 } 207 213 214 // update syncfile here (save lots of I/O time): 215 216 // at this point, the remote relastro_client jobs are done loading their data. in a 217 // parallel_images mode, the next image host can be launched while this image host now 218 // reads that 219 220 // NOTE: if I let all hosts load blindly, I saturate the data clients with too many 221 // relphot_client requests. I need to have the master mediate this. the master 222 // will not launch the next remote job until this one says it is done 223 if (syncfile) { 224 update_sync_file (syncfile, 1); 225 } 226 208 227 // each host generates a BrightCatalog structure, with the measure, average, etc value 209 228 // loaded into a single set of arrays (of MeasureTiny, AverageTiny, Secfilt). I need to -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/relphot_client.c
r36630 r36998 39 39 case MODE_LOAD: { 40 40 int Ncatalog; 41 Catalog *catalog = load_catalogs (skylist, &Ncatalog, HOST_ID, HOSTDIR );41 Catalog *catalog = load_catalogs (skylist, &Ncatalog, HOST_ID, HOSTDIR, NULL); 42 42 if (!catalog) { 43 43 fprintf (stderr, "ERROR loading catalogs from %s\n", CATDIR); -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/relphot_images.c
r36630 r36998 52 52 if (NLOOP > 0) { 53 53 /* load catalog data from region files (hostID is 0 since we are not a client */ 54 catalog = load_catalogs (skylist, &Ncatalog, 0, NULL );54 catalog = load_catalogs (skylist, &Ncatalog, 0, NULL, NULL); 55 55 MARKTIME("-- load catalog data: %f sec\n", dtime); 56 56 -
branches/eam_branches/ipp-20140610/Ohana/src/relphot/src/relphot_parallel_images.c
r36990 r36998 55 55 56 56 /* load catalog data from region files (hostID is 0 since we are not a client */ 57 catalog = load_catalogs (skylist, &Ncatalog, 0, NULL); 57 char *syncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loadcat.sync"); 58 catalog = load_catalogs (skylist, &Ncatalog, 0, NULL, syncfile); 58 59 MARKTIME("-- load catalog data: %f sec\n", dtime); 60 free (syncfile); 61 59 62 client_logger_message ("loaded catalog data\n"); 60 63 61 // NOTE: if I let all hosts load blindly, I saturate the data clients with too many62 // relphot_client requests. I need to have the master mediate this. the master63 // will not launch the next remote job until this one says it is done64 char *syncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loadcat.sync");65 update_sync_file (syncfile, 1);66 67 64 // generate tables go from catID,objID -> catSeq,objSeq 68 65 indexCatalogs (catalog, Ncatalog);
Note:
See TracChangeset
for help on using the changeset viewer.
