Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
bef56063
Unverified
Commit
bef56063
authored
4 years ago
by
Massimiliano Culpo
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
intel: added external detection capabilities (#17991)
parent
71748a3b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
var/spack/repos/builtin/packages/intel/package.py
+57
-1
57 additions, 1 deletion
var/spack/repos/builtin/packages/intel/package.py
with
57 additions
and
1 deletion
var/spack/repos/builtin/packages/intel/package.py
+
57
−
1
View file @
bef56063
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import
re
from
spack
import
*
import
llnl.util.tty
as
tty
class
Intel
(
IntelPackage
):
class
Intel
(
IntelPackage
):
...
@@ -65,5 +66,60 @@ class Intel(IntelPackage):
...
@@ -65,5 +66,60 @@ class Intel(IntelPackage):
conflicts
(
'
auto_dispatch=SSE3
'
,
'
platform=darwin target=x86_64:
'
,
conflicts
(
'
auto_dispatch=SSE3
'
,
'
platform=darwin target=x86_64:
'
,
msg
=
'
SSE3 is not supported on MacOS x86_64
'
)
msg
=
'
SSE3 is not supported on MacOS x86_64
'
)
executables
=
[
'
^icc$
'
,
'
^icpc$
'
,
'
^ifort$
'
]
@classmethod
def
determine_version
(
cls
,
exe
):
version_regex
=
re
.
compile
(
r
'
\((?:IFORT|ICC)\) ([^ ]+)
'
)
try
:
output
=
spack
.
compiler
.
get_compiler_version_output
(
exe
,
'
--version
'
)
match
=
version_regex
.
search
(
output
)
if
match
:
return
match
.
group
(
1
)
except
spack
.
util
.
executable
.
ProcessError
:
pass
except
Exception
as
e
:
tty
.
debug
(
str
(
e
))
return
None
@classmethod
def
determine_variants
(
cls
,
exes
,
version_str
):
compilers
=
{}
for
exe
in
exes
:
if
'
icc
'
in
exe
:
compilers
[
'
c
'
]
=
exe
if
'
icpc
'
in
exe
:
compilers
[
'
cxx
'
]
=
exe
if
'
ifort
'
in
exe
:
compilers
[
'
fortran
'
]
=
exe
return
''
,
{
'
compilers
'
:
compilers
}
@property
def
cc
(
self
):
msg
=
"
cannot retrieve C compiler [spec is not concrete]
"
assert
self
.
spec
.
concrete
,
msg
if
self
.
spec
.
external
:
return
self
.
spec
.
extra_attributes
[
'
compilers
'
].
get
(
'
c
'
,
None
)
return
str
(
self
.
spec
.
prefix
.
bin
.
intel64
.
icc
)
@property
def
cxx
(
self
):
msg
=
"
cannot retrieve C++ compiler [spec is not concrete]
"
assert
self
.
spec
.
concrete
,
msg
if
self
.
spec
.
external
:
return
self
.
spec
.
extra_attributes
[
'
compilers
'
].
get
(
'
cxx
'
,
None
)
return
str
(
self
.
spec
.
prefix
.
bin
.
intel64
.
icpc
)
@property
def
fortran
(
self
):
msg
=
"
cannot retrieve Fortran compiler [spec is not concrete]
"
assert
self
.
spec
.
concrete
,
msg
if
self
.
spec
.
external
:
return
self
.
spec
.
extra_attributes
[
'
compilers
'
].
get
(
'
fortran
'
,
None
)
return
str
(
self
.
spec
.
prefix
.
bin
.
intel64
.
ifort
)
# Since the current package is a subset of 'intel-parallel-studio',
# Since the current package is a subset of 'intel-parallel-studio',
# all remaining Spack actions are handled in the package class.
# all remaining Spack actions are handled in the package class.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment