Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
db959f35
Commit
db959f35
authored
Sep 10, 2008
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix from several months back when retesting the auto-adaptation path:
make sure colocate factor does not end up null
parent
bba09bd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
tbsetup/assign_prepass.in
tbsetup/assign_prepass.in
+10
-8
No files found.
tbsetup/assign_prepass.in
View file @
db959f35
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# Copyright (c) 2004
, 2008
University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -820,16 +820,15 @@ sub read_metis_partfile($$) {
#
sub
run_metis
($$$$;$) {
my
(
$metisfile
,
$nodes
,
$metisfilename
,
$metislogfile
,
$colocate
)
=
@_
;
if
(
!
$colocate
)
{
$colocate
=
$AVG_NODES_PER_PARTITION
;
}
print
"
run_metis called with colocate of
$colocate
\n
";
# Pick a number of partitions such that the average parition size
# will be $AVG_NODES_PER_PARTITION
my
$npart
;
if
(
$colocate
)
{
$npart
=
POSIX::
ceil
(
scalar
(
keys
%$nodes
)
/
$colocate
);
}
else
{
$npart
=
POSIX::
ceil
(
scalar
(
keys
%$nodes
)
/
$AVG_NODES_PER_PARTITION
);
}
my
$npart
=
POSIX::
ceil
(
scalar
(
keys
%$nodes
)
/
$colocate
);
if
(
$npart
<=
1
)
{
# No point in running METIS, just give the list of nodes back
return
[
values
(
%$nodes
)];
...
...
@@ -990,7 +989,10 @@ sub node_fits_in_conglomerate($$) {
#
my
$colocate
=
$
::
colocate
{
$type
};
if
(
!
$colocate
)
{
die
"
Don't know colocate factor for
$node
->{type}
\n
";
print
"
Don't know colocate factor for
$node
->{type}
\n
";
return
0
;
#die "Don't know colocate factor for $node->{type}\n";
}
if
(
defined
$max_multiplex_factor
&&
(
$colocate
>
$max_multiplex_factor
))
{
$colocate
=
$max_multiplex_factor
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment