{"action":"created","issue":{"url":"https://api.github.com/repos/TACC/Lmod/issues/55","labels_url":"https://api.github.com/repos/TACC/Lmod/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/TACC/Lmod/issues/55/comments","events_url":"https://api.github.com/repos/TACC/Lmod/issues/55/events","html_url":"https://github.com/TACC/Lmod/issues/55","id":57702255,"number":55,"title":"ml restore speed","user":{"login":"wpoely86","id":424570,"avatar_url":"https://avatars.githubusercontent.com/u/424570?v=3","gravatar_id":"","url":"https://api.github.com/users/wpoely86","html_url":"https://github.com/wpoely86","followers_url":"https://api.github.com/users/wpoely86/followers","following_url":"https://api.github.com/users/wpoely86/following{/other_user}","gists_url":"https://api.github.com/users/wpoely86/gists{/gist_id}","starred_url":"https://api.github.com/users/wpoely86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpoely86/subscriptions","organizations_url":"https://api.github.com/users/wpoely86/orgs","repos_url":"https://api.github.com/users/wpoely86/repos","events_url":"https://api.github.com/users/wpoely86/events{/privacy}","received_events_url":"https://api.github.com/users/wpoely86/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-14T18:41:31Z","updated_at":"2015-02-17T17:47:02Z","closed_at":null,"body":"Using restore:\r\n```\r\n$ time ml restore psi4-ints \r\nRestoring modules to user's psi4-ints\r\n\r\nreal\t0m1.319s\r\nuser\t0m0.852s\r\nsys\t0m0.296s\r\n```\r\nUsing load directly\r\n```\r\n$ time ml load PSI/4.0b5-ictce-7.1.2-mt HDF5/1.8.13-ictce-7.1.2-serial\r\n\r\nreal\t0m0.413s\r\nuser\t0m0.276s\r\nsys\t0m0.080s\r\n```\r\nIn both case, you end up with exactly the same list of loaded modules. Any reason why the restore is slower than a bunch of loads?"},"comment":{"url":"https://api.github.com/repos/TACC/Lmod/issues/comments/74714355","html_url":"https://github.com/TACC/Lmod/issues/55#issuecomment-74714355","issue_url":"https://api.github.com/repos/TACC/Lmod/issues/55","id":74714355,"user":{"login":"rtmclay","id":2041448,"avatar_url":"https://avatars.githubusercontent.com/u/2041448?v=3","gravatar_id":"","url":"https://api.github.com/users/rtmclay","html_url":"https://github.com/rtmclay","followers_url":"https://api.github.com/users/rtmclay/followers","following_url":"https://api.github.com/users/rtmclay/following{/other_user}","gists_url":"https://api.github.com/users/rtmclay/gists{/gist_id}","starred_url":"https://api.github.com/users/rtmclay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtmclay/subscriptions","organizations_url":"https://api.github.com/users/rtmclay/orgs","repos_url":"https://api.github.com/users/rtmclay/repos","events_url":"https://api.github.com/users/rtmclay/events{/privacy}","received_events_url":"https://api.github.com/users/rtmclay/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T17:47:01Z","updated_at":"2015-02-17T17:47:01Z","body":"Now I think I know what is going on.  Loading a collection does exactly that.  It loads them in the order specified.   But if inside a modulefile it loads the same module that it already loaded. it reloads them.   I just checked.  Each of the 16 modules are loaded twice.  This is not an Lmod bug but a feature. If a modulefile request a load, it loads them.  If you do a purge and then load PSI and HDF5, it probably only loads them once.\r\n\r\nBecause of the fact that your modulefiles are currently written in TCL,  I don't think that you can avoid this problem.  I suspect that the TCL modulefiles are checking to see if a module is not loaded before it tries to load it.  But because of the time when Lmod is doing the translation from TCL -> Lua, the test to see if it loaded fails because it wasn't loaded at the time the translation happens.\r\n"}}