{"action":"created","comment":{"url":"https://api.github.com/repos/opesci/devito/pulls/comments/73850310","id":73850310,"diff_hunk":"@@ -304,21 +329,37 @@ def generate_loops(self, loop_body):\n         time_loop_stencils_a = [self.convert_equality_to_cgen(x) for x in self.time_loop_stencils_a]\n \n         if self.profile:\n-            start_time_stmt = omp_master + [cgen.Block([cgen.Statement(\"gettimeofday(&start, NULL)\")])]\n-            end_time_stmt = omp_master + [cgen.Block(\n-                [cgen.Statement(\"gettimeofday(&end, NULL)\")] +\n-                [cgen.Statement(\"time += ((end.tv_sec - start.tv_sec) * \",\n-                                \"1000000u + end.tv_usec - start.tv_usec) / 1.e6\")]\n-            )]\n-        else:\n-            start_time_stmt = []\n-            end_time_stmt = []\n-\n-        initial_block = omp_single + ([cgen.Block(time_stepping + time_loop_stencils_b)]\n-                                      if time_stepping or time_loop_stencils_b else [])\n-        initial_block = initial_block + start_time_stmt\n-        end_block = end_time_stmt + omp_single + ([cgen.Block(time_loop_stencils_a)]\n-                                                  if time_loop_stencils_a else end_time_stmt)","path":"devito/propagator.py","position":76,"original_position":76,"commit_id":"40aaa83028df56549b0a21146f042c7fbae0ed17","original_commit_id":"40aaa83028df56549b0a21146f042c7fbae0ed17","user":{"login":"mloubout","id":5702350,"avatar_url":"https://avatars.githubusercontent.com/u/5702350?v=3","gravatar_id":"","url":"https://api.github.com/users/mloubout","html_url":"https://github.com/mloubout","followers_url":"https://api.github.com/users/mloubout/followers","following_url":"https://api.github.com/users/mloubout/following{/other_user}","gists_url":"https://api.github.com/users/mloubout/gists{/gist_id}","starred_url":"https://api.github.com/users/mloubout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mloubout/subscriptions","organizations_url":"https://api.github.com/users/mloubout/orgs","repos_url":"https://api.github.com/users/mloubout/repos","events_url":"https://api.github.com/users/mloubout/events{/privacy}","received_events_url":"https://api.github.com/users/mloubout/received_events","type":"User","site_admin":false},"body":"omp_single should have been inside the parenthesis here :\r\n`(omp_single + [cgen.Block(time_stepping + time_loop_stencils_b)] if time_stepping or time_loop_stencils_b else [])`\r\nto avoid empty omp sigle section breaking the compilation. Does your change fix it?","created_at":"2016-08-08T09:59:50Z","updated_at":"2016-08-08T09:59:50Z","html_url":"https://github.com/opesci/devito/pull/74#discussion_r73850310","pull_request_url":"https://api.github.com/repos/opesci/devito/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/opesci/devito/pulls/comments/73850310"},"html":{"href":"https://github.com/opesci/devito/pull/74#discussion_r73850310"},"pull_request":{"href":"https://api.github.com/repos/opesci/devito/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/opesci/devito/pulls/74","id":80335092,"html_url":"https://github.com/opesci/devito/pull/74","diff_url":"https://github.com/opesci/devito/pull/74.diff","patch_url":"https://github.com/opesci/devito/pull/74.patch","issue_url":"https://api.github.com/repos/opesci/devito/issues/74","number":74,"state":"open","locked":false,"title":"Overhauled and improved profiling","user":{"login":"vincepandolfo","id":5785542,"avatar_url":"https://avatars.githubusercontent.com/u/5785542?v=3","gravatar_id":"","url":"https://api.github.com/users/vincepandolfo","html_url":"https://github.com/vincepandolfo","followers_url":"https://api.github.com/users/vincepandolfo/followers","following_url":"https://api.github.com/users/vincepandolfo/following{/other_user}","gists_url":"https://api.github.com/users/vincepandolfo/gists{/gist_id}","starred_url":"https://api.github.com/users/vincepandolfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincepandolfo/subscriptions","organizations_url":"https://api.github.com/users/vincepandolfo/orgs","repos_url":"https://api.github.com/users/vincepandolfo/repos","events_url":"https://api.github.com/users/vincepandolfo/events{/privacy}","received_events_url":"https://api.github.com/users/vincepandolfo/received_events","type":"User","site_admin":false},"body":"The aim of this PR is to improve the profiling capabilities of Devito (also fixing issue #65 )\r\n\r\n* Profiling information are now stored in a numpy array in the Propagator instead of being printed to stdout\r\n* Profiles the kernel, the time loop stencils (before and after space loops) and the space loops.\r\n* The logic for executing `Propagator.cfunction` has been moved down to the propagator. This should also make easier to execute it when the user uses the low level `Propagator` interface directly.","created_at":"2016-08-06T08:50:44Z","updated_at":"2016-08-08T09:59:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"846b1b86050c903a00f36032314b3b55efc2e79a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/opesci/devito/pulls/74/commits","review_comments_url":"https://api.github.com/repos/opesci/devito/pulls/74/comments","review_comment_url":"https://api.github.com/repos/opesci/devito/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opesci/devito/issues/74/comments","statuses_url":"https://api.github.com/repos/opesci/devito/statuses/40aaa83028df56549b0a21146f042c7fbae0ed17","head":{"label":"opesci:profiling","ref":"profiling","sha":"40aaa83028df56549b0a21146f042c7fbae0ed17","user":{"login":"opesci","id":10018551,"avatar_url":"https://avatars.githubusercontent.com/u/10018551?v=3","gravatar_id":"","url":"https://api.github.com/users/opesci","html_url":"https://github.com/opesci","followers_url":"https://api.github.com/users/opesci/followers","following_url":"https://api.github.com/users/opesci/following{/other_user}","gists_url":"https://api.github.com/users/opesci/gists{/gist_id}","starred_url":"https://api.github.com/users/opesci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opesci/subscriptions","organizations_url":"https://api.github.com/users/opesci/orgs","repos_url":"https://api.github.com/users/opesci/repos","events_url":"https://api.github.com/users/opesci/events{/privacy}","received_events_url":"https://api.github.com/users/opesci/received_events","type":"Organization","site_admin":false},"repo":{"id":54585666,"name":"devito","full_name":"opesci/devito","owner":{"login":"opesci","id":10018551,"avatar_url":"https://avatars.githubusercontent.com/u/10018551?v=3","gravatar_id":"","url":"https://api.github.com/users/opesci","html_url":"https://github.com/opesci","followers_url":"https://api.github.com/users/opesci/followers","following_url":"https://api.github.com/users/opesci/following{/other_user}","gists_url":"https://api.github.com/users/opesci/gists{/gist_id}","starred_url":"https://api.github.com/users/opesci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opesci/subscriptions","organizations_url":"https://api.github.com/users/opesci/orgs","repos_url":"https://api.github.com/users/opesci/repos","events_url":"https://api.github.com/users/opesci/events{/privacy}","received_events_url":"https://api.github.com/users/opesci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opesci/devito","description":"Code generation for the inversion workflow","fork":false,"url":"https://api.github.com/repos/opesci/devito","forks_url":"https://api.github.com/repos/opesci/devito/forks","keys_url":"https://api.github.com/repos/opesci/devito/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opesci/devito/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opesci/devito/teams","hooks_url":"https://api.github.com/repos/opesci/devito/hooks","issue_events_url":"https://api.github.com/repos/opesci/devito/issues/events{/number}","events_url":"https://api.github.com/repos/opesci/devito/events","assignees_url":"https://api.github.com/repos/opesci/devito/assignees{/user}","branches_url":"https://api.github.com/repos/opesci/devito/branches{/branch}","tags_url":"https://api.github.com/repos/opesci/devito/tags","blobs_url":"https://api.github.com/repos/opesci/devito/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opesci/devito/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opesci/devito/git/refs{/sha}","trees_url":"https://api.github.com/repos/opesci/devito/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opesci/devito/statuses/{sha}","languages_url":"https://api.github.com/repos/opesci/devito/languages","stargazers_url":"https://api.github.com/repos/opesci/devito/stargazers","contributors_url":"https://api.github.com/repos/opesci/devito/contributors","subscribers_url":"https://api.github.com/repos/opesci/devito/subscribers","subscription_url":"https://api.github.com/repos/opesci/devito/subscription","commits_url":"https://api.github.com/repos/opesci/devito/commits{/sha}","git_commits_url":"https://api.github.com/repos/opesci/devito/git/commits{/sha}","comments_url":"https://api.github.com/repos/opesci/devito/comments{/number}","issue_comment_url":"https://api.github.com/repos/opesci/devito/issues/comments{/number}","contents_url":"https://api.github.com/repos/opesci/devito/contents/{+path}","compare_url":"https://api.github.com/repos/opesci/devito/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opesci/devito/merges","archive_url":"https://api.github.com/repos/opesci/devito/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opesci/devito/downloads","issues_url":"https://api.github.com/repos/opesci/devito/issues{/number}","pulls_url":"https://api.github.com/repos/opesci/devito/pulls{/number}","milestones_url":"https://api.github.com/repos/opesci/devito/milestones{/number}","notifications_url":"https://api.github.com/repos/opesci/devito/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opesci/devito/labels{/name}","releases_url":"https://api.github.com/repos/opesci/devito/releases{/id}","deployments_url":"https://api.github.com/repos/opesci/devito/deployments","created_at":"2016-03-23T18:59:49Z","updated_at":"2016-04-22T12:11:36Z","pushed_at":"2016-08-07T13:08:15Z","git_url":"git://github.com/opesci/devito.git","ssh_url":"git@github.com:opesci/devito.git","clone_url":"https://github.com/opesci/devito.git","svn_url":"https://github.com/opesci/devito","homepage":null,"size":1688,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"base":{"label":"opesci:master","ref":"master","sha":"46c650cc4d694afaed5bf837a2b8173d549d5ec6","user":{"login":"opesci","id":10018551,"avatar_url":"https://avatars.githubusercontent.com/u/10018551?v=3","gravatar_id":"","url":"https://api.github.com/users/opesci","html_url":"https://github.com/opesci","followers_url":"https://api.github.com/users/opesci/followers","following_url":"https://api.github.com/users/opesci/following{/other_user}","gists_url":"https://api.github.com/users/opesci/gists{/gist_id}","starred_url":"https://api.github.com/users/opesci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opesci/subscriptions","organizations_url":"https://api.github.com/users/opesci/orgs","repos_url":"https://api.github.com/users/opesci/repos","events_url":"https://api.github.com/users/opesci/events{/privacy}","received_events_url":"https://api.github.com/users/opesci/received_events","type":"Organization","site_admin":false},"repo":{"id":54585666,"name":"devito","full_name":"opesci/devito","owner":{"login":"opesci","id":10018551,"avatar_url":"https://avatars.githubusercontent.com/u/10018551?v=3","gravatar_id":"","url":"https://api.github.com/users/opesci","html_url":"https://github.com/opesci","followers_url":"https://api.github.com/users/opesci/followers","following_url":"https://api.github.com/users/opesci/following{/other_user}","gists_url":"https://api.github.com/users/opesci/gists{/gist_id}","starred_url":"https://api.github.com/users/opesci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opesci/subscriptions","organizations_url":"https://api.github.com/users/opesci/orgs","repos_url":"https://api.github.com/users/opesci/repos","events_url":"https://api.github.com/users/opesci/events{/privacy}","received_events_url":"https://api.github.com/users/opesci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opesci/devito","description":"Code generation for the inversion workflow","fork":false,"url":"https://api.github.com/repos/opesci/devito","forks_url":"https://api.github.com/repos/opesci/devito/forks","keys_url":"https://api.github.com/repos/opesci/devito/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opesci/devito/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opesci/devito/teams","hooks_url":"https://api.github.com/repos/opesci/devito/hooks","issue_events_url":"https://api.github.com/repos/opesci/devito/issues/events{/number}","events_url":"https://api.github.com/repos/opesci/devito/events","assignees_url":"https://api.github.com/repos/opesci/devito/assignees{/user}","branches_url":"https://api.github.com/repos/opesci/devito/branches{/branch}","tags_url":"https://api.github.com/repos/opesci/devito/tags","blobs_url":"https://api.github.com/repos/opesci/devito/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opesci/devito/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opesci/devito/git/refs{/sha}","trees_url":"https://api.github.com/repos/opesci/devito/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opesci/devito/statuses/{sha}","languages_url":"https://api.github.com/repos/opesci/devito/languages","stargazers_url":"https://api.github.com/repos/opesci/devito/stargazers","contributors_url":"https://api.github.com/repos/opesci/devito/contributors","subscribers_url":"https://api.github.com/repos/opesci/devito/subscribers","subscription_url":"https://api.github.com/repos/opesci/devito/subscription","commits_url":"https://api.github.com/repos/opesci/devito/commits{/sha}","git_commits_url":"https://api.github.com/repos/opesci/devito/git/commits{/sha}","comments_url":"https://api.github.com/repos/opesci/devito/comments{/number}","issue_comment_url":"https://api.github.com/repos/opesci/devito/issues/comments{/number}","contents_url":"https://api.github.com/repos/opesci/devito/contents/{+path}","compare_url":"https://api.github.com/repos/opesci/devito/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opesci/devito/merges","archive_url":"https://api.github.com/repos/opesci/devito/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opesci/devito/downloads","issues_url":"https://api.github.com/repos/opesci/devito/issues{/number}","pulls_url":"https://api.github.com/repos/opesci/devito/pulls{/number}","milestones_url":"https://api.github.com/repos/opesci/devito/milestones{/number}","notifications_url":"https://api.github.com/repos/opesci/devito/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opesci/devito/labels{/name}","releases_url":"https://api.github.com/repos/opesci/devito/releases{/id}","deployments_url":"https://api.github.com/repos/opesci/devito/deployments","created_at":"2016-03-23T18:59:49Z","updated_at":"2016-04-22T12:11:36Z","pushed_at":"2016-08-07T13:08:15Z","git_url":"git://github.com/opesci/devito.git","ssh_url":"git@github.com:opesci/devito.git","clone_url":"https://github.com/opesci/devito.git","svn_url":"https://github.com/opesci/devito","homepage":null,"size":1688,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opesci/devito/pulls/74"},"html":{"href":"https://github.com/opesci/devito/pull/74"},"issue":{"href":"https://api.github.com/repos/opesci/devito/issues/74"},"comments":{"href":"https://api.github.com/repos/opesci/devito/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/opesci/devito/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/opesci/devito/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opesci/devito/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/opesci/devito/statuses/40aaa83028df56549b0a21146f042c7fbae0ed17"}}}}
{"actor":{"display_login":"mloubout"}}