{"action":"created","issue":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/2088","labels_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2088/labels{/name}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2088/comments","events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2088/events","html_url":"https://github.com/chapel-lang/chapel/pull/2088","id":89671178,"number":2088,"title":"Fix foralls over arrays to use standalone iterator.","user":{"login":"vasslitvinov","id":8039635,"avatar_url":"https://avatars.githubusercontent.com/u/8039635?v=3","gravatar_id":"","url":"https://api.github.com/users/vasslitvinov","html_url":"https://github.com/vasslitvinov","followers_url":"https://api.github.com/users/vasslitvinov/followers","following_url":"https://api.github.com/users/vasslitvinov/following{/other_user}","gists_url":"https://api.github.com/users/vasslitvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/vasslitvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasslitvinov/subscriptions","organizations_url":"https://api.github.com/users/vasslitvinov/orgs","repos_url":"https://api.github.com/users/vasslitvinov/repos","events_url":"https://api.github.com/users/vasslitvinov/events{/privacy}","received_events_url":"https://api.github.com/users/vasslitvinov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"hildeth","id":7853742,"avatar_url":"https://avatars.githubusercontent.com/u/7853742?v=3","gravatar_id":"","url":"https://api.github.com/users/hildeth","html_url":"https://github.com/hildeth","followers_url":"https://api.github.com/users/hildeth/followers","following_url":"https://api.github.com/users/hildeth/following{/other_user}","gists_url":"https://api.github.com/users/hildeth/gists{/gist_id}","starred_url":"https://api.github.com/users/hildeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hildeth/subscriptions","organizations_url":"https://api.github.com/users/hildeth/orgs","repos_url":"https://api.github.com/users/hildeth/repos","events_url":"https://api.github.com/users/hildeth/events{/privacy}","received_events_url":"https://api.github.com/users/hildeth/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-06-19T22:11:49Z","updated_at":"2015-06-19T22:20:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/2088","html_url":"https://github.com/chapel-lang/chapel/pull/2088","diff_url":"https://github.com/chapel-lang/chapel/pull/2088.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/2088.patch"},"body":"Prior to this change, leader/follower would be invoked\r\ninstead of the standalone iterator in a forall over an array\r\nwhen there is an outer variable in the loop body, e.g.\r\n\r\n```\r\n    var b ...;\r\n    forall a in A do\r\n      a = b;\r\n```\r\n\r\nDISCUSSION\r\n\r\nWe fix this by adding another case of proc _toStandalone().\r\n\r\nThat added case works due to using _build_tuple_always_allow_ref()\r\nin propagateExtraLeaderArgs() / implementForallIntents.cpp\r\n\r\nWhich, in turn, is enabled by PR #2078.\r\n\r\nTEST CHANGES\r\n\r\nThis test:\r\n\r\n  test/arrays/deitz/parallelism/test_whole_array_assignment_of_elemental_value_is_parallel.chpl\r\n\r\nnow uses standalone instead of leader/follower, so I updated its .good.\r\n\r\nWhile there:\r\n\r\n* I added a printout in DefaultRectangular for standalone to mirror\r\nthe one that was there for the follower. That way, the above test\r\ncan ensure that the standalone iterator is indeed invoked.\r\n\r\n* I added two more foralls to the above test to ensure that\r\nthe standalone iterator is used there as well,\r\nincluding the motivating example at the beginning of this message.\r\n\r\n* BTW if I compile the NEW version of that test with the OLD version\r\nof Chapel, it reports DR domain follower for the first forall\r\n(without the 'with' clause) and NOT for the second forall\r\n(with \"with (ref r)\"). I imagine both foralls should behave the same.\r\nI did not investigate.\r\n\r\n* I fixed a bug in PREDIFF for this test.\r\nSince PREDIFF in stream/ subdirectory was its exact copy,\r\nI replaced it with a symlink."},"comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/113660604","html_url":"https://github.com/chapel-lang/chapel/pull/2088#issuecomment-113660604","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2088","id":113660604,"user":{"login":"hildeth","id":7853742,"avatar_url":"https://avatars.githubusercontent.com/u/7853742?v=3","gravatar_id":"","url":"https://api.github.com/users/hildeth","html_url":"https://github.com/hildeth","followers_url":"https://api.github.com/users/hildeth/followers","following_url":"https://api.github.com/users/hildeth/following{/other_user}","gists_url":"https://api.github.com/users/hildeth/gists{/gist_id}","starred_url":"https://api.github.com/users/hildeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hildeth/subscriptions","organizations_url":"https://api.github.com/users/hildeth/orgs","repos_url":"https://api.github.com/users/hildeth/repos","events_url":"https://api.github.com/users/hildeth/events{/privacy}","received_events_url":"https://api.github.com/users/hildeth/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T22:20:46Z","updated_at":"2015-06-19T22:20:46Z","body":"It is unclear what is fixed beyond the assertion that standalone iterators are better than LF iterators (who can argue with that?).\r\nLooks OK to me."}}