{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy-healpix/issues/97","repository_url":"https://api.github.com/repos/astropy/astropy-healpix","labels_url":"https://api.github.com/repos/astropy/astropy-healpix/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy-healpix/issues/97/comments","events_url":"https://api.github.com/repos/astropy/astropy-healpix/issues/97/events","html_url":"https://github.com/astropy/astropy-healpix/issues/97","id":336515874,"node_id":"MDU6SXNzdWUzMzY1MTU4NzQ=","number":97,"title":"Remove use of OpenMP?","user":{"login":"cdeil","id":852409,"node_id":"MDQ6VXNlcjg1MjQwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/852409?v=4","gravatar_id":"","url":"https://api.github.com/users/cdeil","html_url":"https://github.com/cdeil","followers_url":"https://api.github.com/users/cdeil/followers","following_url":"https://api.github.com/users/cdeil/following{/other_user}","gists_url":"https://api.github.com/users/cdeil/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeil/subscriptions","organizations_url":"https://api.github.com/users/cdeil/orgs","repos_url":"https://api.github.com/users/cdeil/repos","events_url":"https://api.github.com/users/cdeil/events{/privacy}","received_events_url":"https://api.github.com/users/cdeil/received_events","type":"User","site_admin":false},"labels":[{"id":424718814,"node_id":"MDU6TGFiZWw0MjQ3MTg4MTQ=","url":"https://api.github.com/repos/astropy/astropy-healpix/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/astropy/astropy-healpix/milestones/5","html_url":"https://github.com/astropy/astropy-healpix/milestone/5","labels_url":"https://api.github.com/repos/astropy/astropy-healpix/milestones/5/labels","id":2842409,"node_id":"MDk6TWlsZXN0b25lMjg0MjQwOQ==","number":5,"title":"0.3","description":"","creator":{"login":"cdeil","id":852409,"node_id":"MDQ6VXNlcjg1MjQwOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/852409?v=4","gravatar_id":"","url":"https://api.github.com/users/cdeil","html_url":"https://github.com/cdeil","followers_url":"https://api.github.com/users/cdeil/followers","following_url":"https://api.github.com/users/cdeil/following{/other_user}","gists_url":"https://api.github.com/users/cdeil/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeil/subscriptions","organizations_url":"https://api.github.com/users/cdeil/orgs","repos_url":"https://api.github.com/users/cdeil/repos","events_url":"https://api.github.com/users/cdeil/events{/privacy}","received_events_url":"https://api.github.com/users/cdeil/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":15,"state":"open","created_at":"2017-10-17T07:42:11Z","updated_at":"2018-07-04T10:17:48Z","due_on":null,"closed_at":null},"comments":19,"created_at":"2018-06-28T08:06:27Z","updated_at":"2018-08-29T20:44:56Z","closed_at":null,"author_association":"MEMBER","body":"We introduced the use of OpenMP in astropy-healpix, to take advantage of multiple cores (see [here](http://astropy-healpix.readthedocs.io/en/latest/performance.html)). This is done using the Cython parallel and prange feature in [astropy_healpix/core_cython.pyx](https://github.com/astropy/astropy-healpix/blob/master/astropy_healpix/core_cython.pyx). Indeed, for users that care about HEALPix speed and where it works out of the box and they want to use multi-core for that process, getting the extra speed by default is great.\r\n\r\nHowever, using OpenMP has a cost in terms of installation issues. We already have a user where `pip install` fails due to OpenMP issues and we weren't able to (or had time to) help him: #78\r\nOpenMP is also listed as the first install issue here:\r\nhttps://github.com/healpy/healpy/blob/master/README.rst#known-issues\r\n\r\nI think we should remove the OpenMP usage. My arguments:\r\n- simple install for `astropy.healpix` is extremely important, as far as I know OpenMP is not used in Astropy core yet (true?)\r\n- there are users that don't want the now default behaviour of using all cores. E.g. many astronomers run their Python script on institute servers with 10 or 100 users, and using all cores by accident causes problems for others, or for them if their sysadmin comes to their office.\r\n- the few users that really need the extra speed might use joblib or dask or chunk their Numpy arrays manually, i.e. use common techniques that are used e.g. also by scikit-image or scikit-learn.\r\n- if several users complain about speed problems with `astropy.healpix`, we can always add OpenMP or some other solution later; but I don't think there are many people who need this overall.\r\n\r\n@astrofrog @lpsinger and also @mreineck - Thoughts?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/astropy/astropy-healpix/issues/comments/417099568","html_url":"https://github.com/astropy/astropy-healpix/issues/97#issuecomment-417099568","issue_url":"https://api.github.com/repos/astropy/astropy-healpix/issues/97","id":417099568,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzA5OTU2OA==","user":{"login":"mreineck","id":898507,"node_id":"MDQ6VXNlcjg5ODUwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/898507?v=4","gravatar_id":"","url":"https://api.github.com/users/mreineck","html_url":"https://github.com/mreineck","followers_url":"https://api.github.com/users/mreineck/followers","following_url":"https://api.github.com/users/mreineck/following{/other_user}","gists_url":"https://api.github.com/users/mreineck/gists{/gist_id}","starred_url":"https://api.github.com/users/mreineck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mreineck/subscriptions","organizations_url":"https://api.github.com/users/mreineck/orgs","repos_url":"https://api.github.com/users/mreineck/repos","events_url":"https://api.github.com/users/mreineck/events{/privacy}","received_events_url":"https://api.github.com/users/mreineck/received_events","type":"User","site_admin":false},"created_at":"2018-08-29T20:44:56Z","updated_at":"2018-08-29T20:44:56Z","author_association":"NONE","body":"> I even suspect that many of the operations could be more efficiently coded\r\nin pure numpy, rather than wrapping C.  But that would be work!\r\n\r\nI'm not sure. If your arrays are small, the numpy overhead will dominate. If they are large, the array expressions will cause multiple reading/writing of large memory blocks, thrashing the cache.\r\n\r\nThe native performance of, say, ang2pix, is above 20 million calls per second on a typical laptop CPU. I doubt that numpy will be able to get anywhere close."}}
{"actor":{"display_login":"mreineck"}}