Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
b5d0a388
Commit
b5d0a388
authored
8 years ago
by
Joseph Ciurej
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a few linking/testing bugs in the METIS@:4 install method.
parent
064d3584
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/metis/package.py
+31
-21
31 additions, 21 deletions
var/spack/repos/builtin/packages/metis/package.py
with
31 additions
and
21 deletions
var/spack/repos/builtin/packages/metis/package.py
+
31
−
21
View file @
b5d0a388
...
@@ -58,8 +58,9 @@ def url_for_version(self, version):
...
@@ -58,8 +58,9 @@ def url_for_version(self, version):
verdir
=
'
OLD/
'
if
version
<
Version
(
'
4.0.3
'
)
else
''
verdir
=
'
OLD/
'
if
version
<
Version
(
'
4.0.3
'
)
else
''
return
'
%s/%smetis-%s.tar.gz
'
%
(
Metis
.
base_url
,
verdir
,
version
)
return
'
%s/%smetis-%s.tar.gz
'
%
(
Metis
.
base_url
,
verdir
,
version
)
@when
(
'
@4
'
)
@when
(
'
@
:
4
'
)
def
install
(
self
,
spec
,
prefix
):
def
install
(
self
,
spec
,
prefix
):
# Process library spec and options
unsupp_vars
=
[
v
for
v
in
(
'
+gdb
'
,
'
+idx64
'
,
'
+real64
'
)
if
v
in
spec
]
unsupp_vars
=
[
v
for
v
in
(
'
+gdb
'
,
'
+idx64
'
,
'
+real64
'
)
if
v
in
spec
]
if
unsupp_vars
:
if
unsupp_vars
:
msg
=
'
Given variants %s are unsupported by METIS 4!
'
%
unsupp_vars
msg
=
'
Given variants %s are unsupported by METIS 4!
'
%
unsupp_vars
...
@@ -70,6 +71,7 @@ def install(self, spec, prefix):
...
@@ -70,6 +71,7 @@ def install(self, spec, prefix):
options
.
append
(
'
OPTFLAGS=-g -O0
'
)
options
.
append
(
'
OPTFLAGS=-g -O0
'
)
make
(
*
options
)
make
(
*
options
)
# Compile and install library files
mkdir
(
prefix
.
bin
)
mkdir
(
prefix
.
bin
)
binfiles
=
(
'
pmetis
'
,
'
kmetis
'
,
'
oemetis
'
,
'
onmetis
'
,
'
partnmesh
'
,
binfiles
=
(
'
pmetis
'
,
'
kmetis
'
,
'
oemetis
'
,
'
onmetis
'
,
'
partnmesh
'
,
'
partdmesh
'
,
'
mesh2nodal
'
,
'
mesh2dual
'
,
'
graphchk
'
)
'
partdmesh
'
,
'
mesh2nodal
'
,
'
mesh2dual
'
,
'
graphchk
'
)
...
@@ -88,7 +90,7 @@ def install(self, spec, prefix):
...
@@ -88,7 +90,7 @@ def install(self, spec, prefix):
(
'
Graphs
'
,
'
4elt.graph
'
),
(
'
Graphs
'
,
'
metis.mesh
'
),
(
'
Graphs
'
,
'
4elt.graph
'
),
(
'
Graphs
'
,
'
metis.mesh
'
),
(
'
Graphs
'
,
'
test.mgraph
'
))
(
'
Graphs
'
,
'
test.mgraph
'
))
for
sharefile
in
tuple
(
join_path
(
*
sf
)
for
sf
in
sharefiles
):
for
sharefile
in
tuple
(
join_path
(
*
sf
)
for
sf
in
sharefiles
):
install
(
f
,
prefix
.
share
)
install
(
sharefile
,
prefix
.
share
)
if
'
+shared
'
in
spec
:
if
'
+shared
'
in
spec
:
if
sys
.
platform
==
'
darwin
'
:
if
sys
.
platform
==
'
darwin
'
:
...
@@ -100,30 +102,38 @@ def install(self, spec, prefix):
...
@@ -100,30 +102,38 @@ def install(self, spec, prefix):
load_flag
=
'
-Wl,-whole-archive
'
load_flag
=
'
-Wl,-whole-archive
'
no_load_flag
=
'
-Wl,-no-whole-archive
'
no_load_flag
=
'
-Wl,-no-whole-archive
'
flags
=
(
self
.
compiler
.
cc
,
load_flag
,
no_load_flag
,
lib_dsuffix
)
os
.
system
(
'
%s -fPIC -shared %s libmetis.a %s -o libmetis.%s
'
%
\
build_cmd
=
'
%s -fPIC -shared %s libmetis.a %s libmetis.%s
'
%
flags
(
self
.
compiler
.
cc
,
load_flag
,
no_load_flag
,
lib_dsuffix
))
os
.
system
(
build_cmd
)
install
(
'
libmetis.%s
'
%
lib_dsuffix
,
prefix
.
lib
)
install
(
'
libmetis.%s
'
%
lib_dsuffix
,
prefix
.
lib
)
# Set up and run tests on installation
# Set up and run tests on installation
inc_flags
=
'
-I%s
'
%
prefix
.
include
lib_flags
=
'
-L%s
'
%
prefix
.
lib
if
'
+shared
'
in
spec
:
lib_flags
+=
'
-Wl,-rpath=%s
'
%
prefix
.
lib
symlink
(
join_path
(
prefix
.
share
,
'
io.c
'
),
'
io.c
'
)
symlink
(
join_path
(
prefix
.
share
,
'
io.c
'
),
'
io.c
'
)
symlink
(
join_path
(
prefix
.
share
,
'
mtest.c
'
),
'
mtest.c
'
)
symlink
(
join_path
(
prefix
.
share
,
'
mtest.c
'
),
'
mtest.c
'
)
os
.
system
(
spack_cc
+
'
-I%s
'
%
prefix
.
include
+
'
-c io.c
'
)
os
.
system
(
spack_cc
+
'
-I%s
'
%
prefix
.
include
+
os
.
system
(
'
%s %s -c io.c
'
%
(
self
.
compiler
.
cc
,
inc_flags
))
'
-L%s
'
%
prefix
.
lib
+
'
-lmetis mtest.c io.o -o mtest
'
)
os
.
system
(
'
%s %s %s mtest.c io.o -o mtest -lmetis -lm
'
%
\
_4eltgraph
=
join_path
(
prefix
.
share
,
'
4elt.graph
'
)
(
self
.
compiler
.
cc
,
inc_flags
,
lib_flags
))
test_mgraph
=
join_path
(
prefix
.
share
,
'
test.mgraph
'
)
metis_mesh
=
join_path
(
prefix
.
share
,
'
metis.mesh
'
)
test_bin
=
lambda
testname
:
join_path
(
prefix
.
bin
,
testname
)
kmetis
=
join_path
(
prefix
.
bin
,
'
kmetis
'
)
test_graph
=
lambda
graphname
:
join_path
(
prefix
.
share
,
graphname
)
os
.
system
(
'
./mtest
'
+
_4eltgraph
)
os
.
system
(
kmetis
+
'
'
+
_4eltgraph
+
'
40
'
)
graph
=
test_graph
(
'
4elt.graph
'
)
os
.
system
(
join_path
(
prefix
.
bin
,
'
onmetis
'
)
+
'
'
+
_4eltgraph
)
os
.
system
(
'
./mtest %s
'
%
graph
)
os
.
system
(
join_path
(
prefix
.
bin
,
'
pmetis
'
)
+
'
'
+
test_mgraph
+
'
2
'
)
os
.
system
(
'
%s %s 40
'
%
(
test_bin
(
'
kmetis
'
),
graph
))
os
.
system
(
kmetis
+
'
'
+
test_mgraph
+
'
2
'
)
os
.
system
(
'
%s %s
'
%
(
test_bin
(
'
onmetis
'
),
graph
))
os
.
system
(
kmetis
+
'
'
+
test_mgraph
+
'
5
'
)
graph
=
test_graph
(
'
test.mgraph
'
)
os
.
system
(
join_path
(
prefix
.
bin
,
'
partnmesh
'
)
+
metis_mesh
+
'
10
'
)
os
.
system
(
'
%s %s 2
'
%
(
test_bin
(
'
pmetis
'
),
graph
))
os
.
system
(
join_path
(
prefix
.
bin
,
'
partdmesh
'
)
+
metis_mesh
+
'
10
'
)
os
.
system
(
'
%s %s 2
'
%
(
test_bin
(
'
kmetis
'
),
graph
))
os
.
system
(
join_path
(
prefix
.
bin
,
'
mesh2dual
'
)
+
metis_mesh
)
os
.
system
(
'
%s %s 5
'
%
(
test_bin
(
'
kmetis
'
),
graph
))
graph
=
test_graph
(
'
metis.mesh
'
)
os
.
system
(
'
%s %s 10
'
%
(
test_bin
(
'
partnmesh
'
),
graph
))
os
.
system
(
'
%s %s 10
'
%
(
test_bin
(
'
partdmesh
'
),
graph
))
os
.
system
(
'
%s %s
'
%
(
test_bin
(
'
mesh2dual
'
),
graph
))
@when
(
'
@5:
'
)
@when
(
'
@5:
'
)
def
install
(
self
,
spec
,
prefix
):
def
install
(
self
,
spec
,
prefix
):
...
...
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