{"action":"created","issue":{"url":"https://api.github.com/repos/OPM/ewoms/issues/318","repository_url":"https://api.github.com/repos/OPM/ewoms","labels_url":"https://api.github.com/repos/OPM/ewoms/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/OPM/ewoms/issues/318/comments","events_url":"https://api.github.com/repos/OPM/ewoms/issues/318/events","html_url":"https://github.com/OPM/ewoms/pull/318","id":319481934,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg1Mzg0NjA5","number":318,"title":"replace OpenMP with tasklets","user":{"login":"andlaus","id":1837735,"node_id":"MDQ6VXNlcjE4Mzc3MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1837735?v=4","gravatar_id":"","url":"https://api.github.com/users/andlaus","html_url":"https://github.com/andlaus","followers_url":"https://api.github.com/users/andlaus/followers","following_url":"https://api.github.com/users/andlaus/following{/other_user}","gists_url":"https://api.github.com/users/andlaus/gists{/gist_id}","starred_url":"https://api.github.com/users/andlaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andlaus/subscriptions","organizations_url":"https://api.github.com/users/andlaus/orgs","repos_url":"https://api.github.com/users/andlaus/repos","events_url":"https://api.github.com/users/andlaus/events{/privacy}","received_events_url":"https://api.github.com/users/andlaus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bska","id":1871438,"node_id":"MDQ6VXNlcjE4NzE0Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1871438?v=4","gravatar_id":"","url":"https://api.github.com/users/bska","html_url":"https://github.com/bska","followers_url":"https://api.github.com/users/bska/followers","following_url":"https://api.github.com/users/bska/following{/other_user}","gists_url":"https://api.github.com/users/bska/gists{/gist_id}","starred_url":"https://api.github.com/users/bska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bska/subscriptions","organizations_url":"https://api.github.com/users/bska/orgs","repos_url":"https://api.github.com/users/bska/repos","events_url":"https://api.github.com/users/bska/events{/privacy}","received_events_url":"https://api.github.com/users/bska/received_events","type":"User","site_admin":false},"assignees":[{"login":"bska","id":1871438,"node_id":"MDQ6VXNlcjE4NzE0Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/1871438?v=4","gravatar_id":"","url":"https://api.github.com/users/bska","html_url":"https://github.com/bska","followers_url":"https://api.github.com/users/bska/followers","following_url":"https://api.github.com/users/bska/following{/other_user}","gists_url":"https://api.github.com/users/bska/gists{/gist_id}","starred_url":"https://api.github.com/users/bska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bska/subscriptions","organizations_url":"https://api.github.com/users/bska/orgs","repos_url":"https://api.github.com/users/bska/repos","events_url":"https://api.github.com/users/bska/events{/privacy}","received_events_url":"https://api.github.com/users/bska/received_events","type":"User","site_admin":false},{"login":"atgeirr","id":1876621,"node_id":"MDQ6VXNlcjE4NzY2MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/1876621?v=4","gravatar_id":"","url":"https://api.github.com/users/atgeirr","html_url":"https://github.com/atgeirr","followers_url":"https://api.github.com/users/atgeirr/followers","following_url":"https://api.github.com/users/atgeirr/following{/other_user}","gists_url":"https://api.github.com/users/atgeirr/gists{/gist_id}","starred_url":"https://api.github.com/users/atgeirr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atgeirr/subscriptions","organizations_url":"https://api.github.com/users/atgeirr/orgs","repos_url":"https://api.github.com/users/atgeirr/repos","events_url":"https://api.github.com/users/atgeirr/events{/privacy}","received_events_url":"https://api.github.com/users/atgeirr/received_events","type":"User","site_admin":false},{"login":"blattms","id":1944640,"node_id":"MDQ6VXNlcjE5NDQ2NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1944640?v=4","gravatar_id":"","url":"https://api.github.com/users/blattms","html_url":"https://github.com/blattms","followers_url":"https://api.github.com/users/blattms/followers","following_url":"https://api.github.com/users/blattms/following{/other_user}","gists_url":"https://api.github.com/users/blattms/gists{/gist_id}","starred_url":"https://api.github.com/users/blattms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blattms/subscriptions","organizations_url":"https://api.github.com/users/blattms/orgs","repos_url":"https://api.github.com/users/blattms/repos","events_url":"https://api.github.com/users/blattms/events{/privacy}","received_events_url":"https://api.github.com/users/blattms/received_events","type":"User","site_admin":false}],"milestone":null,"comments":20,"created_at":"2018-05-02T09:39:10Z","updated_at":"2018-06-14T08:51:21Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/OPM/ewoms/pulls/318","html_url":"https://github.com/OPM/ewoms/pull/318","diff_url":"https://github.com/OPM/ewoms/pull/318.diff","patch_url":"https://github.com/OPM/ewoms/pull/318.patch"},"body":"this makes multi-threaded linearization available without having to build with OpenMP, a c++-2011 compliant compiler is enough. as an added benefit, performance seems to be slightly better.\r\n\r\nthis PR requires some pretty trivial mop-up in opm-simulators."},"comment":{"url":"https://api.github.com/repos/OPM/ewoms/issues/comments/397221214","html_url":"https://github.com/OPM/ewoms/pull/318#issuecomment-397221214","issue_url":"https://api.github.com/repos/OPM/ewoms/issues/318","id":397221214,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzIyMTIxNA==","user":{"login":"andlaus","id":1837735,"node_id":"MDQ6VXNlcjE4Mzc3MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1837735?v=4","gravatar_id":"","url":"https://api.github.com/users/andlaus","html_url":"https://github.com/andlaus","followers_url":"https://api.github.com/users/andlaus/followers","following_url":"https://api.github.com/users/andlaus/following{/other_user}","gists_url":"https://api.github.com/users/andlaus/gists{/gist_id}","starred_url":"https://api.github.com/users/andlaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andlaus/subscriptions","organizations_url":"https://api.github.com/users/andlaus/orgs","repos_url":"https://api.github.com/users/andlaus/repos","events_url":"https://api.github.com/users/andlaus/events{/privacy}","received_events_url":"https://api.github.com/users/andlaus/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T08:51:21Z","updated_at":"2018-06-14T08:51:21Z","author_association":"MEMBER","body":">>  could you please be a tad more specific?\r\n>\r\n> Sure. With the OpenMP implementation, you see this:\r\n>\r\n> ```c++\r\n>#ifdef _OPENMP\r\n>#pragma omp parallel\r\n>#endif\r\n>```\r\n\r\nwith tasklets the parallel scope is changed to a lambda and this is used instead:\r\n\r\n```c++\r\n        auto& taskletRunner = simulator_.taskletRunner();\r\n        int numThreads = std::max(taskletRunner.numWorkerThreads(), 1);\r\n        taskletRunner.dispatchFunction(updateWellDataLambda, /*numInvokations=*/numThreads);\r\n        taskletRunner.barrier();\r\n```\r\n\r\nyou can't seriously call this \"additional complexity\"!\r\n\r\n>  adding -fopenmp to the default compile switches achieves the same, so your statement puzzles me. \r\n\r\nchanging the default flags in the OPM build system as @blattms suggests is bound to cause troubles with Dune modules that are build without this.\r\n\r\n> With this Pull Request we can no more turn off compilation of the multi threading for linearization (as it would remove the asyncIO with it).\r\n\r\nthis statement is just plain wrong: it *is* disabled by default because only a single thread is used and removing tasklets would kill async I/O even without this being merged! Also, it is *harder* to disable with the openMP based solution!\r\n\r\n---\r\n\r\nAnyway, could somebody please bring up some technical reasons for not merging it? so far it did not cause any regressions and when repeating \"the current solution adheres to standards more\" ad infinitum this this guy should to be taken seriously IMO: https://lwn.net/Articles/756732/\r\n\r\nSo yeah, I'm tired of this discussion and I'm also tired of openMP. Since I'm the only guy who did any non-trivial changes to this code over the (at least) last 4 years, I offer the following two solutions:\r\n\r\n1) remove openMP support from eWoms without a replacement. this would not constitute a regression for flow because multi-threading is disabled by the current flow master and everbody seemed to have been happy with that\r\n2) merge this PR.\r\n\r\nin both cases it is relatively easy to fork the affected classes to  `opm-simulaters` and go with whatever fancy multithreading mechanism you prefer. If you want this, I'll do the forking work, but somebody else needs to explicitly take over maintainership responsibility for the forked version.\r\n\r\nyou decide.\r\n"}}
{"actor":{"display_login":"andlaus"}}