{"action":"created","comment":{"url":"https://api.github.com/repos/PBSPro/pbspro/pulls/comments/129248710","pull_request_review_id":52000607,"id":129248710,"diff_hunk":"@@ -3013,48 +3437,364 @@ parse_char_data(void *ud, const XML_Char *s, int len)\n {\n \tud_t *d;\n \n-\tif (!ud)\n-\t\treturn;\n-\td = (ud_t *)ud;\n-\thandler[d->stack[d->depth]].char_data(d, s, len);\n+\tif (!ud)\n+\t\treturn;\n+\td = (ud_t *)ud;\n+\thandler[d->stack[d->depth]].char_data(d, s, len);\n+\treturn;\n+}\n+\n+/**\n+ * @brief\n+ *\tThis function walks all the segments and fills in the information needed to\n+ * generate the vnodes. It is called directly when PBS is using BASIL 1.2 or\n+ * prior XML inventories. It is called from within the socket loop when PBS\n+ * gets BASIL 1.3 and BASIL 1.4 XML inventory.\n+ * @param[in] node\tinformation about the node\n+ * @param[in] nv\tvnode list information\n+ * @param[in] arch\tthe architecture of the vnode\n+ * @param[in/out] total_seg\tlatest count of the segments, to increase\n+ *\t\t\t\tacross sockets\n+ * @param[in] order\torder number of the vnode\n+ * @param[in/out] name_buf\tupon exiting it contains the name of the vnode\n+ * @param[in/out] total_cpu\tkeeps a running count of cpus for the whole node\n+ * @param[in/out] total_mem\tkeeps a running count of mem for the whole node\n+ *\n+ * These last three parameters are used for the vnode_per_numa_node = 0 case.\n+ * Where we only create one PBS vnode per Cray compute node\n+ *\n+ * @return Void\n+ */\n+void\n+inventory_loop_on_segments(basil_node_t *node, vnl_t *nv, char *arch,\n+\tint *total_seg, long order, char *name_buf, int *total_cpu, long *total_mem)\n+{\n+\tbasil_node_segment_t\t*seg = NULL;\n+\tbasil_node_processor_t\t*proc = NULL;\n+\tbasil_node_memory_t *mem = NULL;\n+\tbasil_label_t *label = NULL;\n+\tbasil_node_accelerator_t *accel = NULL;\n+\tbasil_node_computeunit_t *cu = NULL;\n+\tint\taflag = READ_WRITE | ATR_DFLAG_CVTSLT;\n+\tlong\ttotmem;\n+\tint\ttotcpus;\n+\tint\ttotaccel = 0;\n+\tint\tfirst_seg = 0;\n+\tchar\tvname[VNODE_NAME_LEN];\n+\tchar\t*attr;\n+\tint\ttotseg;\n+\n+\t/* Proceed only if we have valid pointers */\n+\tif (node == NULL) {\n+\t\tsprintf(log_buffer, \"Bad pointer to node info\");\n+\t\tlog_event(PBSEVENT_ERROR, PBS_EVENTCLASS_NODE,\n+\t\t\tLOG_ERR, __func__, log_buffer);\n+\t\treturn;\n+\t}\n+\tif (nv == NULL) {\n+\t\tsprintf(log_buffer, \"Bad pointer to node list info\");","path":"src/resmom/linux/alps.c","position":1470,"original_position":1470,"commit_id":"31233224852ea1621b1d0827c381c0163e54e028","original_commit_id":"d5e043a50cbb4e825a5c8b0dedc4f3e88641af00","user":{"login":"dilip-krishnan","id":17922772,"avatar_url":"https://avatars3.githubusercontent.com/u/17922772?v=4","gravatar_id":"","url":"https://api.github.com/users/dilip-krishnan","html_url":"https://github.com/dilip-krishnan","followers_url":"https://api.github.com/users/dilip-krishnan/followers","following_url":"https://api.github.com/users/dilip-krishnan/following{/other_user}","gists_url":"https://api.github.com/users/dilip-krishnan/gists{/gist_id}","starred_url":"https://api.github.com/users/dilip-krishnan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilip-krishnan/subscriptions","organizations_url":"https://api.github.com/users/dilip-krishnan/orgs","repos_url":"https://api.github.com/users/dilip-krishnan/repos","events_url":"https://api.github.com/users/dilip-krishnan/events{/privacy}","received_events_url":"https://api.github.com/users/dilip-krishnan/received_events","type":"User","site_admin":false},"body":"Same reason as above.","created_at":"2017-07-25T08:59:49Z","updated_at":"2017-07-25T08:59:49Z","html_url":"https://github.com/PBSPro/pbspro/pull/326#discussion_r129248710","pull_request_url":"https://api.github.com/repos/PBSPro/pbspro/pulls/326","_links":{"self":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/comments/129248710"},"html":{"href":"https://github.com/PBSPro/pbspro/pull/326#discussion_r129248710"},"pull_request":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/326"}}},"pull_request":{"url":"https://api.github.com/repos/PBSPro/pbspro/pulls/326","id":128077996,"html_url":"https://github.com/PBSPro/pbspro/pull/326","diff_url":"https://github.com/PBSPro/pbspro/pull/326.diff","patch_url":"https://github.com/PBSPro/pbspro/pull/326.patch","issue_url":"https://api.github.com/repos/PBSPro/pbspro/issues/326","number":326,"state":"open","locked":false,"title":"PP-809: Support Basil 1.3 and 1.4","user":{"login":"dilip-krishnan","id":17922772,"avatar_url":"https://avatars3.githubusercontent.com/u/17922772?v=4","gravatar_id":"","url":"https://api.github.com/users/dilip-krishnan","html_url":"https://github.com/dilip-krishnan","followers_url":"https://api.github.com/users/dilip-krishnan/followers","following_url":"https://api.github.com/users/dilip-krishnan/following{/other_user}","gists_url":"https://api.github.com/users/dilip-krishnan/gists{/gist_id}","starred_url":"https://api.github.com/users/dilip-krishnan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilip-krishnan/subscriptions","organizations_url":"https://api.github.com/users/dilip-krishnan/orgs","repos_url":"https://api.github.com/users/dilip-krishnan/repos","events_url":"https://api.github.com/users/dilip-krishnan/events{/privacy}","received_events_url":"https://api.github.com/users/dilip-krishnan/received_events","type":"User","site_admin":false},"body":"<!--- Please review your changes in preview mode -->\r\n<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n#### Issue-ID\r\n<!--- Replace XXXX below (2 places) with the actual JIRA id -->\r\n* **[PP-809](https://pbspro.atlassian.net/browse/PP-809)**\r\n\r\n#### Problem description\r\n*  The new BASIL 1.3/1.4 speci\fcation, an augmentation of the 1.2 speci\f-\r\ncation, adds support for Intel microprocessors with Hyper-Threading\r\nTechnology and AMD microprocessors with Modules (via the Com-\r\npute Unit concept), topology support, adds socket information to the\r\nQUERY(INVENTORY).\r\n\r\n#### Cause / Analysis\r\n* PBS as of now supports BASIL 1.2, but CLE 5.2 provides even better BASIL 1.3 &1.4 interface, \r\nwhich is not yet supported in PBS\r\n\r\n#### Solution description\r\n* PBS should parse the new inventory response from BASIL 1.3 and BASIL 1.4 interface, to create vnodes\r\nout of compute nodes on cray.\r\n\r\n#### Checklist:\r\n<!--- Use the preview button to see the checkboxes/links properly. -->\r\n<!--- Go over the following points, and put an `x` (without spaces around it) in the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] I have joined the **[pbspro community forum](http://community.pbspro.org/)**.\r\n- [x] My pull request contains a **single, signed** commit. See **[setting up gpg signature](https://pbspro.atlassian.net/wiki/display/DG/Signing+Your+Git+Commits)**.\r\n- [x] My code follows the **[coding style](https://pbspro.atlassian.net/wiki/display/DG/Coding+Standards)** of this project.\r\n- [ ] My change requires project documentation. See **[required documentation checklist](https://pbspro.atlassian.net/wiki/display/DG/Checklist+for+Developing+Features+and+Bug+Fixes)** for details.\r\n- [ ] I have added documentation in the **[project documentation area](https://pbspro.atlassian.net/wiki/display/PD)**.\r\n- [ ] I have added new **PTL test(s) to my commit**. (See **[using PTL for testing](https://pbspro.atlassian.net/wiki/display/DG/Using+PTL+for+Testing)**) *(or)*\r\n- [ ] I have added  **manual test(s) to the Jira ticket and explained why PTL is not appropriate** for this case.\r\n- [x] All new and existing automated tests have passed. (See **[running automated PTL tests](https://pbspro.atlassian.net/wiki/display/DG/PTL+Quick+Start+Guide)**).\r\n- [ ] I have attached **test logs to the Jira ticket** as evidence of testing/verification.\r\n\r\n\r\n__***For further information please visit the [Developer Guide Home](https://pbspro.atlassian.net/wiki/display/DG/Developer+Guide+Home).***__","created_at":"2017-06-29T06:32:12Z","updated_at":"2017-07-25T08:59:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0553bdcd9e5cfa0272fb68d5790c273156e1f9f0","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/PBSPro/pbspro/pulls/326/commits","review_comments_url":"https://api.github.com/repos/PBSPro/pbspro/pulls/326/comments","review_comment_url":"https://api.github.com/repos/PBSPro/pbspro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PBSPro/pbspro/issues/326/comments","statuses_url":"https://api.github.com/repos/PBSPro/pbspro/statuses/31233224852ea1621b1d0827c381c0163e54e028","head":{"label":"dilip-krishnan:PP-809","ref":"PP-809","sha":"31233224852ea1621b1d0827c381c0163e54e028","user":{"login":"dilip-krishnan","id":17922772,"avatar_url":"https://avatars3.githubusercontent.com/u/17922772?v=4","gravatar_id":"","url":"https://api.github.com/users/dilip-krishnan","html_url":"https://github.com/dilip-krishnan","followers_url":"https://api.github.com/users/dilip-krishnan/followers","following_url":"https://api.github.com/users/dilip-krishnan/following{/other_user}","gists_url":"https://api.github.com/users/dilip-krishnan/gists{/gist_id}","starred_url":"https://api.github.com/users/dilip-krishnan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilip-krishnan/subscriptions","organizations_url":"https://api.github.com/users/dilip-krishnan/orgs","repos_url":"https://api.github.com/users/dilip-krishnan/repos","events_url":"https://api.github.com/users/dilip-krishnan/events{/privacy}","received_events_url":"https://api.github.com/users/dilip-krishnan/received_events","type":"User","site_admin":false},"repo":{"id":63232421,"name":"pbspro","full_name":"dilip-krishnan/pbspro","owner":{"login":"dilip-krishnan","id":17922772,"avatar_url":"https://avatars3.githubusercontent.com/u/17922772?v=4","gravatar_id":"","url":"https://api.github.com/users/dilip-krishnan","html_url":"https://github.com/dilip-krishnan","followers_url":"https://api.github.com/users/dilip-krishnan/followers","following_url":"https://api.github.com/users/dilip-krishnan/following{/other_user}","gists_url":"https://api.github.com/users/dilip-krishnan/gists{/gist_id}","starred_url":"https://api.github.com/users/dilip-krishnan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilip-krishnan/subscriptions","organizations_url":"https://api.github.com/users/dilip-krishnan/orgs","repos_url":"https://api.github.com/users/dilip-krishnan/repos","events_url":"https://api.github.com/users/dilip-krishnan/events{/privacy}","received_events_url":"https://api.github.com/users/dilip-krishnan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dilip-krishnan/pbspro","description":"An HPC workload manager and job scheduler for desktops, clusters, and clouds.","fork":true,"url":"https://api.github.com/repos/dilip-krishnan/pbspro","forks_url":"https://api.github.com/repos/dilip-krishnan/pbspro/forks","keys_url":"https://api.github.com/repos/dilip-krishnan/pbspro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dilip-krishnan/pbspro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dilip-krishnan/pbspro/teams","hooks_url":"https://api.github.com/repos/dilip-krishnan/pbspro/hooks","issue_events_url":"https://api.github.com/repos/dilip-krishnan/pbspro/issues/events{/number}","events_url":"https://api.github.com/repos/dilip-krishnan/pbspro/events","assignees_url":"https://api.github.com/repos/dilip-krishnan/pbspro/assignees{/user}","branches_url":"https://api.github.com/repos/dilip-krishnan/pbspro/branches{/branch}","tags_url":"https://api.github.com/repos/dilip-krishnan/pbspro/tags","blobs_url":"https://api.github.com/repos/dilip-krishnan/pbspro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dilip-krishnan/pbspro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dilip-krishnan/pbspro/git/refs{/sha}","trees_url":"https://api.github.com/repos/dilip-krishnan/pbspro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dilip-krishnan/pbspro/statuses/{sha}","languages_url":"https://api.github.com/repos/dilip-krishnan/pbspro/languages","stargazers_url":"https://api.github.com/repos/dilip-krishnan/pbspro/stargazers","contributors_url":"https://api.github.com/repos/dilip-krishnan/pbspro/contributors","subscribers_url":"https://api.github.com/repos/dilip-krishnan/pbspro/subscribers","subscription_url":"https://api.github.com/repos/dilip-krishnan/pbspro/subscription","commits_url":"https://api.github.com/repos/dilip-krishnan/pbspro/commits{/sha}","git_commits_url":"https://api.github.com/repos/dilip-krishnan/pbspro/git/commits{/sha}","comments_url":"https://api.github.com/repos/dilip-krishnan/pbspro/comments{/number}","issue_comment_url":"https://api.github.com/repos/dilip-krishnan/pbspro/issues/comments{/number}","contents_url":"https://api.github.com/repos/dilip-krishnan/pbspro/contents/{+path}","compare_url":"https://api.github.com/repos/dilip-krishnan/pbspro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dilip-krishnan/pbspro/merges","archive_url":"https://api.github.com/repos/dilip-krishnan/pbspro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dilip-krishnan/pbspro/downloads","issues_url":"https://api.github.com/repos/dilip-krishnan/pbspro/issues{/number}","pulls_url":"https://api.github.com/repos/dilip-krishnan/pbspro/pulls{/number}","milestones_url":"https://api.github.com/repos/dilip-krishnan/pbspro/milestones{/number}","notifications_url":"https://api.github.com/repos/dilip-krishnan/pbspro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dilip-krishnan/pbspro/labels{/name}","releases_url":"https://api.github.com/repos/dilip-krishnan/pbspro/releases{/id}","deployments_url":"https://api.github.com/repos/dilip-krishnan/pbspro/deployments","created_at":"2016-07-13T09:18:08Z","updated_at":"2016-07-13T09:18:13Z","pushed_at":"2017-07-25T08:56:14Z","git_url":"git://github.com/dilip-krishnan/pbspro.git","ssh_url":"git@github.com:dilip-krishnan/pbspro.git","clone_url":"https://github.com/dilip-krishnan/pbspro.git","svn_url":"https://github.com/dilip-krishnan/pbspro","homepage":"www.pbspro.org","size":7578,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PBSPro:master","ref":"master","sha":"a3ca87fc5a869e43307a6ca317d738249e54e60d","user":{"login":"PBSPro","id":19280436,"avatar_url":"https://avatars2.githubusercontent.com/u/19280436?v=4","gravatar_id":"","url":"https://api.github.com/users/PBSPro","html_url":"https://github.com/PBSPro","followers_url":"https://api.github.com/users/PBSPro/followers","following_url":"https://api.github.com/users/PBSPro/following{/other_user}","gists_url":"https://api.github.com/users/PBSPro/gists{/gist_id}","starred_url":"https://api.github.com/users/PBSPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PBSPro/subscriptions","organizations_url":"https://api.github.com/users/PBSPro/orgs","repos_url":"https://api.github.com/users/PBSPro/repos","events_url":"https://api.github.com/users/PBSPro/events{/privacy}","received_events_url":"https://api.github.com/users/PBSPro/received_events","type":"Organization","site_admin":false},"repo":{"id":59082072,"name":"pbspro","full_name":"PBSPro/pbspro","owner":{"login":"PBSPro","id":19280436,"avatar_url":"https://avatars2.githubusercontent.com/u/19280436?v=4","gravatar_id":"","url":"https://api.github.com/users/PBSPro","html_url":"https://github.com/PBSPro","followers_url":"https://api.github.com/users/PBSPro/followers","following_url":"https://api.github.com/users/PBSPro/following{/other_user}","gists_url":"https://api.github.com/users/PBSPro/gists{/gist_id}","starred_url":"https://api.github.com/users/PBSPro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PBSPro/subscriptions","organizations_url":"https://api.github.com/users/PBSPro/orgs","repos_url":"https://api.github.com/users/PBSPro/repos","events_url":"https://api.github.com/users/PBSPro/events{/privacy}","received_events_url":"https://api.github.com/users/PBSPro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PBSPro/pbspro","description":"An HPC workload manager and job scheduler for desktops, clusters, and clouds.","fork":false,"url":"https://api.github.com/repos/PBSPro/pbspro","forks_url":"https://api.github.com/repos/PBSPro/pbspro/forks","keys_url":"https://api.github.com/repos/PBSPro/pbspro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PBSPro/pbspro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PBSPro/pbspro/teams","hooks_url":"https://api.github.com/repos/PBSPro/pbspro/hooks","issue_events_url":"https://api.github.com/repos/PBSPro/pbspro/issues/events{/number}","events_url":"https://api.github.com/repos/PBSPro/pbspro/events","assignees_url":"https://api.github.com/repos/PBSPro/pbspro/assignees{/user}","branches_url":"https://api.github.com/repos/PBSPro/pbspro/branches{/branch}","tags_url":"https://api.github.com/repos/PBSPro/pbspro/tags","blobs_url":"https://api.github.com/repos/PBSPro/pbspro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PBSPro/pbspro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PBSPro/pbspro/git/refs{/sha}","trees_url":"https://api.github.com/repos/PBSPro/pbspro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PBSPro/pbspro/statuses/{sha}","languages_url":"https://api.github.com/repos/PBSPro/pbspro/languages","stargazers_url":"https://api.github.com/repos/PBSPro/pbspro/stargazers","contributors_url":"https://api.github.com/repos/PBSPro/pbspro/contributors","subscribers_url":"https://api.github.com/repos/PBSPro/pbspro/subscribers","subscription_url":"https://api.github.com/repos/PBSPro/pbspro/subscription","commits_url":"https://api.github.com/repos/PBSPro/pbspro/commits{/sha}","git_commits_url":"https://api.github.com/repos/PBSPro/pbspro/git/commits{/sha}","comments_url":"https://api.github.com/repos/PBSPro/pbspro/comments{/number}","issue_comment_url":"https://api.github.com/repos/PBSPro/pbspro/issues/comments{/number}","contents_url":"https://api.github.com/repos/PBSPro/pbspro/contents/{+path}","compare_url":"https://api.github.com/repos/PBSPro/pbspro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PBSPro/pbspro/merges","archive_url":"https://api.github.com/repos/PBSPro/pbspro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PBSPro/pbspro/downloads","issues_url":"https://api.github.com/repos/PBSPro/pbspro/issues{/number}","pulls_url":"https://api.github.com/repos/PBSPro/pbspro/pulls{/number}","milestones_url":"https://api.github.com/repos/PBSPro/pbspro/milestones{/number}","notifications_url":"https://api.github.com/repos/PBSPro/pbspro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PBSPro/pbspro/labels{/name}","releases_url":"https://api.github.com/repos/PBSPro/pbspro/releases{/id}","deployments_url":"https://api.github.com/repos/PBSPro/pbspro/deployments","created_at":"2016-05-18T04:31:29Z","updated_at":"2017-07-24T16:13:02Z","pushed_at":"2017-07-25T08:56:16Z","git_url":"git://github.com/PBSPro/pbspro.git","ssh_url":"git@github.com:PBSPro/pbspro.git","clone_url":"https://github.com/PBSPro/pbspro.git","svn_url":"https://github.com/PBSPro/pbspro","homepage":"www.pbspro.org","size":7542,"stargazers_count":100,"watchers_count":100,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":16,"forks":101,"open_issues":16,"watchers":100,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/326"},"html":{"href":"https://github.com/PBSPro/pbspro/pull/326"},"issue":{"href":"https://api.github.com/repos/PBSPro/pbspro/issues/326"},"comments":{"href":"https://api.github.com/repos/PBSPro/pbspro/issues/326/comments"},"review_comments":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/326/comments"},"review_comment":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PBSPro/pbspro/pulls/326/commits"},"statuses":{"href":"https://api.github.com/repos/PBSPro/pbspro/statuses/31233224852ea1621b1d0827c381c0163e54e028"}}}}
{"actor":{"display_login":"dilip-krishnan"}}