Changeset 21164
- Timestamp:
- Jan 24, 2009, 10:53:00 AM (17 years ago)
- Location:
- trunk/psphot/doc
- Files:
-
- 1 added
- 1 edited
-
notes.txt (modified) (1 diff)
-
timing.v4.txt (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/doc/notes.txt
r20411 r21164 1 2 2009.01.24 3 4 Some results from the threading work below. these are all tests on 5 pikake using a sample GPC1 image. This set uses an optimized 6 build of psLib, psModules, and psphot. 7 8 pikake: grep --color "built models" o4771g0244o.t?.opt.log 9 o4771g0244o.t0.opt.log: built models for 3156 objects: 0.696490 sec 10 o4771g0244o.t0.opt.log: built models for 1738 objects: 0.367092 sec 11 o4771g0244o.t1.opt.log: built models for 3150 objects: 0.746428 sec 12 o4771g0244o.t1.opt.log: built models for 1745 objects: 0.411406 sec 13 o4771g0244o.t2.opt.log: built models for 3152 objects: 0.412824 sec 14 o4771g0244o.t2.opt.log: built models for 1756 objects: 0.241859 sec 15 o4771g0244o.t3.opt.log: built models for 3151 objects: 0.341083 sec 16 o4771g0244o.t3.opt.log: built models for 1746 objects: 0.176361 sec 17 o4771g0244o.t4.opt.log: built models for 3159 objects: 0.235669 sec 18 o4771g0244o.t4.opt.log: built models for 1741 objects: 0.164474 sec 19 o4771g0244o.t5.opt.log: built models for 3155 objects: 0.286719 sec 20 o4771g0244o.t5.opt.log: built models for 1747 objects: 0.165341 sec 21 22 pikake: grep --color "measure magnitudes" o4771g0244o.t?.opt.log 23 o4771g0244o.t0.opt.log: measure magnitudes : 4.080628 sec for 4895 objects (2191 with apertures) 24 o4771g0244o.t1.opt.log: measure magnitudes : 4.155192 sec for 4896 objects (2185 with apertures) 25 o4771g0244o.t2.opt.log: measure magnitudes : 2.174322 sec for 4909 objects (2190 with apertures) 26 o4771g0244o.t3.opt.log: measure magnitudes : 1.507431 sec for 4898 objects (2189 with apertures) 27 o4771g0244o.t4.opt.log: measure magnitudes : 1.174447 sec for 4901 objects (2191 with apertures) 28 o4771g0244o.t5.opt.log: measure magnitudes : 1.149875 sec for 4903 objects (2194 with apertures) 29 30 pikake: grep --color "full-frame aperture" o4771g0244o.t?.opt.log 31 o4771g0244o.t0.opt.log: measure full-frame aperture residuals for 1977 sources: 1.681260 sec 32 o4771g0244o.t1.opt.log: measure full-frame aperture residuals for 1972 sources: 1.728578 sec 33 o4771g0244o.t2.opt.log: measure full-frame aperture residuals for 1980 sources: 0.929584 sec 34 o4771g0244o.t3.opt.log: measure full-frame aperture residuals for 1978 sources: 0.656556 sec 35 o4771g0244o.t4.opt.log: measure full-frame aperture residuals for 1977 sources: 0.507413 sec 36 o4771g0244o.t5.opt.log: measure full-frame aperture residuals for 1981 sources: 0.512259 sec 37 38 pikake: grep --color "fit models" o4771g0244o.t?.opt.log 39 o4771g0244o.t0.opt.log: fit models: 4.623715 sec for 2011 objects (1904 psf, 45 ext, 62 failed, 1146 skipped) 40 o4771g0244o.t1.opt.log: fit models: 5.036680 sec for 2006 objects (1901 psf, 45 ext, 60 failed, 1145 skipped) 41 o4771g0244o.t2.opt.log: fit models: 3.507495 sec for 2014 objects (1912 psf, 44 ext, 58 failed, 1139 skipped) 42 o4771g0244o.t3.opt.log: fit models: 3.236495 sec for 2012 objects (1906 psf, 44 ext, 62 failed, 1140 skipped) 43 o4771g0244o.t4.opt.log: fit models: 3.929518 sec for 2013 objects (1906 psf, 44 ext, 63 failed, 1147 skipped) 44 o4771g0244o.t5.opt.log: fit models: 4.152286 sec for 2012 objects (1903 psf, 45 ext, 64 failed, 1144 skipped) 45 46 pikake: grep failed o4771g0244o.t?.opt.log | grep --color "moments" 47 o4771g0244o.t0.opt.log: 3161 sources, 3147 moments, 14 failed: 1.288588 sec 48 o4771g0244o.t0.opt.log: 1738 sources, 1698 moments, 40 failed: 0.700303 sec 49 o4771g0244o.t1.opt.log: 3155 sources, 3142 moments, 13 failed: 1.329107 sec 50 o4771g0244o.t1.opt.log: 1745 sources, 1702 moments, 43 failed: 0.739017 sec 51 o4771g0244o.t2.opt.log: 3157 sources, 3144 moments, 13 failed: 0.717423 sec 52 o4771g0244o.t2.opt.log: 1756 sources, 1712 moments, 44 failed: 0.409145 sec 53 o4771g0244o.t3.opt.log: 3156 sources, 3142 moments, 14 failed: 0.510468 sec 54 o4771g0244o.t3.opt.log: 1746 sources, 1702 moments, 44 failed: 0.311198 sec 55 o4771g0244o.t4.opt.log: 3164 sources, 3150 moments, 14 failed: 0.412192 sec 56 o4771g0244o.t4.opt.log: 1741 sources, 1698 moments, 43 failed: 0.240172 sec 57 o4771g0244o.t5.opt.log: 3160 sources, 3144 moments, 16 failed: 0.418781 sec 58 o4771g0244o.t5.opt.log: 1747 sources, 1701 moments, 46 failed: 0.244808 sec 59 60 pikake: grep --color "complete psphot" o4771g0244o.t?.opt.log 61 o4771g0244o.t0.opt.log: complete psphot run: 38.044034 sec 62 o4771g0244o.t1.opt.log: complete psphot run: 39.039324 sec 63 o4771g0244o.t2.opt.log: complete psphot run: 28.565228 sec 64 o4771g0244o.t3.opt.log: complete psphot run: 25.380312 sec 65 o4771g0244o.t4.opt.log: complete psphot run: 24.606107 sec 66 o4771g0244o.t5.opt.log: complete psphot run: 24.796387 sec 67 68 Some results from the threading work below. these are all tests on 69 pikake using a sample GPC1 image. This set uses an unoptimized 70 build of psphot (though psLib may be optmized). 71 72 pikake: grep --color "built models" o4771g0244o.t?.no-opt.log 73 o4771g0244o.t0.no-opt.log: built models for 3160 objects: 0.997456 sec 74 o4771g0244o.t0.no-opt.log: built models for 1725 objects: 0.523033 sec 75 o4771g0244o.t1.no-opt.log: built models for 3154 objects: 1.031943 sec 76 o4771g0244o.t1.no-opt.log: built models for 1725 objects: 0.562166 sec 77 o4771g0244o.t2.no-opt.log: built models for 3156 objects: 0.563504 sec 78 o4771g0244o.t2.no-opt.log: built models for 1729 objects: 0.311835 sec 79 o4771g0244o.t3.no-opt.log: built models for 3155 objects: 0.399958 sec 80 o4771g0244o.t3.no-opt.log: built models for 1728 objects: 0.235203 sec 81 o4771g0244o.t4.no-opt.log: built models for 3153 objects: 0.329366 sec 82 o4771g0244o.t4.no-opt.log: built models for 1726 objects: 0.192076 sec 83 o4771g0244o.t5.no-opt.log: built models for 3155 objects: 0.408434 sec 84 o4771g0244o.t5.no-opt.log: built models for 1734 objects: 0.198095 sec 85 86 pikake: grep --color "measure magnitudes" o4771g0244o.t?.no-opt.log 87 o4771g0244o.t0.no-opt.log: measure magnitudes : 5.939663 sec for 4886 objects (2187 with apertures) 88 o4771g0244o.t1.no-opt.log: measure magnitudes : 6.041825 sec for 4880 objects (2189 with apertures) 89 o4771g0244o.t2.no-opt.log: measure magnitudes : 3.126765 sec for 4886 objects (2192 with apertures) 90 o4771g0244o.t3.no-opt.log: measure magnitudes : 2.158470 sec for 4884 objects (2188 with apertures) 91 o4771g0244o.t4.no-opt.log: measure magnitudes : 1.756856 sec for 4880 objects (2192 with apertures) 92 o4771g0244o.t5.no-opt.log: measure magnitudes : 1.697331 sec for 4890 objects (2188 with apertures) 93 94 pikake: grep --color "full-frame aperture" o4771g0244o.t?.no-opt.log 95 o4771g0244o.t0.no-opt.log: measure full-frame aperture residuals for 1976 sources: 2.869795 sec 96 o4771g0244o.t1.no-opt.log: measure full-frame aperture residuals for 1973 sources: 2.908194 sec 97 o4771g0244o.t2.no-opt.log: measure full-frame aperture residuals for 1977 sources: 1.545140 sec 98 o4771g0244o.t3.no-opt.log: measure full-frame aperture residuals for 1977 sources: 1.091451 sec 99 o4771g0244o.t4.no-opt.log: measure full-frame aperture residuals for 1976 sources: 0.857477 sec 100 o4771g0244o.t5.no-opt.log: measure full-frame aperture residuals for 1979 sources: 0.860652 sec 101 102 pikake: grep --color "fit models" o4771g0244o.t?.no-opt.log 103 o4771g0244o.t0.no-opt.log: fit models: 7.771925 sec for 2011 objects (1902 psf, 45 ext, 64 failed, 1150 skipped) 104 o4771g0244o.t1.no-opt.log: fit models: 8.053570 sec for 2010 objects (1904 psf, 45 ext, 61 failed, 1145 skipped) 105 o4771g0244o.t2.no-opt.log: fit models: 5.063026 sec for 2009 objects (1904 psf, 44 ext, 61 failed, 1148 skipped) 106 o4771g0244o.t3.no-opt.log: fit models: 4.314687 sec for 2012 objects (1905 psf, 44 ext, 63 failed, 1144 skipped) 107 o4771g0244o.t4.no-opt.log: fit models: 4.147600 sec for 2009 objects (1904 psf, 44 ext, 61 failed, 1145 skipped) 108 o4771g0244o.t5.no-opt.log: fit models: 4.207860 sec for 2012 objects (1906 psf, 44 ext, 62 failed, 1144 skipped) 109 110 pikake: grep failed o4771g0244o.t?.no-opt.log | grep --color "moments" 111 o4771g0244o.t0.no-opt.log: 3165 sources, 3151 moments, 14 failed: 2.867193 sec 112 o4771g0244o.t0.no-opt.log: 1725 sources, 1681 moments, 44 failed: 1.513526 sec 113 o4771g0244o.t1.no-opt.log: 3159 sources, 3146 moments, 13 failed: 2.966456 sec 114 o4771g0244o.t1.no-opt.log: 1725 sources, 1685 moments, 40 failed: 1.568208 sec 115 o4771g0244o.t2.no-opt.log: 3161 sources, 3148 moments, 13 failed: 1.590746 sec 116 o4771g0244o.t2.no-opt.log: 1729 sources, 1687 moments, 42 failed: 0.823426 sec 117 o4771g0244o.t3.no-opt.log: 3160 sources, 3146 moments, 14 failed: 1.068936 sec 118 o4771g0244o.t3.no-opt.log: 1728 sources, 1684 moments, 44 failed: 0.603041 sec 119 o4771g0244o.t4.no-opt.log: 3158 sources, 3144 moments, 14 failed: 0.869741 sec 120 o4771g0244o.t4.no-opt.log: 1726 sources, 1685 moments, 41 failed: 0.505545 sec 121 o4771g0244o.t5.no-opt.log: 3160 sources, 3146 moments, 14 failed: 0.830094 sec 122 o4771g0244o.t5.no-opt.log: 1734 sources, 1695 moments, 39 failed: 0.469828 sec 123 124 pikake: grep --color "complete psphot" o4771g0244o.t?.no-opt.log 125 o4771g0244o.t0.no-opt.log: complete psphot run: 70.375518 sec 126 o4771g0244o.t1.no-opt.log: complete psphot run: 71.167205 sec 127 o4771g0244o.t2.no-opt.log: complete psphot run: 51.237604 sec 128 o4771g0244o.t3.no-opt.log: complete psphot run: 44.195015 sec 129 o4771g0244o.t4.no-opt.log: complete psphot run: 41.782608 sec 130 o4771g0244o.t5.no-opt.log: complete psphot run: 42.483942 sec 131 132 Not bad: almost a factor of 2 overall. psphotMagnitudes, 133 psphotApResid, psphotSourceStats all get nearly the max improvement. 134 psphotBlendFit seems to be saturating. There are a lot of allocs in 135 the main functions: pmSourceFitModel and pmSourceFitSet, which are 136 probably blocking each other. 137 138 2009.01.22 139 140 working on more psphot threading. So far, I have threaded code for: 141 142 * psphotGuessModel (DONE) : not working so well just yet (see 143 below). Late Update: in recent tests, the result below may have 144 been caused by the unoptimized psLib. 145 146 here are functions for which a modest gain can be realized and which 147 should be easy to thread: 148 149 * psphotMagnitudes (DONE) 150 151 ** this function uses psImageShiftMask to interpolate the source 152 flux to compensate for fractional pixel offsets. This function 153 requires a call to psImageAlloc and a subsequent call to 154 psFree. This probably will make the threading 155 inefficient. However, it is not clear we need to perform this 156 interpolation for all sources: the correction is probably only 157 signficant compared to the errors for the brighter sources. 158 159 ** psImageShiftMask gratuitously calls psImageInterpolationAlloc; 160 perhaps it should accept this as an argument, or perhaps this 161 function should be re-examined. 162 163 * psphotApResid (DONE) 164 165 * this function is basically calling pmSourceMagnitudes, so 166 suffers the same issues as psphotMagnitudes 167 168 * psphotFindDetections (footprints) (fairly tricky, actually) 169 170 ** need to examine the steps in the function. it is not obvious 171 yet what needs to be improved. 172 173 * psphotBlendFit (DONE) 174 175 ** this one will be a little tricky: this function currently 176 extends the source array to add new sources detected as part of 177 psphotFitBlob. I would need to have a way of saving these from 178 each thread, then joining them back together at the end. 179 180 * psphotSourceStats (DONE) 181 182 ** this one includes the allocs to generate the source pixels, but 183 could be split into two steps: 1) generate the complete array 184 of sources; 2) measure the sky, sky variance, and moments. 185 186 Otherwise, this function should be easy: no other allocs or 187 frees, i think. 188 189 * psphotChoosePSF : 190 191 ** need to use the grid technique for the pmPSFtryModel which does 192 the source fitting 1 193 2 194 2008.10.26
Note:
See TracChangeset
for help on using the changeset viewer.
