{"action":"created","comment":{"url":"https://api.github.com/repos/ufz/ogs/pulls/comments/105625168","pull_request_review_id":26504127,"id":105625168,"diff_hunk":"@@ -262,6 +333,133 @@ NodeWiseMeshPartitioner::getNumberOfIntegerVariablesOfElements(\n     return nmb_element_idxs;\n }\n \n+void NodeWiseMeshPartitioner::writePropertiesBinary(\n+    const std::string& file_name_base) const\n+{\n+    const std::string fname_cfg = file_name_base +\n+                                  \"_partitioned_properties_cfg\" +\n+                                  std::to_string(_npartitions) + \".bin\";\n+    std::ofstream out(fname_cfg.c_str(), std::ios::binary | std::ios::out);\n+\n+    const std::string fname_val = file_name_base +\n+                                  \"_partitioned_properties_val\" +\n+                                  std::to_string(_npartitions) + \".bin\";\n+    std::ofstream out_val(fname_val.c_str(), std::ios::binary | std::ios::out);\n+\n+    auto const& properties(_partitioned_properties);\n+    auto const& property_names(properties.getPropertyVectorNames());\n+    std::size_t number_of_properties(property_names.size());\n+    out.write(reinterpret_cast<char*>(&number_of_properties),\n+              sizeof(number_of_properties));\n+    for (auto const& name : property_names)\n+    {\n+        MeshLib::IO::PropertyVectorMetaData pvmd;\n+        pvmd.property_name = name;\n+        pvmd.is_int_type = false;\n+        {\n+            if (properties.existsPropertyVector<double>(name))\n+            {\n+                auto* pv = properties.getPropertyVector<double>(name);\n+                pvmd.is_int_type = false;\n+                pvmd.is_data_type_signed = false;\n+                pvmd.data_type_size_in_bytes = sizeof(double);\n+                pvmd.number_of_components = pv->getNumberOfComponents();\n+                pvmd.number_of_tuples = pv->getNumberOfTuples();\n+                writePropertyVectorValuesBinary(out_val, *pv);\n+            }\n+        }\n+        {\n+            if (properties.existsPropertyVector<float>(name))\n+            {\n+                auto* pv = properties.getPropertyVector<float>(name);\n+                pvmd.is_int_type = false;\n+                pvmd.is_data_type_signed = false;\n+                pvmd.data_type_size_in_bytes = sizeof(float);\n+                pvmd.number_of_components = pv->getNumberOfComponents();\n+                pvmd.number_of_tuples = pv->getNumberOfTuples();\n+                writePropertyVectorValuesBinary(out_val, *pv);\n+            }\n+        }\n+        {\n+            if (properties.existsPropertyVector<int>(name))\n+            {\n+                auto* pv = properties.getPropertyVector<int>(name);\n+                pvmd.is_int_type = true;\n+                pvmd.is_data_type_signed = true;\n+                pvmd.data_type_size_in_bytes = sizeof(int);\n+                pvmd.number_of_components = pv->getNumberOfComponents();\n+                pvmd.number_of_tuples = pv->getNumberOfTuples();\n+                writePropertyVectorValuesBinary(out_val, *pv);\n+            }\n+        }\n+        {\n+            if (properties.existsPropertyVector<unsigned>(name))\n+            {\n+                auto* pv = properties.getPropertyVector<unsigned>(name);\n+                pvmd.is_int_type = true;\n+                pvmd.is_data_type_signed = false;\n+                pvmd.data_type_size_in_bytes = sizeof(unsigned);\n+                pvmd.number_of_components = pv->getNumberOfComponents();\n+                pvmd.number_of_tuples = pv->getNumberOfTuples();\n+                writePropertyVectorValuesBinary(out_val, *pv);\n+            }\n+        }\n+        MeshLib::IO::writePropertyVectorMetaDataBinary(out, pvmd);\n+    }\n+    unsigned long offset = 0;\n+    for (const auto& partition : _partitions)\n+    {\n+        MeshLib::IO::PropertyVectorPartitionMetaData pvpmd;\n+        pvpmd.offset = offset;\n+        pvpmd.number_of_tuples = partition.nodes.size();\n+        INFO(\n+            \"Write meta data for PropertyVector: global offset %d, number \"\n+            \"of tuples %d\",\n+            pvpmd.offset, pvpmd.number_of_tuples);\n+        MeshLib::IO::writePropertyVectorPartitionMetaData(out, pvpmd);\n+        offset += pvpmd.number_of_tuples;\n+    }\n+    out.close();\n+    out_val.close();\n+}\n+\n+void NodeWiseMeshPartitioner::readPropertiesConfigDataBinary(\n+    const std::string& file_name_base) const\n+{\n+    const std::string fname = file_name_base + \"_partitioned_properties_cfg\"\n+                              + std::to_string(_npartitions) + \".bin\";\n+    std::ifstream is(fname.c_str(), std::ios::binary | std::ios::in);\n+    if (!is)","path":"Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp","position":368,"original_position":368,"commit_id":"09cb9f23aeb97fa9ac1177e6d19def3b6fa2899b","original_commit_id":"09cb9f23aeb97fa9ac1177e6d19def3b6fa2899b","user":{"login":"wenqing","id":1343839,"avatar_url":"https://avatars0.githubusercontent.com/u/1343839?v=3","gravatar_id":"","url":"https://api.github.com/users/wenqing","html_url":"https://github.com/wenqing","followers_url":"https://api.github.com/users/wenqing/followers","following_url":"https://api.github.com/users/wenqing/following{/other_user}","gists_url":"https://api.github.com/users/wenqing/gists{/gist_id}","starred_url":"https://api.github.com/users/wenqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenqing/subscriptions","organizations_url":"https://api.github.com/users/wenqing/orgs","repos_url":"https://api.github.com/users/wenqing/repos","events_url":"https://api.github.com/users/wenqing/events{/privacy}","received_events_url":"https://api.github.com/users/wenqing/received_events","type":"User","site_admin":false},"body":"Since the parallel reading is implemented by your own instead of using MPI_File_read, you need more MPI barriers to synchronise the computations among compute code.  Besides, if conditions, which may be in different status on different compute cores,  have be to check by MPI communication. Therefore,  I am not sure about the efficiency of the current implementation.\r\n\r\nYou can keep the current implementation by adding\r\n``MPI_Barrier(_mpi_comm )`` before this if-condition and before the end of this function.\r\n\r\n","created_at":"2017-03-13T10:07:06Z","updated_at":"2017-03-13T10:13:58Z","html_url":"https://github.com/ufz/ogs/pull/1745#discussion_r105625168","pull_request_url":"https://api.github.com/repos/ufz/ogs/pulls/1745","_links":{"self":{"href":"https://api.github.com/repos/ufz/ogs/pulls/comments/105625168"},"html":{"href":"https://github.com/ufz/ogs/pull/1745#discussion_r105625168"},"pull_request":{"href":"https://api.github.com/repos/ufz/ogs/pulls/1745"}}},"pull_request":{"url":"https://api.github.com/repos/ufz/ogs/pulls/1745","id":110113045,"html_url":"https://github.com/ufz/ogs/pull/1745","diff_url":"https://github.com/ufz/ogs/pull/1745.diff","patch_url":"https://github.com/ufz/ogs/pull/1745.patch","issue_url":"https://api.github.com/repos/ufz/ogs/issues/1745","number":1745,"state":"open","locked":false,"title":"[HPC] Partition PropertyVectors and read partitioned PropertyVectors","user":{"login":"TomFischer","id":800065,"avatar_url":"https://avatars1.githubusercontent.com/u/800065?v=3","gravatar_id":"","url":"https://api.github.com/users/TomFischer","html_url":"https://github.com/TomFischer","followers_url":"https://api.github.com/users/TomFischer/followers","following_url":"https://api.github.com/users/TomFischer/following{/other_user}","gists_url":"https://api.github.com/users/TomFischer/gists{/gist_id}","starred_url":"https://api.github.com/users/TomFischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomFischer/subscriptions","organizations_url":"https://api.github.com/users/TomFischer/orgs","repos_url":"https://api.github.com/users/TomFischer/repos","events_url":"https://api.github.com/users/TomFischer/events{/privacy}","received_events_url":"https://api.github.com/users/TomFischer/received_events","type":"User","site_admin":false},"body":"The PR adds the partitioning computed by metis also to the `PropertVector`s in the mesh and stores the meta data as well as the property values in separate binary files. The current PR contains the partitioning only for `PropertyVector`'s assigned to mesh nodes. The PR also includes the reading of the `PropertyVector`'s into a parallel running ogs.","created_at":"2017-03-10T11:45:01Z","updated_at":"2017-03-13T10:13:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aae952ca0bd9f5370fcd74862982f918c5dcb477","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ufz/ogs/pulls/1745/commits","review_comments_url":"https://api.github.com/repos/ufz/ogs/pulls/1745/comments","review_comment_url":"https://api.github.com/repos/ufz/ogs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ufz/ogs/issues/1745/comments","statuses_url":"https://api.github.com/repos/ufz/ogs/statuses/09cb9f23aeb97fa9ac1177e6d19def3b6fa2899b","head":{"label":"TomFischer:PartitionArray","ref":"PartitionArray","sha":"09cb9f23aeb97fa9ac1177e6d19def3b6fa2899b","user":{"login":"TomFischer","id":800065,"avatar_url":"https://avatars1.githubusercontent.com/u/800065?v=3","gravatar_id":"","url":"https://api.github.com/users/TomFischer","html_url":"https://github.com/TomFischer","followers_url":"https://api.github.com/users/TomFischer/followers","following_url":"https://api.github.com/users/TomFischer/following{/other_user}","gists_url":"https://api.github.com/users/TomFischer/gists{/gist_id}","starred_url":"https://api.github.com/users/TomFischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomFischer/subscriptions","organizations_url":"https://api.github.com/users/TomFischer/orgs","repos_url":"https://api.github.com/users/TomFischer/repos","events_url":"https://api.github.com/users/TomFischer/events{/privacy}","received_events_url":"https://api.github.com/users/TomFischer/received_events","type":"User","site_admin":false},"repo":{"id":6882427,"name":"ogs","full_name":"TomFischer/ogs","owner":{"login":"TomFischer","id":800065,"avatar_url":"https://avatars1.githubusercontent.com/u/800065?v=3","gravatar_id":"","url":"https://api.github.com/users/TomFischer","html_url":"https://github.com/TomFischer","followers_url":"https://api.github.com/users/TomFischer/followers","following_url":"https://api.github.com/users/TomFischer/following{/other_user}","gists_url":"https://api.github.com/users/TomFischer/gists{/gist_id}","starred_url":"https://api.github.com/users/TomFischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomFischer/subscriptions","organizations_url":"https://api.github.com/users/TomFischer/orgs","repos_url":"https://api.github.com/users/TomFischer/repos","events_url":"https://api.github.com/users/TomFischer/events{/privacy}","received_events_url":"https://api.github.com/users/TomFischer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TomFischer/ogs","description":"OGS source code","fork":true,"url":"https://api.github.com/repos/TomFischer/ogs","forks_url":"https://api.github.com/repos/TomFischer/ogs/forks","keys_url":"https://api.github.com/repos/TomFischer/ogs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TomFischer/ogs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TomFischer/ogs/teams","hooks_url":"https://api.github.com/repos/TomFischer/ogs/hooks","issue_events_url":"https://api.github.com/repos/TomFischer/ogs/issues/events{/number}","events_url":"https://api.github.com/repos/TomFischer/ogs/events","assignees_url":"https://api.github.com/repos/TomFischer/ogs/assignees{/user}","branches_url":"https://api.github.com/repos/TomFischer/ogs/branches{/branch}","tags_url":"https://api.github.com/repos/TomFischer/ogs/tags","blobs_url":"https://api.github.com/repos/TomFischer/ogs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TomFischer/ogs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TomFischer/ogs/git/refs{/sha}","trees_url":"https://api.github.com/repos/TomFischer/ogs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TomFischer/ogs/statuses/{sha}","languages_url":"https://api.github.com/repos/TomFischer/ogs/languages","stargazers_url":"https://api.github.com/repos/TomFischer/ogs/stargazers","contributors_url":"https://api.github.com/repos/TomFischer/ogs/contributors","subscribers_url":"https://api.github.com/repos/TomFischer/ogs/subscribers","subscription_url":"https://api.github.com/repos/TomFischer/ogs/subscription","commits_url":"https://api.github.com/repos/TomFischer/ogs/commits{/sha}","git_commits_url":"https://api.github.com/repos/TomFischer/ogs/git/commits{/sha}","comments_url":"https://api.github.com/repos/TomFischer/ogs/comments{/number}","issue_comment_url":"https://api.github.com/repos/TomFischer/ogs/issues/comments{/number}","contents_url":"https://api.github.com/repos/TomFischer/ogs/contents/{+path}","compare_url":"https://api.github.com/repos/TomFischer/ogs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TomFischer/ogs/merges","archive_url":"https://api.github.com/repos/TomFischer/ogs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TomFischer/ogs/downloads","issues_url":"https://api.github.com/repos/TomFischer/ogs/issues{/number}","pulls_url":"https://api.github.com/repos/TomFischer/ogs/pulls{/number}","milestones_url":"https://api.github.com/repos/TomFischer/ogs/milestones{/number}","notifications_url":"https://api.github.com/repos/TomFischer/ogs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TomFischer/ogs/labels{/name}","releases_url":"https://api.github.com/repos/TomFischer/ogs/releases{/id}","deployments_url":"https://api.github.com/repos/TomFischer/ogs/deployments","created_at":"2012-11-27T11:49:36Z","updated_at":"2015-05-08T04:13:45Z","pushed_at":"2017-03-13T09:08:59Z","git_url":"git://github.com/TomFischer/ogs.git","ssh_url":"git@github.com:TomFischer/ogs.git","clone_url":"https://github.com/TomFischer/ogs.git","svn_url":"https://github.com/TomFischer/ogs","homepage":"www.opengeosys.org","size":17661,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ufz:master","ref":"master","sha":"3ca062c2ff264b56e74966a7d3026441fb79e437","user":{"login":"ufz","id":767517,"avatar_url":"https://avatars0.githubusercontent.com/u/767517?v=3","gravatar_id":"","url":"https://api.github.com/users/ufz","html_url":"https://github.com/ufz","followers_url":"https://api.github.com/users/ufz/followers","following_url":"https://api.github.com/users/ufz/following{/other_user}","gists_url":"https://api.github.com/users/ufz/gists{/gist_id}","starred_url":"https://api.github.com/users/ufz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufz/subscriptions","organizations_url":"https://api.github.com/users/ufz/orgs","repos_url":"https://api.github.com/users/ufz/repos","events_url":"https://api.github.com/users/ufz/events{/privacy}","received_events_url":"https://api.github.com/users/ufz/received_events","type":"Organization","site_admin":false},"repo":{"id":1701384,"name":"ogs","full_name":"ufz/ogs","owner":{"login":"ufz","id":767517,"avatar_url":"https://avatars0.githubusercontent.com/u/767517?v=3","gravatar_id":"","url":"https://api.github.com/users/ufz","html_url":"https://github.com/ufz","followers_url":"https://api.github.com/users/ufz/followers","following_url":"https://api.github.com/users/ufz/following{/other_user}","gists_url":"https://api.github.com/users/ufz/gists{/gist_id}","starred_url":"https://api.github.com/users/ufz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufz/subscriptions","organizations_url":"https://api.github.com/users/ufz/orgs","repos_url":"https://api.github.com/users/ufz/repos","events_url":"https://api.github.com/users/ufz/events{/privacy}","received_events_url":"https://api.github.com/users/ufz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ufz/ogs","description":"Experimental OGS-6 source code","fork":false,"url":"https://api.github.com/repos/ufz/ogs","forks_url":"https://api.github.com/repos/ufz/ogs/forks","keys_url":"https://api.github.com/repos/ufz/ogs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ufz/ogs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ufz/ogs/teams","hooks_url":"https://api.github.com/repos/ufz/ogs/hooks","issue_events_url":"https://api.github.com/repos/ufz/ogs/issues/events{/number}","events_url":"https://api.github.com/repos/ufz/ogs/events","assignees_url":"https://api.github.com/repos/ufz/ogs/assignees{/user}","branches_url":"https://api.github.com/repos/ufz/ogs/branches{/branch}","tags_url":"https://api.github.com/repos/ufz/ogs/tags","blobs_url":"https://api.github.com/repos/ufz/ogs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ufz/ogs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ufz/ogs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ufz/ogs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ufz/ogs/statuses/{sha}","languages_url":"https://api.github.com/repos/ufz/ogs/languages","stargazers_url":"https://api.github.com/repos/ufz/ogs/stargazers","contributors_url":"https://api.github.com/repos/ufz/ogs/contributors","subscribers_url":"https://api.github.com/repos/ufz/ogs/subscribers","subscription_url":"https://api.github.com/repos/ufz/ogs/subscription","commits_url":"https://api.github.com/repos/ufz/ogs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ufz/ogs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ufz/ogs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ufz/ogs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ufz/ogs/contents/{+path}","compare_url":"https://api.github.com/repos/ufz/ogs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ufz/ogs/merges","archive_url":"https://api.github.com/repos/ufz/ogs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ufz/ogs/downloads","issues_url":"https://api.github.com/repos/ufz/ogs/issues{/number}","pulls_url":"https://api.github.com/repos/ufz/ogs/pulls{/number}","milestones_url":"https://api.github.com/repos/ufz/ogs/milestones{/number}","notifications_url":"https://api.github.com/repos/ufz/ogs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ufz/ogs/labels{/name}","releases_url":"https://api.github.com/repos/ufz/ogs/releases{/id}","deployments_url":"https://api.github.com/repos/ufz/ogs/deployments","created_at":"2011-05-04T14:09:57Z","updated_at":"2017-02-24T10:45:51Z","pushed_at":"2017-03-13T09:12:37Z","git_url":"git://github.com/ufz/ogs.git","ssh_url":"git@github.com:ufz/ogs.git","clone_url":"https://github.com/ufz/ogs.git","svn_url":"https://github.com/ufz/ogs","homepage":"www.opengeosys.org","size":17556,"stargazers_count":25,"watchers_count":25,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":99,"forks":64,"open_issues":99,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ufz/ogs/pulls/1745"},"html":{"href":"https://github.com/ufz/ogs/pull/1745"},"issue":{"href":"https://api.github.com/repos/ufz/ogs/issues/1745"},"comments":{"href":"https://api.github.com/repos/ufz/ogs/issues/1745/comments"},"review_comments":{"href":"https://api.github.com/repos/ufz/ogs/pulls/1745/comments"},"review_comment":{"href":"https://api.github.com/repos/ufz/ogs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ufz/ogs/pulls/1745/commits"},"statuses":{"href":"https://api.github.com/repos/ufz/ogs/statuses/09cb9f23aeb97fa9ac1177e6d19def3b6fa2899b"}}}}
{"actor":{"display_login":"wenqing"}}