{"action":"created","comment":{"url":"https://api.github.com/repos/FEniCS/dolfinx/pulls/comments/203619637","pull_request_review_id":138542281,"id":203619637,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzYxOTYzNw==","diff_hunk":"@@ -35,34 +34,44 @@ hid_t HDF5Interface::open_file(MPI_Comm mpi_comm, const std::string filename,\n   }\n #endif\n \n+  // Query file existence only once\n+  bool file_exists = boost::filesystem::exists(filename);\n+\n   hid_t file_id = HDF5_FAIL;\n   if (mode == \"w\")\n   {\n     // Create file for write, (overwriting existing file, if present)\n     file_id = H5Fcreate(filename.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, plist_id);\n   }\n-  else\n+  else if (mode == \"a\")\n   {\n-    // Check that file exists\n-    if (!boost::filesystem::is_regular_file(filename))\n+    if (file_exists)\n     {\n-      log::dolfin_error(\"HDF5Interface.cpp\", \"open HDF5 file\",\n-                   \"File \\\"%s\\\" does not exist\", filename.c_str());\n+      file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, plist_id);","path":"cpp/dolfin/io/HDF5Interface.cpp","position":30,"original_position":30,"commit_id":"d9a07ff2f2615400a9445251c966740be4894e22","original_commit_id":"d9a07ff2f2615400a9445251c966740be4894e22","user":{"login":"garth-wells","id":3431333,"node_id":"MDQ6VXNlcjM0MzEzMzM=","avatar_url":"https://avatars0.githubusercontent.com/u/3431333?v=4","gravatar_id":"","url":"https://api.github.com/users/garth-wells","html_url":"https://github.com/garth-wells","followers_url":"https://api.github.com/users/garth-wells/followers","following_url":"https://api.github.com/users/garth-wells/following{/other_user}","gists_url":"https://api.github.com/users/garth-wells/gists{/gist_id}","starred_url":"https://api.github.com/users/garth-wells/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garth-wells/subscriptions","organizations_url":"https://api.github.com/users/garth-wells/orgs","repos_url":"https://api.github.com/users/garth-wells/repos","events_url":"https://api.github.com/users/garth-wells/events{/privacy}","received_events_url":"https://api.github.com/users/garth-wells/received_events","type":"User","site_admin":false},"body":"Add below `H5Fopen`:\r\n```cpp\r\nif (file_id < 0)\r\n  throw std::runtime_error(\"......\");","created_at":"2018-07-19T07:01:16Z","updated_at":"2018-07-19T07:07:18Z","html_url":"https://github.com/FEniCS/dolfinx/pull/135#discussion_r203619637","pull_request_url":"https://api.github.com/repos/FEniCS/dolfinx/pulls/135","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/FEniCS/dolfinx/pulls/comments/203619637"},"html":{"href":"https://github.com/FEniCS/dolfinx/pull/135#discussion_r203619637"},"pull_request":{"href":"https://api.github.com/repos/FEniCS/dolfinx/pulls/135"}}},"pull_request":{"url":"https://api.github.com/repos/FEniCS/dolfinx/pulls/135","id":202387565,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMzg3NTY1","html_url":"https://github.com/FEniCS/dolfinx/pull/135","diff_url":"https://github.com/FEniCS/dolfinx/pull/135.diff","patch_url":"https://github.com/FEniCS/dolfinx/pull/135.patch","issue_url":"https://api.github.com/repos/FEniCS/dolfinx/issues/135","number":135,"state":"open","locked":false,"title":"Make HDF append mode C-style","user":{"login":"michalhabera","id":2896171,"node_id":"MDQ6VXNlcjI4OTYxNzE=","avatar_url":"https://avatars2.githubusercontent.com/u/2896171?v=4","gravatar_id":"","url":"https://api.github.com/users/michalhabera","html_url":"https://github.com/michalhabera","followers_url":"https://api.github.com/users/michalhabera/followers","following_url":"https://api.github.com/users/michalhabera/following{/other_user}","gists_url":"https://api.github.com/users/michalhabera/gists{/gist_id}","starred_url":"https://api.github.com/users/michalhabera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalhabera/subscriptions","organizations_url":"https://api.github.com/users/michalhabera/orgs","repos_url":"https://api.github.com/users/michalhabera/repos","events_url":"https://api.github.com/users/michalhabera/events{/privacy}","received_events_url":"https://api.github.com/users/michalhabera/received_events","type":"User","site_admin":false},"body":"When addressed file is not existing create new empty one.","created_at":"2018-07-18T21:37:38Z","updated_at":"2018-07-19T07:07:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d07c504a071ff02fdec857d3d8ac21391acd320","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/FEniCS/dolfinx/pulls/135/commits","review_comments_url":"https://api.github.com/repos/FEniCS/dolfinx/pulls/135/comments","review_comment_url":"https://api.github.com/repos/FEniCS/dolfinx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FEniCS/dolfinx/issues/135/comments","statuses_url":"https://api.github.com/repos/FEniCS/dolfinx/statuses/d9a07ff2f2615400a9445251c966740be4894e22","head":{"label":"FEniCS:michal/hdf-c-append","ref":"michal/hdf-c-append","sha":"d9a07ff2f2615400a9445251c966740be4894e22","user":{"login":"FEniCS","id":3868708,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4Njg3MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/3868708?v=4","gravatar_id":"","url":"https://api.github.com/users/FEniCS","html_url":"https://github.com/FEniCS","followers_url":"https://api.github.com/users/FEniCS/followers","following_url":"https://api.github.com/users/FEniCS/following{/other_user}","gists_url":"https://api.github.com/users/FEniCS/gists{/gist_id}","starred_url":"https://api.github.com/users/FEniCS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FEniCS/subscriptions","organizations_url":"https://api.github.com/users/FEniCS/orgs","repos_url":"https://api.github.com/users/FEniCS/repos","events_url":"https://api.github.com/users/FEniCS/events{/privacy}","received_events_url":"https://api.github.com/users/FEniCS/received_events","type":"Organization","site_admin":false},"repo":{"id":128214585,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgyMTQ1ODU=","name":"dolfinx","full_name":"FEniCS/dolfinx","owner":{"login":"FEniCS","id":3868708,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4Njg3MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/3868708?v=4","gravatar_id":"","url":"https://api.github.com/users/FEniCS","html_url":"https://github.com/FEniCS","followers_url":"https://api.github.com/users/FEniCS/followers","following_url":"https://api.github.com/users/FEniCS/following{/other_user}","gists_url":"https://api.github.com/users/FEniCS/gists{/gist_id}","starred_url":"https://api.github.com/users/FEniCS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FEniCS/subscriptions","organizations_url":"https://api.github.com/users/FEniCS/orgs","repos_url":"https://api.github.com/users/FEniCS/repos","events_url":"https://api.github.com/users/FEniCS/events{/privacy}","received_events_url":"https://api.github.com/users/FEniCS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FEniCS/dolfinx","description":"Next generation FEniCS problem solving environment","fork":false,"url":"https://api.github.com/repos/FEniCS/dolfinx","forks_url":"https://api.github.com/repos/FEniCS/dolfinx/forks","keys_url":"https://api.github.com/repos/FEniCS/dolfinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FEniCS/dolfinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FEniCS/dolfinx/teams","hooks_url":"https://api.github.com/repos/FEniCS/dolfinx/hooks","issue_events_url":"https://api.github.com/repos/FEniCS/dolfinx/issues/events{/number}","events_url":"https://api.github.com/repos/FEniCS/dolfinx/events","assignees_url":"https://api.github.com/repos/FEniCS/dolfinx/assignees{/user}","branches_url":"https://api.github.com/repos/FEniCS/dolfinx/branches{/branch}","tags_url":"https://api.github.com/repos/FEniCS/dolfinx/tags","blobs_url":"https://api.github.com/repos/FEniCS/dolfinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FEniCS/dolfinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FEniCS/dolfinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/FEniCS/dolfinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FEniCS/dolfinx/statuses/{sha}","languages_url":"https://api.github.com/repos/FEniCS/dolfinx/languages","stargazers_url":"https://api.github.com/repos/FEniCS/dolfinx/stargazers","contributors_url":"https://api.github.com/repos/FEniCS/dolfinx/contributors","subscribers_url":"https://api.github.com/repos/FEniCS/dolfinx/subscribers","subscription_url":"https://api.github.com/repos/FEniCS/dolfinx/subscription","commits_url":"https://api.github.com/repos/FEniCS/dolfinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/FEniCS/dolfinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/FEniCS/dolfinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/FEniCS/dolfinx/issues/comments{/number}","contents_url":"https://api.github.com/repos/FEniCS/dolfinx/contents/{+path}","compare_url":"https://api.github.com/repos/FEniCS/dolfinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FEniCS/dolfinx/merges","archive_url":"https://api.github.com/repos/FEniCS/dolfinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FEniCS/dolfinx/downloads","issues_url":"https://api.github.com/repos/FEniCS/dolfinx/issues{/number}","pulls_url":"https://api.github.com/repos/FEniCS/dolfinx/pulls{/number}","milestones_url":"https://api.github.com/repos/FEniCS/dolfinx/milestones{/number}","notifications_url":"https://api.github.com/repos/FEniCS/dolfinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FEniCS/dolfinx/labels{/name}","releases_url":"https://api.github.com/repos/FEniCS/dolfinx/releases{/id}","deployments_url":"https://api.github.com/repos/FEniCS/dolfinx/deployments","created_at":"2018-04-05T14:02:41Z","updated_at":"2018-07-18T17:57:25Z","pushed_at":"2018-07-18T21:45:41Z","git_url":"git://github.com/FEniCS/dolfinx.git","ssh_url":"git@github.com:FEniCS/dolfinx.git","clone_url":"https://github.com/FEniCS/dolfinx.git","svn_url":"https://github.com/FEniCS/dolfinx","homepage":"","size":49882,"stargazers_count":12,"watchers_count":12,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":53,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":4,"open_issues":53,"watchers":12,"default_branch":"master"}},"base":{"label":"FEniCS:master","ref":"master","sha":"293127778b8177dcb23d3506de00727c96d7188d","user":{"login":"FEniCS","id":3868708,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4Njg3MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/3868708?v=4","gravatar_id":"","url":"https://api.github.com/users/FEniCS","html_url":"https://github.com/FEniCS","followers_url":"https://api.github.com/users/FEniCS/followers","following_url":"https://api.github.com/users/FEniCS/following{/other_user}","gists_url":"https://api.github.com/users/FEniCS/gists{/gist_id}","starred_url":"https://api.github.com/users/FEniCS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FEniCS/subscriptions","organizations_url":"https://api.github.com/users/FEniCS/orgs","repos_url":"https://api.github.com/users/FEniCS/repos","events_url":"https://api.github.com/users/FEniCS/events{/privacy}","received_events_url":"https://api.github.com/users/FEniCS/received_events","type":"Organization","site_admin":false},"repo":{"id":128214585,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgyMTQ1ODU=","name":"dolfinx","full_name":"FEniCS/dolfinx","owner":{"login":"FEniCS","id":3868708,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4Njg3MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/3868708?v=4","gravatar_id":"","url":"https://api.github.com/users/FEniCS","html_url":"https://github.com/FEniCS","followers_url":"https://api.github.com/users/FEniCS/followers","following_url":"https://api.github.com/users/FEniCS/following{/other_user}","gists_url":"https://api.github.com/users/FEniCS/gists{/gist_id}","starred_url":"https://api.github.com/users/FEniCS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FEniCS/subscriptions","organizations_url":"https://api.github.com/users/FEniCS/orgs","repos_url":"https://api.github.com/users/FEniCS/repos","events_url":"https://api.github.com/users/FEniCS/events{/privacy}","received_events_url":"https://api.github.com/users/FEniCS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FEniCS/dolfinx","description":"Next generation FEniCS problem solving environment","fork":false,"url":"https://api.github.com/repos/FEniCS/dolfinx","forks_url":"https://api.github.com/repos/FEniCS/dolfinx/forks","keys_url":"https://api.github.com/repos/FEniCS/dolfinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FEniCS/dolfinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FEniCS/dolfinx/teams","hooks_url":"https://api.github.com/repos/FEniCS/dolfinx/hooks","issue_events_url":"https://api.github.com/repos/FEniCS/dolfinx/issues/events{/number}","events_url":"https://api.github.com/repos/FEniCS/dolfinx/events","assignees_url":"https://api.github.com/repos/FEniCS/dolfinx/assignees{/user}","branches_url":"https://api.github.com/repos/FEniCS/dolfinx/branches{/branch}","tags_url":"https://api.github.com/repos/FEniCS/dolfinx/tags","blobs_url":"https://api.github.com/repos/FEniCS/dolfinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FEniCS/dolfinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FEniCS/dolfinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/FEniCS/dolfinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FEniCS/dolfinx/statuses/{sha}","languages_url":"https://api.github.com/repos/FEniCS/dolfinx/languages","stargazers_url":"https://api.github.com/repos/FEniCS/dolfinx/stargazers","contributors_url":"https://api.github.com/repos/FEniCS/dolfinx/contributors","subscribers_url":"https://api.github.com/repos/FEniCS/dolfinx/subscribers","subscription_url":"https://api.github.com/repos/FEniCS/dolfinx/subscription","commits_url":"https://api.github.com/repos/FEniCS/dolfinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/FEniCS/dolfinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/FEniCS/dolfinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/FEniCS/dolfinx/issues/comments{/number}","contents_url":"https://api.github.com/repos/FEniCS/dolfinx/contents/{+path}","compare_url":"https://api.github.com/repos/FEniCS/dolfinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FEniCS/dolfinx/merges","archive_url":"https://api.github.com/repos/FEniCS/dolfinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FEniCS/dolfinx/downloads","issues_url":"https://api.github.com/repos/FEniCS/dolfinx/issues{/number}","pulls_url":"https://api.github.com/repos/FEniCS/dolfinx/pulls{/number}","milestones_url":"https://api.github.com/repos/FEniCS/dolfinx/milestones{/number}","notifications_url":"https://api.github.com/repos/FEniCS/dolfinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FEniCS/dolfinx/labels{/name}","releases_url":"https://api.github.com/repos/FEniCS/dolfinx/releases{/id}","deployments_url":"https://api.github.com/repos/FEniCS/dolfinx/deployments","created_at":"2018-04-05T14:02:41Z","updated_at":"2018-07-18T17:57:25Z","pushed_at":"2018-07-18T21:45:41Z","git_url":"git://github.com/FEniCS/dolfinx.git","ssh_url":"git@github.com:FEniCS/dolfinx.git","clone_url":"https://github.com/FEniCS/dolfinx.git","svn_url":"https://github.com/FEniCS/dolfinx","homepage":"","size":49882,"stargazers_count":12,"watchers_count":12,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":53,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":4,"open_issues":53,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FEniCS/dolfinx/pulls/135"},"html":{"href":"https://github.com/FEniCS/dolfinx/pull/135"},"issue":{"href":"https://api.github.com/repos/FEniCS/dolfinx/issues/135"},"comments":{"href":"https://api.github.com/repos/FEniCS/dolfinx/issues/135/comments"},"review_comments":{"href":"https://api.github.com/repos/FEniCS/dolfinx/pulls/135/comments"},"review_comment":{"href":"https://api.github.com/repos/FEniCS/dolfinx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FEniCS/dolfinx/pulls/135/commits"},"statuses":{"href":"https://api.github.com/repos/FEniCS/dolfinx/statuses/d9a07ff2f2615400a9445251c966740be4894e22"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"garth-wells"}}