{"action":"created","issue":{"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1807","repository_url":"https://api.github.com/repos/NOAA-PMEL/Ferret","labels_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1807/labels{/name}","comments_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1807/comments","events_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1807/events","html_url":"https://github.com/NOAA-PMEL/Ferret/issues/1807","id":277099168,"number":1807,"title":"understanding dynamic memory management","user":{"login":"karlmsmith","id":16406727,"avatar_url":"https://avatars0.githubusercontent.com/u/16406727?v=4","gravatar_id":"","url":"https://api.github.com/users/karlmsmith","html_url":"https://github.com/karlmsmith","followers_url":"https://api.github.com/users/karlmsmith/followers","following_url":"https://api.github.com/users/karlmsmith/following{/other_user}","gists_url":"https://api.github.com/users/karlmsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/karlmsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlmsmith/subscriptions","organizations_url":"https://api.github.com/users/karlmsmith/orgs","repos_url":"https://api.github.com/users/karlmsmith/repos","events_url":"https://api.github.com/users/karlmsmith/events{/privacy}","received_events_url":"https://api.github.com/users/karlmsmith/received_events","type":"User","site_admin":false},"labels":[{"id":323826823,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":758374647,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/GFDL:%20low","name":"GFDL: low","color":"1d76db","default":false},{"id":757390771,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/P:%20low","name":"P: low","color":"c5def5","default":false},{"id":758304201,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/S:%20minor","name":"S: minor","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-27T17:17:10Z","updated_at":"2017-11-27T17:17:10Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Reported by andrew wittenberg on 18 May 2017 00:06 UTC**\nI'm having trouble with the example on page 4 of the dynamic memory management notes at:\r\n\r\n[create a file containing 1e8 (double precision) numbers:\r\n\r\n```\r\n \tNOAA/PMEL TMAP\r\n \tFERRET v7.12 (optimized)\r\n \tLinux 2.6.32-696.1.1.el6.x86_64 64-bit - 05/16/17\r\n \t17-May-17 19:52     \r\n\r\nyes? set mem/size=1000\r\nyes? let a = x[gx=1:1000:1](https://docs.google.com/document/d/1DiFRaxGYJ2p-HgKYn8w9jNOAj0E9Jdj6wZjjVihTZSw]\r\n\r\n\r\nFirst) + y[+ t[gt=1:100:1](gy=1:1000:1])\r\nyes? save/clob/file=a.nc a\r\n LISTing to file a.nc\r\nyes? quit\r\n```\r\n\r\nThen compute a time average:\r\n\r\n```\r\n \tNOAA/PMEL TMAP\r\n \tFERRET v7.12 (optimized)\r\n \tLinux 2.6.32-696.1.1.el6.x86_64 64-bit - 05/16/17\r\n \t17-May-17 19:53     \r\n\r\nyes? set mem/size=10\r\nyes? use a.nc\r\nyes? load a[sho mem\r\n    SET MEMORY/SIZE: 10 megawords\r\n    Peak demand: 7 megawords\r\n    Current cache: 7 megawords\r\n```\r\n\r\nWhy is the cache 7 Mw, when the result should be only 2 Mw (1e6 double-precision numbers)?\r\n\r\nAnd in an older version of Ferret (say, 6.9) without the dynamic splitting, I get:\r\n\r\n```\r\n \tNOAA/PMEL TMAP\r\n \tFERRET v6.9  \r\n \tLinux 2.6.32-431.5.1.el6.x86_64 64-bit - 04/03/14\r\n \t17-May-17 20:02     \r\n\r\nyes? use a.nc\r\nyes? set mem/size=10\r\n Cached data cleared from memory\r\nyes? load a[l=@ave](l=@ave]\r\nyes?)\r\n```\r\n\r\nI thought the old version would've tried to load the whole 200 Mw of data into the 10 Mw of memory, to compute the 2 Mw result.  So why was no error issued there? \r\n\n\nMigrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/2535"},"comment":{"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/comments/347254638","html_url":"https://github.com/NOAA-PMEL/Ferret/issues/1807#issuecomment-347254638","issue_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1807","id":347254638,"user":{"login":"karlmsmith","id":16406727,"avatar_url":"https://avatars0.githubusercontent.com/u/16406727?v=4","gravatar_id":"","url":"https://api.github.com/users/karlmsmith","html_url":"https://github.com/karlmsmith","followers_url":"https://api.github.com/users/karlmsmith/followers","following_url":"https://api.github.com/users/karlmsmith/following{/other_user}","gists_url":"https://api.github.com/users/karlmsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/karlmsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlmsmith/subscriptions","organizations_url":"https://api.github.com/users/karlmsmith/orgs","repos_url":"https://api.github.com/users/karlmsmith/repos","events_url":"https://api.github.com/users/karlmsmith/events{/privacy}","received_events_url":"https://api.github.com/users/karlmsmith/received_events","type":"User","site_admin":false},"created_at":"2017-11-27T17:17:10Z","updated_at":"2017-11-27T17:17:10Z","author_association":"CONTRIBUTOR","body":"**Comment by ansley.b.manke on 18 May 2017 00:32 UTC**\nFerret has always split up many sorts of calculations in directions other than the one we're doing the transformation on. The new feature is that it can now split along the of the transformed axis. Here's an example which in older versions of Ferret it wold split the calculation on the Y axis, doing the time average for all-T on subsets in Y and then putting the result back together.\r\n\r\nIn v7.12, it'll split in T which should be more efficient, splitting in the \"slowest\" direction of the grid. If we were loading data from different time-step files it would mean opening each file just once instead of multiple times.  \r\n\r\nHere's a case where the output of SET MODE DIAGNOSTIC is pretty clear.  Try this with a newer and older version.\r\n\r\n\r\n```\r\nset mode diagnostic\r\nset mem/siz=10\r\nuse a.nc\r\nload a[l=@ave]\r\n```\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"karlmsmith"}}