Changeset 33483
- Timestamp:
- Mar 12, 2012, 8:37:16 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/Ohana/src
- Files:
-
- 6 edited
-
libdvo/src/HostTable.c (modified) (3 diffs)
-
relphot/src/BrightCatalog.c (modified) (9 diffs)
-
relphot/src/bcatalog.c (modified) (6 diffs)
-
relphot/src/select_images.c (modified) (1 diff)
-
uniphot/src/setphot.c (modified) (1 diff)
-
uniphot/src/update_dvo_setphot.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/libdvo/src/HostTable.c
r33482 r33483 211 211 // XXX can I set the fd_sets once, since I am not actually closing the fd's? 212 212 213 int globalStatus = TRUE; 214 213 215 int i; 214 216 int Nmax = 0; … … 318 320 if (host->status) { 319 321 fprintf (stdout, "job failed on %s\n", host->hostname); 322 globalStatus = FALSE; 320 323 } 321 324 } else { 322 325 host->status = -1; 323 326 fprintf (stdout, "job exited abnormally on %s\n", host->hostname); 327 globalStatus = FALSE; 324 328 continue; 325 329 } … … 335 339 336 340 escape: 337 return TRUE;338 } 341 return globalStatus; 342 } -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/BrightCatalog.c
r33461 r33483 102 102 measure[i].photcode = photcode[i]; 103 103 } 104 // fprintf (stderr, "loaded data for %lld measures\n", (long long) Nrow);104 fprintf (stderr, "loaded data for %lld measure\n", (long long) Nrow); 105 105 106 106 free (dR ); … … 154 154 average[i].catID = catID[i]; 155 155 } 156 fprintf (stderr, "loaded data for %lld average s\n", (long long) Nrow);156 fprintf (stderr, "loaded data for %lld average\n", (long long) Nrow); 157 157 158 158 free (R ); … … 200 200 secfilt[i].M_80 = M_80[i]; 201 201 } 202 fprintf (stderr, "loaded data for %lld averages\n", (long long) Nrow);202 fprintf (stderr, "loaded data for %lld secfilt\n", (long long) Nrow); 203 203 204 204 free (M ); … … 557 557 dvo_catalog_init (&catalogs->catalog[i], TRUE); 558 558 catalogs->catIDs[i] = 0; 559 catalogs->NAVERAGE[i] = 100;560 catalogs->NMEASURE[i] = 100;559 catalogs->NAVERAGE[i] = 256; 560 catalogs->NMEASURE[i] = 256; 561 561 catalogs->catalog[i].Naverage = 0; 562 562 catalogs->catalog[i].Nmeasure = 0; … … 591 591 592 592 int i; 593 594 int D_NCATALOG = 16; 593 595 594 596 int Nsecfilt = catalogs->Nsecfilt; … … 632 634 633 635 if (catalogs->Ncatalog >= catalogs->NCATALOG) { 634 catalogs->NCATALOG += 16; 636 catalogs->NCATALOG += D_NCATALOG; 637 D_NCATALOG = MAX(2000, 2*D_NCATALOG); 638 635 639 // fprintf (stderr, "realloc catalogs->catalog: old: %llx ", (long long) catalogs->catalog); 636 640 REALLOCATE (catalogs->catalog, Catalog, catalogs->NCATALOG); … … 651 655 dvo_catalog_init (&catalogs->catalog[j], TRUE); 652 656 catalogs->catIDs[j] = 0; 653 catalogs->NAVERAGE[j] = 100;654 catalogs->NMEASURE[j] = 100;657 catalogs->NAVERAGE[j] = 256; 658 catalogs->NMEASURE[j] = 256; 655 659 catalogs->catalog[j].Naverage = 0; 656 660 catalogs->catalog[j].Nmeasure = 0; … … 684 688 catalogs->catalog[Nc].Naverage ++; 685 689 if (catalogs->catalog[Nc].Naverage >= catalogs->NAVERAGE[Nc]) { 686 catalogs->NAVERAGE[Nc] += 100;690 catalogs->NAVERAGE[Nc] += MAX(catalogs->NAVERAGE[Nc], 1024); 687 691 REALLOCATE (catalogs->catalog[Nc].averageT, AverageTiny, catalogs->NAVERAGE[Nc]); 688 692 REALLOCATE (catalogs->catalog[Nc].secfilt, SecFilt, catalogs->NAVERAGE[Nc]*Nsecfilt); … … 701 705 catalogs->catalog[Nc].Nmeasure ++; 702 706 if (catalogs->catalog[Nc].Nmeasure >= catalogs->NMEASURE[Nc]) { 703 catalogs->NMEASURE[Nc] += 100;707 catalogs->NMEASURE[Nc] += MAX(catalogs->NMEASURE[Nc], 4096); 704 708 REALLOCATE (catalogs->catalog[Nc].measureT, MeasureTiny, catalogs->NMEASURE[Nc]); 705 709 } -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/bcatalog.c
r33452 r33483 4 4 5 5 off_t i, j, offset; 6 int found, Ns ;6 int found, Ns, *Nvalid; 7 7 off_t NAVERAGE, NMEASURE, Naverage, Nmeasure, Nm; 8 8 float mag; … … 27 27 subcatalog[0].filename = catalog[0].filename; 28 28 29 // array to count measures with photcodes->equiv to each of the secfilts 30 ALLOCATE (Nvalid, int, Nsecfilt); 31 29 32 // flags used by the photometry analysis (excluding UBERCAL) 30 33 unsigned int PHOTOM_FLAGS = … … 44 47 for (j = 0; j < Nsecfilt; j++) { 45 48 subcatalog[0].secfilt[Nsecfilt*Naverage+j] = catalog[0].secfilt[Nsecfilt*i+j]; 49 Nvalid[j] = 0; // reset the Nvalid array for this star 46 50 } 47 51 … … 86 90 if (!code) continue; 87 91 found = FALSE; 92 int Nsec = -1; // Nsec equivalent for the measurement 88 93 for (Ns = 0; !found && (Ns < Nphotcodes); Ns++) { 89 if (code->equiv == photcodes[Ns][0].code) found = TRUE; 94 if (code->equiv != photcodes[Ns][0].code) continue; 95 found = TRUE; 96 Nsec = GetPhotcodeNsec(code->equiv); 90 97 } 91 98 if (!found) { … … 134 141 if (mag < ImagMin) { Nimag ++; continue; } 135 142 if (mag > ImagMax) { Nimag ++; continue; } 143 } 144 145 // count this measurement as valid for this secfilt entry 146 if (Nsec > -1) { 147 assert (Nsec < Nsecfilt); 148 Nvalid[Nsec] ++; 136 149 } 137 150 … … 162 175 163 176 // XXXX test : what checks do I need to make elsewhere to avoid problems here? 164 if (Nm <= STAR_TOOFEW) { /* enough measurements in band? */177 if (Nm <= STAR_TOOFEW) { /* enough measurements total? */ 165 178 Nmeasure -= Nm; 166 179 Nfew ++; 167 180 continue; 168 181 } 182 int anySecfiltGood = FALSE; 183 for (Ns = 0; Ns < Nsecfilt; Ns++) { /* enough measurements in at least one band? */ 184 if (Nvalid[Ns] <= STAR_TOOFEW) continue; 185 anySecfiltGood = TRUE; 186 } 187 if (!anySecfiltGood) { 188 Nmeasure -= Nm; 189 Nfew ++; 190 continue; 191 } 192 169 193 subcatalog[0].averageT[Naverage].Nmeasure = Nm; 170 194 Naverage ++; -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/select_images.c
r33481 r33483 267 267 REALLOCATE (line_number, off_t, MAX (nimage, 1)); 268 268 free (skycoords); 269 free (RmaxSky); 270 free (index); 269 271 270 272 *Nimage = nimage; -
branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/setphot.c
r33471 r33483 43 43 44 44 if (!IMAGES_ONLY) { 45 update_dvo_setphot (image, Nimage, &flatcorrTable);45 status = update_dvo_setphot (image, Nimage, &flatcorrTable); 46 46 } 47 47 48 // write image table 48 // write image table (even if some remote clients failed) 49 49 if (UPDATE) { 50 50 dvo_image_save (&db, VERBOSE); 51 51 } 52 52 53 if (!status) exit (1); 53 54 exit (0); 54 55 } -
branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot.c
r33480 r33483 147 147 } 148 148 if (!PARALLEL_MANUAL && !PARALLEL_SERIAL) { 149 HostTableWaitJobsGetIO (table, __FILE__, __LINE__); 149 int status = HostTableWaitJobsGetIO (table, __FILE__, __LINE__); 150 if (!status) return FALSE; 150 151 } 151 152
Note:
See TracChangeset
for help on using the changeset viewer.
