{"action":"closed","issue":{"url":"https://api.github.com/repos/ssadedin/bpipe/issues/161","labels_url":"https://api.github.com/repos/ssadedin/bpipe/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/ssadedin/bpipe/issues/161/comments","events_url":"https://api.github.com/repos/ssadedin/bpipe/issues/161/events","html_url":"https://github.com/ssadedin/bpipe/issues/161","id":113500841,"number":161,"title":"Better support for environment modules","user":{"login":"humburg","id":3471240,"avatar_url":"https://avatars.githubusercontent.com/u/3471240?v=3","gravatar_id":"","url":"https://api.github.com/users/humburg","html_url":"https://github.com/humburg","followers_url":"https://api.github.com/users/humburg/followers","following_url":"https://api.github.com/users/humburg/following{/other_user}","gists_url":"https://api.github.com/users/humburg/gists{/gist_id}","starred_url":"https://api.github.com/users/humburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humburg/subscriptions","organizations_url":"https://api.github.com/users/humburg/orgs","repos_url":"https://api.github.com/users/humburg/repos","events_url":"https://api.github.com/users/humburg/events{/privacy}","received_events_url":"https://api.github.com/users/humburg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-27T03:47:53Z","updated_at":"2015-10-28T22:20:30Z","closed_at":"2015-10-28T22:20:30Z","body":"I'm trying to set up bpipe for use on SGE (using 7266d7466c809e7642ba5e6a443249b412245b00). This now seems to work for the most part but I haven't managed to get environment modules to work properly (this seems related to #10). Ideally I would like to be able to specify the modules to use either in the pipeline config or for each pipeline module in some way. \r\n\r\nInitially I thought I could just add something like `exec \"module load <module_name>\"` as the first command to be executed for each module but unfortunately that doesn't work. As far as I can tell each `exec` is submitted as a separate job, so they don't share an environment. A construct like this works:\r\n\r\n```\r\nexec \"module load <module_name> && command\"\r\n```\r\nBut that seems a bit clunky (and I think also prevents changes to resource requirements for `command`). A possible solution might be to create a single script for all `exec` statements in a block.\r\n"}}