{"action":"created","issue":{"url":"https://api.github.com/repos/conda/conda-build/issues/1149","repository_url":"https://api.github.com/repos/conda/conda-build","labels_url":"https://api.github.com/repos/conda/conda-build/issues/1149/labels{/name}","comments_url":"https://api.github.com/repos/conda/conda-build/issues/1149/comments","events_url":"https://api.github.com/repos/conda/conda-build/issues/1149/events","html_url":"https://github.com/conda/conda-build/pull/1149","id":168003316,"number":1149,"title":"Automatically pass through `CPU_COUNT`","user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars.githubusercontent.com/u/3019665?v=3","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-28T02:55:37Z","updated_at":"2016-08-04T20:11:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/conda/conda-build/pulls/1149","html_url":"https://github.com/conda/conda-build/pull/1149","diff_url":"https://github.com/conda/conda-build/pull/1149.diff","patch_url":"https://github.com/conda/conda-build/pull/1149.patch"},"body":"Fixes https://github.com/conda/conda-build/issues/1117\r\n\r\nIn some situations, users find the processor information to be reported incorrectly by the infrastructure they may be running a build on. For instance, a user may be running a build on a node where the node supports more cores than the user is actually provided. As a result, the detection of the number of cores will be too high and cause issues completing the build.\r\n\r\nPreviously it was thought `MAKEFLAGS` would be an acceptable way to accomplish this. Please see PR ( https://github.com/conda/conda-build/pull/917 ). In fact, that strategy does work. Most of the cases where a parallel build is desired are using `make` and thus can easily leverage this. Though it doesn't really catch all cases and so something else still needs to be done for them. Also, using it in this way can result in an implicit setting of parallel builds. Thus there were some cases where a parallel build was not reliable. As a result, users had to unset `MAKEFLAGS` entirely. This is problematic as other flags not related to parallelism may be lost in the process. Please see PR ( https://github.com/conda-forge/conda-forge-build-setup-feedstock/pull/18 ) for references to this problem.\r\n\r\nThe strategy proposed here is to allow the environment variable `CPU_COUNT` to be automatically passed through to the recipe. This allows users to opt-in to parallelism if it helps their build. However, if their build does not work well in parallel it is not forced upon them. As it simply overrides an existing environment variable used to specify the number of cores available, recipes that use this feature can be safely built in different environments by setting this environment variable to the appropriate value in that setting. Further strategies build strategies that don't use `make`, but do have the ability to build in parallel can be set appropriately using the `CPU_COUNT` environment variable. Finally, by allowing `CPU_COUNT` to be passed through we provide a useful tool in debugging recipes. Instead of having to tinker with hard-coded values in recipes, a user can set this environment variable to different values externally and see how it affects there build.\r\n\r\nIn short, this proposal should hopefully provide a useful feature for those eager to support parallel builds by putting that control more firmly in the hand of the users. Further, this should help separate what is appropriate for build infrastructure from the recipes themselves resulting in greater flexibility.\r\n\r\ncc @ocefpaf @pelson @msarahan @jschueller @frol"},"comment":{"url":"https://api.github.com/repos/conda/conda-build/issues/comments/237669015","html_url":"https://github.com/conda/conda-build/pull/1149#issuecomment-237669015","issue_url":"https://api.github.com/repos/conda/conda-build/issues/1149","id":237669015,"user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars.githubusercontent.com/u/3019665?v=3","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T20:11:14Z","updated_at":"2016-08-04T20:11:14Z","body":"Looks like the bug fix has already happened. In any event, please don't hold bug fixes on my account. I'm out on vacation this week.\r\n\r\nHoping to look at this again next week around the middle of the week."}}
{"actor":{"display_login":"jakirkham"}}