{"action":"created","comment":{"url":"https://api.github.com/repos/spack/spack/pulls/comments/174304599","pull_request_review_id":103636772,"id":174304599,"diff_hunk":"@@ -63,31 +67,27 @@ def libs(self):\n             libraries, root=self.prefix, shared=shared, recursive=True\n         )\n \n-    def install(self, spec, prefix):\n+    def setup_environment(self, spack_env, run_env):\n         # Optimizations for the Intel compiler, suggested by CP2K\n         optflags = '-O2'\n         if self.compiler.name == 'intel':\n-            optflags += ' -xAVX -axCORE-AVX2 -ipo'\n+            # Oh flake8 E265, why won't you let us distinguish commented-out\n+            # code from discursive comments?\n+            #\n+            # optflags += ' -xAVX -axCORE-AVX2 -ipo'\n+            #\n+            # Well, not every lowly login node has AVX or AVX2:\n+            #      $ icc  -xAVX -axCORE-AVX2 -ipo hello.c\n+            #      $ ./a.out\n+            #      Please verify that both the operating system and the \\\n+            #      processor support Intel(R) AVX instructions.\n+            optflags += ' -xSSE4.2 -axCORE-AVX2 -ipo'","path":"var/spack/repos/builtin/packages/libxc/package.py","position":40,"original_position":40,"commit_id":"b0b98ee25e5e69429d7bdc14c943a783b95b515a","original_commit_id":"b0b98ee25e5e69429d7bdc14c943a783b95b515a","user":{"login":"lee218llnl","id":3641995,"avatar_url":"https://avatars0.githubusercontent.com/u/3641995?v=4","gravatar_id":"","url":"https://api.github.com/users/lee218llnl","html_url":"https://github.com/lee218llnl","followers_url":"https://api.github.com/users/lee218llnl/followers","following_url":"https://api.github.com/users/lee218llnl/following{/other_user}","gists_url":"https://api.github.com/users/lee218llnl/gists{/gist_id}","starred_url":"https://api.github.com/users/lee218llnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lee218llnl/subscriptions","organizations_url":"https://api.github.com/users/lee218llnl/orgs","repos_url":"https://api.github.com/users/lee218llnl/repos","events_url":"https://api.github.com/users/lee218llnl/events{/privacy}","received_events_url":"https://api.github.com/users/lee218llnl/received_events","type":"User","site_admin":false},"body":"should we add -axAVX too?","created_at":"2018-03-13T22:26:31Z","updated_at":"2018-03-13T22:26:31Z","html_url":"https://github.com/spack/spack/pull/7469#discussion_r174304599","pull_request_url":"https://api.github.com/repos/spack/spack/pulls/7469","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/spack/spack/pulls/comments/174304599"},"html":{"href":"https://github.com/spack/spack/pull/7469#discussion_r174304599"},"pull_request":{"href":"https://api.github.com/repos/spack/spack/pulls/7469"}}},"pull_request":{"url":"https://api.github.com/repos/spack/spack/pulls/7469","id":174521286,"html_url":"https://github.com/spack/spack/pull/7469","diff_url":"https://github.com/spack/spack/pull/7469.diff","patch_url":"https://github.com/spack/spack/pull/7469.patch","issue_url":"https://api.github.com/repos/spack/spack/issues/7469","number":7469,"state":"open","locked":false,"title":"Intel prefixes","user":{"login":"mgsternberg","id":31289496,"avatar_url":"https://avatars1.githubusercontent.com/u/31289496?v=4","gravatar_id":"","url":"https://api.github.com/users/mgsternberg","html_url":"https://github.com/mgsternberg","followers_url":"https://api.github.com/users/mgsternberg/followers","following_url":"https://api.github.com/users/mgsternberg/following{/other_user}","gists_url":"https://api.github.com/users/mgsternberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mgsternberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgsternberg/subscriptions","organizations_url":"https://api.github.com/users/mgsternberg/orgs","repos_url":"https://api.github.com/users/mgsternberg/repos","events_url":"https://api.github.com/users/mgsternberg/events{/privacy}","received_events_url":"https://api.github.com/users/mgsternberg/received_events","type":"User","site_admin":false},"body":"I reworked `class IntelPackage` to overcome what was for me a _major barrier to entry_ in adopting Spack that showed up when attempting to integrate an existing Intel tool chain on my HPC system.\r\n\r\nThere was a serious conceptual conflict for `prefix` between versions of Intel packages that were installed under Spack and those brought in via `packages.yaml`. I am not the only one to have stumbled over this, see e.g. https://groups.google.com/d/msg/spack/x28qlmqPAys/Ewx6220uAgAJ\r\n\r\nThis is an initial attempt at tackling the problem, having targeted MKL and Intel-MPI as proof-of-concept.  I was able to build ABINIT and CP2K with those, the latter having a downright gluttonous list of dependencies.  Other Intel packages should be possible to integrate.\r\n\r\nThe major affected files so far are:\r\n\r\n- `.../build_systems/intel.py`\r\n- `.../intel-mkl/package.py`\r\n- `.../intel-mpi/package.py`\r\n- `.../intel-parallel-studio/package.py`\r\n\r\nA major goal was _elimination of duplicate code_. To this end, I pulled up `foo_libs()` and related methods into the `IntelPackage` class definition. The following methods should give a flavor of my approach:\r\n\r\n```\r\ndef product_dir(self, product_dir_name, version_glob='_2???.*.*[0-9]',\r\n                postfix_dir=''):\r\n    '''Returns the version-specific directory of an Intel product release,\r\n    holding the main product and possibly auxiliary files from other\r\n    products.\r\n    '''\r\n…\r\ndef component_dir(self, component=None):\r\n    '''Returns the directory of a product component, appropriate for\r\n    presenting to users in environment variables like MKLROOT and\r\n    I_MPI_ROOT, or the product dir itself (when the component not evident\r\n    from the package name and wasn't specified).\r\n    '''\r\n…\r\ndef component_bin_dir(self, component=None, relative=False):\r\n…\r\ndef component_lib_dir(self, component=None, relative=False):\r\n```\r\n\r\nThe reorganization dramatically shortens `.../intel-mkl/package.py`, and allows to write, e.g.\r\n```\r\ndef file_to_source(self):\r\n    return join_path(self.component_bin_dir(), 'mklvars.sh')\r\n```\r\n\r\n\r\nOther changes are minor and showed up/were prompted by testing:\r\n\r\n- `lib/spack/spack/environment.py`\r\n- `var/spack/repos/builtin/packages/libxc/package.py`\r\n\r\n\r\nComments and suggestions on my approach are needed and welcome.","created_at":"2018-03-12T23:24:10Z","updated_at":"2018-03-13T22:26:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13e205b3e096d74f5de4e2bb483e22adbc22805a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"alalazo","id":4199709,"avatar_url":"https://avatars0.githubusercontent.com/u/4199709?v=4","gravatar_id":"","url":"https://api.github.com/users/alalazo","html_url":"https://github.com/alalazo","followers_url":"https://api.github.com/users/alalazo/followers","following_url":"https://api.github.com/users/alalazo/following{/other_user}","gists_url":"https://api.github.com/users/alalazo/gists{/gist_id}","starred_url":"https://api.github.com/users/alalazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alalazo/subscriptions","organizations_url":"https://api.github.com/users/alalazo/orgs","repos_url":"https://api.github.com/users/alalazo/repos","events_url":"https://api.github.com/users/alalazo/events{/privacy}","received_events_url":"https://api.github.com/users/alalazo/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":446620495,"url":"https://api.github.com/repos/spack/spack/labels/WIP","name":"WIP","color":"ededed","default":false},{"id":446754070,"url":"https://api.github.com/repos/spack/spack/labels/blas-lapack-scalapack","name":"blas-lapack-scalapack","color":"4477a8","default":false},{"id":477156668,"url":"https://api.github.com/repos/spack/spack/labels/intel","name":"intel","color":"127cc1","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/spack/spack/pulls/7469/commits","review_comments_url":"https://api.github.com/repos/spack/spack/pulls/7469/comments","review_comment_url":"https://api.github.com/repos/spack/spack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spack/spack/issues/7469/comments","statuses_url":"https://api.github.com/repos/spack/spack/statuses/b0b98ee25e5e69429d7bdc14c943a783b95b515a","head":{"label":"mgsternberg:intel-prefixes","ref":"intel-prefixes","sha":"b0b98ee25e5e69429d7bdc14c943a783b95b515a","user":{"login":"mgsternberg","id":31289496,"avatar_url":"https://avatars1.githubusercontent.com/u/31289496?v=4","gravatar_id":"","url":"https://api.github.com/users/mgsternberg","html_url":"https://github.com/mgsternberg","followers_url":"https://api.github.com/users/mgsternberg/followers","following_url":"https://api.github.com/users/mgsternberg/following{/other_user}","gists_url":"https://api.github.com/users/mgsternberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mgsternberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgsternberg/subscriptions","organizations_url":"https://api.github.com/users/mgsternberg/orgs","repos_url":"https://api.github.com/users/mgsternberg/repos","events_url":"https://api.github.com/users/mgsternberg/events{/privacy}","received_events_url":"https://api.github.com/users/mgsternberg/received_events","type":"User","site_admin":false},"repo":{"id":122229790,"name":"spack","full_name":"mgsternberg/spack","owner":{"login":"mgsternberg","id":31289496,"avatar_url":"https://avatars1.githubusercontent.com/u/31289496?v=4","gravatar_id":"","url":"https://api.github.com/users/mgsternberg","html_url":"https://github.com/mgsternberg","followers_url":"https://api.github.com/users/mgsternberg/followers","following_url":"https://api.github.com/users/mgsternberg/following{/other_user}","gists_url":"https://api.github.com/users/mgsternberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mgsternberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgsternberg/subscriptions","organizations_url":"https://api.github.com/users/mgsternberg/orgs","repos_url":"https://api.github.com/users/mgsternberg/repos","events_url":"https://api.github.com/users/mgsternberg/events{/privacy}","received_events_url":"https://api.github.com/users/mgsternberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mgsternberg/spack","description":"A flexible package manager that supports multiple versions, configurations, platforms, and compilers.","fork":true,"url":"https://api.github.com/repos/mgsternberg/spack","forks_url":"https://api.github.com/repos/mgsternberg/spack/forks","keys_url":"https://api.github.com/repos/mgsternberg/spack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mgsternberg/spack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mgsternberg/spack/teams","hooks_url":"https://api.github.com/repos/mgsternberg/spack/hooks","issue_events_url":"https://api.github.com/repos/mgsternberg/spack/issues/events{/number}","events_url":"https://api.github.com/repos/mgsternberg/spack/events","assignees_url":"https://api.github.com/repos/mgsternberg/spack/assignees{/user}","branches_url":"https://api.github.com/repos/mgsternberg/spack/branches{/branch}","tags_url":"https://api.github.com/repos/mgsternberg/spack/tags","blobs_url":"https://api.github.com/repos/mgsternberg/spack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mgsternberg/spack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mgsternberg/spack/git/refs{/sha}","trees_url":"https://api.github.com/repos/mgsternberg/spack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mgsternberg/spack/statuses/{sha}","languages_url":"https://api.github.com/repos/mgsternberg/spack/languages","stargazers_url":"https://api.github.com/repos/mgsternberg/spack/stargazers","contributors_url":"https://api.github.com/repos/mgsternberg/spack/contributors","subscribers_url":"https://api.github.com/repos/mgsternberg/spack/subscribers","subscription_url":"https://api.github.com/repos/mgsternberg/spack/subscription","commits_url":"https://api.github.com/repos/mgsternberg/spack/commits{/sha}","git_commits_url":"https://api.github.com/repos/mgsternberg/spack/git/commits{/sha}","comments_url":"https://api.github.com/repos/mgsternberg/spack/comments{/number}","issue_comment_url":"https://api.github.com/repos/mgsternberg/spack/issues/comments{/number}","contents_url":"https://api.github.com/repos/mgsternberg/spack/contents/{+path}","compare_url":"https://api.github.com/repos/mgsternberg/spack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mgsternberg/spack/merges","archive_url":"https://api.github.com/repos/mgsternberg/spack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mgsternberg/spack/downloads","issues_url":"https://api.github.com/repos/mgsternberg/spack/issues{/number}","pulls_url":"https://api.github.com/repos/mgsternberg/spack/pulls{/number}","milestones_url":"https://api.github.com/repos/mgsternberg/spack/milestones{/number}","notifications_url":"https://api.github.com/repos/mgsternberg/spack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mgsternberg/spack/labels{/name}","releases_url":"https://api.github.com/repos/mgsternberg/spack/releases{/id}","deployments_url":"https://api.github.com/repos/mgsternberg/spack/deployments","created_at":"2018-02-20T17:16:32Z","updated_at":"2018-03-13T16:56:24Z","pushed_at":"2018-03-13T17:44:20Z","git_url":"git://github.com/mgsternberg/spack.git","ssh_url":"git@github.com:mgsternberg/spack.git","clone_url":"https://github.com/mgsternberg/spack.git","svn_url":"https://github.com/mgsternberg/spack","homepage":"https://spack.io","size":36134,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"spack:develop","ref":"develop","sha":"5bd8ec8160050922be85112717396cd438476b57","user":{"login":"spack","id":25539161,"avatar_url":"https://avatars2.githubusercontent.com/u/25539161?v=4","gravatar_id":"","url":"https://api.github.com/users/spack","html_url":"https://github.com/spack","followers_url":"https://api.github.com/users/spack/followers","following_url":"https://api.github.com/users/spack/following{/other_user}","gists_url":"https://api.github.com/users/spack/gists{/gist_id}","starred_url":"https://api.github.com/users/spack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spack/subscriptions","organizations_url":"https://api.github.com/users/spack/orgs","repos_url":"https://api.github.com/users/spack/repos","events_url":"https://api.github.com/users/spack/events{/privacy}","received_events_url":"https://api.github.com/users/spack/received_events","type":"Organization","site_admin":false},"repo":{"id":15730865,"name":"spack","full_name":"spack/spack","owner":{"login":"spack","id":25539161,"avatar_url":"https://avatars2.githubusercontent.com/u/25539161?v=4","gravatar_id":"","url":"https://api.github.com/users/spack","html_url":"https://github.com/spack","followers_url":"https://api.github.com/users/spack/followers","following_url":"https://api.github.com/users/spack/following{/other_user}","gists_url":"https://api.github.com/users/spack/gists{/gist_id}","starred_url":"https://api.github.com/users/spack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spack/subscriptions","organizations_url":"https://api.github.com/users/spack/orgs","repos_url":"https://api.github.com/users/spack/repos","events_url":"https://api.github.com/users/spack/events{/privacy}","received_events_url":"https://api.github.com/users/spack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spack/spack","description":"A flexible package manager that supports multiple versions, configurations, platforms, and compilers.","fork":false,"url":"https://api.github.com/repos/spack/spack","forks_url":"https://api.github.com/repos/spack/spack/forks","keys_url":"https://api.github.com/repos/spack/spack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spack/spack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spack/spack/teams","hooks_url":"https://api.github.com/repos/spack/spack/hooks","issue_events_url":"https://api.github.com/repos/spack/spack/issues/events{/number}","events_url":"https://api.github.com/repos/spack/spack/events","assignees_url":"https://api.github.com/repos/spack/spack/assignees{/user}","branches_url":"https://api.github.com/repos/spack/spack/branches{/branch}","tags_url":"https://api.github.com/repos/spack/spack/tags","blobs_url":"https://api.github.com/repos/spack/spack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spack/spack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spack/spack/git/refs{/sha}","trees_url":"https://api.github.com/repos/spack/spack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spack/spack/statuses/{sha}","languages_url":"https://api.github.com/repos/spack/spack/languages","stargazers_url":"https://api.github.com/repos/spack/spack/stargazers","contributors_url":"https://api.github.com/repos/spack/spack/contributors","subscribers_url":"https://api.github.com/repos/spack/spack/subscribers","subscription_url":"https://api.github.com/repos/spack/spack/subscription","commits_url":"https://api.github.com/repos/spack/spack/commits{/sha}","git_commits_url":"https://api.github.com/repos/spack/spack/git/commits{/sha}","comments_url":"https://api.github.com/repos/spack/spack/comments{/number}","issue_comment_url":"https://api.github.com/repos/spack/spack/issues/comments{/number}","contents_url":"https://api.github.com/repos/spack/spack/contents/{+path}","compare_url":"https://api.github.com/repos/spack/spack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spack/spack/merges","archive_url":"https://api.github.com/repos/spack/spack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spack/spack/downloads","issues_url":"https://api.github.com/repos/spack/spack/issues{/number}","pulls_url":"https://api.github.com/repos/spack/spack/pulls{/number}","milestones_url":"https://api.github.com/repos/spack/spack/milestones{/number}","notifications_url":"https://api.github.com/repos/spack/spack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spack/spack/labels{/name}","releases_url":"https://api.github.com/repos/spack/spack/releases{/id}","deployments_url":"https://api.github.com/repos/spack/spack/deployments","created_at":"2014-01-08T09:22:12Z","updated_at":"2018-03-10T20:19:26Z","pushed_at":"2018-03-13T22:09:39Z","git_url":"git://github.com/spack/spack.git","ssh_url":"git@github.com:spack/spack.git","clone_url":"https://github.com/spack/spack.git","svn_url":"https://github.com/spack/spack","homepage":"https://spack.io","size":36104,"stargazers_count":501,"watchers_count":501,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":395,"mirror_url":null,"archived":false,"open_issues_count":877,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":395,"open_issues":877,"watchers":501,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/spack/spack/pulls/7469"},"html":{"href":"https://github.com/spack/spack/pull/7469"},"issue":{"href":"https://api.github.com/repos/spack/spack/issues/7469"},"comments":{"href":"https://api.github.com/repos/spack/spack/issues/7469/comments"},"review_comments":{"href":"https://api.github.com/repos/spack/spack/pulls/7469/comments"},"review_comment":{"href":"https://api.github.com/repos/spack/spack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spack/spack/pulls/7469/commits"},"statuses":{"href":"https://api.github.com/repos/spack/spack/statuses/b0b98ee25e5e69429d7bdc14c943a783b95b515a"}},"author_association":"NONE"}}
{"actor":{"display_login":"lee218llnl"}}