{"action":"created","issue":{"url":"https://api.github.com/repos/eguil/Density_bining/issues/33","labels_url":"https://api.github.com/repos/eguil/Density_bining/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/eguil/Density_bining/issues/33/comments","events_url":"https://api.github.com/repos/eguil/Density_bining/issues/33/events","html_url":"https://github.com/eguil/Density_bining/issues/33","id":54992769,"number":33,"title":"Performance of binDensity.py","user":{"login":"eguil","id":7075402,"avatar_url":"https://avatars.githubusercontent.com/u/7075402?v=3","gravatar_id":"","url":"https://api.github.com/users/eguil","html_url":"https://github.com/eguil","followers_url":"https://api.github.com/users/eguil/followers","following_url":"https://api.github.com/users/eguil/following{/other_user}","gists_url":"https://api.github.com/users/eguil/gists{/gist_id}","starred_url":"https://api.github.com/users/eguil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eguil/subscriptions","organizations_url":"https://api.github.com/users/eguil/orgs","repos_url":"https://api.github.com/users/eguil/repos","events_url":"https://api.github.com/users/eguil/events{/privacy}","received_events_url":"https://api.github.com/users/eguil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-01-21T08:55:18Z","updated_at":"2015-03-06T10:54:53Z","closed_at":null,"body":"Work to reduce CPU cost of binDensity\r\nCase study: IPSL-CM5A-LR 12 months\r\n Bining CPU analysis tc/tcdel =  0 12\r\n    average cpu1 =  0.06\r\n    average cpu2 =  0.555\r\n    average cpu3 =  0.05\r\n    average cpu4 =  5.4725  <---- see below\r\n    average cpu40 =  0.09\r\n    average cpu5 =  0.204166666667\r\n\r\nIn bining section, the cost is in the interpolation:\r\n\r\n            tcpu3 = timc.clock()\r\n            for i in range(lonN*latN):\r\n                if nomask[i]:\r\n                    z_s [0:N_s,i] = npy.interp(s_s[:,i], szm[:,i], zzm[:,i], right = valmask) ; # depth - consider spline\r\n                    c1_s[0:N_s,i] = npy.interp(z_s[0:N_s,i], zzm[:,i], c1m[:,i], right = valmask) ; # thetao\r\n                    c2_s[0:N_s,i] = npy.interp(z_s[0:N_s,i], zzm[:,i], c2m[:,i], right = valmask) ; # so\r\n            # if level in s_s has lower density than surface, isopycnal is put at surface (z_s = 0)\r\n            tcpu40 = timc.clock()\r\n\r\nOverall cost:\r\n   CPU of chunk inits         = 9.93\r\n   CPU of density bining      = 77.18\r\n   CPU of masking and var def = 12.06\r\n   CPU of annual mean compute = 11.74\r\n   CPU of interpolation       = 4.6\r\n   CPU of zonal mean          = 8.15\r\n   CPU of persistence compute = 44.51\r\n   CPU of chunk               = 168.48\r\n   Max memory use 3.414428 GB\r\n [ Time stamp 21/01/2015 00:44:16 ]\r\n Max memory use 3.414428 GB\r\n Ratio to grid*nyears 4.06161364074 kB/unit(size*nyears)\r\n CPU use, elapsed 181.36 241.048659086\r\n Ratio to grid*nyears 17.9779807405 1.e-6 sec/unit(size*nyears)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/eguil/Density_bining/issues/comments/77541377","html_url":"https://github.com/eguil/Density_bining/issues/33#issuecomment-77541377","issue_url":"https://api.github.com/repos/eguil/Density_bining/issues/33","id":77541377,"user":{"login":"eguil","id":7075402,"avatar_url":"https://avatars.githubusercontent.com/u/7075402?v=3","gravatar_id":"","url":"https://api.github.com/users/eguil","html_url":"https://github.com/eguil","followers_url":"https://api.github.com/users/eguil/followers","following_url":"https://api.github.com/users/eguil/following{/other_user}","gists_url":"https://api.github.com/users/eguil/gists{/gist_id}","starred_url":"https://api.github.com/users/eguil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eguil/subscriptions","organizations_url":"https://api.github.com/users/eguil/orgs","repos_url":"https://api.github.com/users/eguil/repos","events_url":"https://api.github.com/users/eguil/events{/privacy}","received_events_url":"https://api.github.com/users/eguil/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T10:54:53Z","updated_at":"2015-03-06T10:54:53Z","body":"I am using 2.7.9 on ciclad:\r\n\r\n    /home/ericglod/Density_bining>/home/ericglod/PCMDI_Metrics/PCMDI_METRICS/bin/python --version\r\n    Python 2.7.9\r\n"}}