IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21164


Ignore:
Timestamp:
Jan 24, 2009, 10:53:00 AM (17 years ago)
Author:
eugene
Message:

more timing notes

Location:
trunk/psphot/doc
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/doc/notes.txt

    r20411 r21164  
     1
     22009.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
     8pikake: grep --color "built models" o4771g0244o.t?.opt.log
     9o4771g0244o.t0.opt.log:    built models for 3156 objects: 0.696490 sec
     10o4771g0244o.t0.opt.log:    built models for 1738 objects: 0.367092 sec
     11o4771g0244o.t1.opt.log:    built models for 3150 objects: 0.746428 sec
     12o4771g0244o.t1.opt.log:    built models for 1745 objects: 0.411406 sec
     13o4771g0244o.t2.opt.log:    built models for 3152 objects: 0.412824 sec
     14o4771g0244o.t2.opt.log:    built models for 1756 objects: 0.241859 sec
     15o4771g0244o.t3.opt.log:    built models for 3151 objects: 0.341083 sec
     16o4771g0244o.t3.opt.log:    built models for 1746 objects: 0.176361 sec
     17o4771g0244o.t4.opt.log:    built models for 3159 objects: 0.235669 sec
     18o4771g0244o.t4.opt.log:    built models for 1741 objects: 0.164474 sec
     19o4771g0244o.t5.opt.log:    built models for 3155 objects: 0.286719 sec
     20o4771g0244o.t5.opt.log:    built models for 1747 objects: 0.165341 sec
     21
     22pikake: grep --color "measure magnitudes" o4771g0244o.t?.opt.log
     23o4771g0244o.t0.opt.log:    measure magnitudes : 4.080628 sec for 4895 objects (2191 with apertures)
     24o4771g0244o.t1.opt.log:    measure magnitudes : 4.155192 sec for 4896 objects (2185 with apertures)
     25o4771g0244o.t2.opt.log:    measure magnitudes : 2.174322 sec for 4909 objects (2190 with apertures)
     26o4771g0244o.t3.opt.log:    measure magnitudes : 1.507431 sec for 4898 objects (2189 with apertures)
     27o4771g0244o.t4.opt.log:    measure magnitudes : 1.174447 sec for 4901 objects (2191 with apertures)
     28o4771g0244o.t5.opt.log:    measure magnitudes : 1.149875 sec for 4903 objects (2194 with apertures)
     29
     30pikake: grep --color "full-frame aperture" o4771g0244o.t?.opt.log
     31o4771g0244o.t0.opt.log:    measure full-frame aperture residuals for 1977 sources: 1.681260 sec
     32o4771g0244o.t1.opt.log:    measure full-frame aperture residuals for 1972 sources: 1.728578 sec
     33o4771g0244o.t2.opt.log:    measure full-frame aperture residuals for 1980 sources: 0.929584 sec
     34o4771g0244o.t3.opt.log:    measure full-frame aperture residuals for 1978 sources: 0.656556 sec
     35o4771g0244o.t4.opt.log:    measure full-frame aperture residuals for 1977 sources: 0.507413 sec
     36o4771g0244o.t5.opt.log:    measure full-frame aperture residuals for 1981 sources: 0.512259 sec
     37
     38pikake: grep --color "fit models" o4771g0244o.t?.opt.log
     39o4771g0244o.t0.opt.log:    fit models: 4.623715 sec for 2011 objects (1904 psf, 45 ext, 62 failed, 1146 skipped)
     40o4771g0244o.t1.opt.log:    fit models: 5.036680 sec for 2006 objects (1901 psf, 45 ext, 60 failed, 1145 skipped)
     41o4771g0244o.t2.opt.log:    fit models: 3.507495 sec for 2014 objects (1912 psf, 44 ext, 58 failed, 1139 skipped)
     42o4771g0244o.t3.opt.log:    fit models: 3.236495 sec for 2012 objects (1906 psf, 44 ext, 62 failed, 1140 skipped)
     43o4771g0244o.t4.opt.log:    fit models: 3.929518 sec for 2013 objects (1906 psf, 44 ext, 63 failed, 1147 skipped)
     44o4771g0244o.t5.opt.log:    fit models: 4.152286 sec for 2012 objects (1903 psf, 45 ext, 64 failed, 1144 skipped)
     45
     46pikake: grep failed o4771g0244o.t?.opt.log | grep --color "moments"
     47o4771g0244o.t0.opt.log:    3161 sources, 3147 moments, 14 failed: 1.288588 sec
     48o4771g0244o.t0.opt.log:    1738 sources, 1698 moments, 40 failed: 0.700303 sec
     49o4771g0244o.t1.opt.log:    3155 sources, 3142 moments, 13 failed: 1.329107 sec
     50o4771g0244o.t1.opt.log:    1745 sources, 1702 moments, 43 failed: 0.739017 sec
     51o4771g0244o.t2.opt.log:    3157 sources, 3144 moments, 13 failed: 0.717423 sec
     52o4771g0244o.t2.opt.log:    1756 sources, 1712 moments, 44 failed: 0.409145 sec
     53o4771g0244o.t3.opt.log:    3156 sources, 3142 moments, 14 failed: 0.510468 sec
     54o4771g0244o.t3.opt.log:    1746 sources, 1702 moments, 44 failed: 0.311198 sec
     55o4771g0244o.t4.opt.log:    3164 sources, 3150 moments, 14 failed: 0.412192 sec
     56o4771g0244o.t4.opt.log:    1741 sources, 1698 moments, 43 failed: 0.240172 sec
     57o4771g0244o.t5.opt.log:    3160 sources, 3144 moments, 16 failed: 0.418781 sec
     58o4771g0244o.t5.opt.log:    1747 sources, 1701 moments, 46 failed: 0.244808 sec
     59
     60pikake: grep --color "complete psphot" o4771g0244o.t?.opt.log
     61o4771g0244o.t0.opt.log:    complete psphot run: 38.044034 sec
     62o4771g0244o.t1.opt.log:    complete psphot run: 39.039324 sec
     63o4771g0244o.t2.opt.log:    complete psphot run: 28.565228 sec
     64o4771g0244o.t3.opt.log:    complete psphot run: 25.380312 sec
     65o4771g0244o.t4.opt.log:    complete psphot run: 24.606107 sec
     66o4771g0244o.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
     72pikake: grep --color "built models" o4771g0244o.t?.no-opt.log
     73o4771g0244o.t0.no-opt.log:    built models for 3160 objects: 0.997456 sec
     74o4771g0244o.t0.no-opt.log:    built models for 1725 objects: 0.523033 sec
     75o4771g0244o.t1.no-opt.log:    built models for 3154 objects: 1.031943 sec
     76o4771g0244o.t1.no-opt.log:    built models for 1725 objects: 0.562166 sec
     77o4771g0244o.t2.no-opt.log:    built models for 3156 objects: 0.563504 sec
     78o4771g0244o.t2.no-opt.log:    built models for 1729 objects: 0.311835 sec
     79o4771g0244o.t3.no-opt.log:    built models for 3155 objects: 0.399958 sec
     80o4771g0244o.t3.no-opt.log:    built models for 1728 objects: 0.235203 sec
     81o4771g0244o.t4.no-opt.log:    built models for 3153 objects: 0.329366 sec
     82o4771g0244o.t4.no-opt.log:    built models for 1726 objects: 0.192076 sec
     83o4771g0244o.t5.no-opt.log:    built models for 3155 objects: 0.408434 sec
     84o4771g0244o.t5.no-opt.log:    built models for 1734 objects: 0.198095 sec
     85
     86pikake: grep --color "measure magnitudes" o4771g0244o.t?.no-opt.log
     87o4771g0244o.t0.no-opt.log:    measure magnitudes : 5.939663 sec for 4886 objects (2187 with apertures)
     88o4771g0244o.t1.no-opt.log:    measure magnitudes : 6.041825 sec for 4880 objects (2189 with apertures)
     89o4771g0244o.t2.no-opt.log:    measure magnitudes : 3.126765 sec for 4886 objects (2192 with apertures)
     90o4771g0244o.t3.no-opt.log:    measure magnitudes : 2.158470 sec for 4884 objects (2188 with apertures)
     91o4771g0244o.t4.no-opt.log:    measure magnitudes : 1.756856 sec for 4880 objects (2192 with apertures)
     92o4771g0244o.t5.no-opt.log:    measure magnitudes : 1.697331 sec for 4890 objects (2188 with apertures)
     93
     94pikake: grep --color "full-frame aperture" o4771g0244o.t?.no-opt.log
     95o4771g0244o.t0.no-opt.log:    measure full-frame aperture residuals for 1976 sources: 2.869795 sec
     96o4771g0244o.t1.no-opt.log:    measure full-frame aperture residuals for 1973 sources: 2.908194 sec
     97o4771g0244o.t2.no-opt.log:    measure full-frame aperture residuals for 1977 sources: 1.545140 sec
     98o4771g0244o.t3.no-opt.log:    measure full-frame aperture residuals for 1977 sources: 1.091451 sec
     99o4771g0244o.t4.no-opt.log:    measure full-frame aperture residuals for 1976 sources: 0.857477 sec
     100o4771g0244o.t5.no-opt.log:    measure full-frame aperture residuals for 1979 sources: 0.860652 sec
     101
     102pikake: grep --color "fit models" o4771g0244o.t?.no-opt.log
     103o4771g0244o.t0.no-opt.log:    fit models: 7.771925 sec for 2011 objects (1902 psf, 45 ext, 64 failed, 1150 skipped)
     104o4771g0244o.t1.no-opt.log:    fit models: 8.053570 sec for 2010 objects (1904 psf, 45 ext, 61 failed, 1145 skipped)
     105o4771g0244o.t2.no-opt.log:    fit models: 5.063026 sec for 2009 objects (1904 psf, 44 ext, 61 failed, 1148 skipped)
     106o4771g0244o.t3.no-opt.log:    fit models: 4.314687 sec for 2012 objects (1905 psf, 44 ext, 63 failed, 1144 skipped)
     107o4771g0244o.t4.no-opt.log:    fit models: 4.147600 sec for 2009 objects (1904 psf, 44 ext, 61 failed, 1145 skipped)
     108o4771g0244o.t5.no-opt.log:    fit models: 4.207860 sec for 2012 objects (1906 psf, 44 ext, 62 failed, 1144 skipped)
     109
     110pikake: grep failed o4771g0244o.t?.no-opt.log | grep --color "moments"
     111o4771g0244o.t0.no-opt.log:    3165 sources, 3151 moments, 14 failed: 2.867193 sec
     112o4771g0244o.t0.no-opt.log:    1725 sources, 1681 moments, 44 failed: 1.513526 sec
     113o4771g0244o.t1.no-opt.log:    3159 sources, 3146 moments, 13 failed: 2.966456 sec
     114o4771g0244o.t1.no-opt.log:    1725 sources, 1685 moments, 40 failed: 1.568208 sec
     115o4771g0244o.t2.no-opt.log:    3161 sources, 3148 moments, 13 failed: 1.590746 sec
     116o4771g0244o.t2.no-opt.log:    1729 sources, 1687 moments, 42 failed: 0.823426 sec
     117o4771g0244o.t3.no-opt.log:    3160 sources, 3146 moments, 14 failed: 1.068936 sec
     118o4771g0244o.t3.no-opt.log:    1728 sources, 1684 moments, 44 failed: 0.603041 sec
     119o4771g0244o.t4.no-opt.log:    3158 sources, 3144 moments, 14 failed: 0.869741 sec
     120o4771g0244o.t4.no-opt.log:    1726 sources, 1685 moments, 41 failed: 0.505545 sec
     121o4771g0244o.t5.no-opt.log:    3160 sources, 3146 moments, 14 failed: 0.830094 sec
     122o4771g0244o.t5.no-opt.log:    1734 sources, 1695 moments, 39 failed: 0.469828 sec
     123
     124pikake: grep --color "complete psphot" o4771g0244o.t?.no-opt.log
     125o4771g0244o.t0.no-opt.log:    complete psphot run: 70.375518 sec
     126o4771g0244o.t1.no-opt.log:    complete psphot run: 71.167205 sec
     127o4771g0244o.t2.no-opt.log:    complete psphot run: 51.237604 sec
     128o4771g0244o.t3.no-opt.log:    complete psphot run: 44.195015 sec
     129o4771g0244o.t4.no-opt.log:    complete psphot run: 41.782608 sec
     130o4771g0244o.t5.no-opt.log:    complete psphot run: 42.483942 sec
     131
     132Not bad: almost a factor of 2 overall.  psphotMagnitudes,
     133psphotApResid, psphotSourceStats all get nearly the max improvement.
     134psphotBlendFit seems to be saturating.  There are a lot of allocs in
     135the main functions: pmSourceFitModel and pmSourceFitSet, which are
     136probably blocking each other.
     137
     1382009.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
    1193
    21942008.10.26
Note: See TracChangeset for help on using the changeset viewer.