Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
d0dfac51
Commit
d0dfac51
authored
15 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
consider both high and low numbers in building a BP index
parent
b86edb45
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sview/common.c
+18
-11
18 additions, 11 deletions
src/sview/common.c
with
18 additions
and
11 deletions
src/sview/common.c
+
18
−
11
View file @
d0dfac51
...
...
@@ -169,28 +169,35 @@ cleanup:
/* Make a BlueGene node name into a numeric representation of
* its location.
* Value is coordinate * 1000 + I/O node (999 if none)
* (e.g. bg123[4] -> 123004, bg[234x233] -> 234999)
* Value is low_coordinate * 1,000,000 +
* high_coordinate * 1,000 + I/O node (999 if none)
* (e.g. bg123[4] -> 123,123,004, bg[234x235] -> 234,235,999)
*/
static
int
_bp_coordinate
(
const
char
*
name
)
{
int
i
,
io_val
=
999
,
coord
_val
=
-
1
;
int
i
,
io_val
=
999
,
low
_val
=
-
1
,
high_val
;
for
(
i
=
0
;
name
[
i
];
i
++
)
{
if
(
name
[
i
]
==
'['
)
{
i
++
;
if
(
coord_val
<
0
)
coord_val
=
atoi
(
name
+
i
);
else
if
(
low_val
<
0
)
{
char
*
end_ptr
;
low_val
=
strtol
(
name
+
i
,
&
end_ptr
,
10
);
if
((
end_ptr
[
0
]
!=
'\0'
)
&&
(
isdigit
(
end_ptr
[
1
])))
high_val
=
atoi
(
end_ptr
+
1
);
else
high_val
=
low_val
;
}
else
io_val
=
atoi
(
name
+
i
);
break
;
}
else
if
((
coord
_val
<
0
)
&&
(
isdigit
(
name
[
i
])))
coord
_val
=
atoi
(
name
+
i
);
}
else
if
((
low
_val
<
0
)
&&
(
isdigit
(
name
[
i
])))
low_val
=
high
_val
=
atoi
(
name
+
i
);
}
if
(
coord
_val
<
0
)
return
coord
_val
;
return
((
coord
_val
*
1000
)
+
io_val
);
if
(
low
_val
<
0
)
return
low
_val
;
return
((
low_val
*
1000000
)
+
(
high
_val
*
1000
)
+
io_val
);
}
static
int
_sort_iter_compare_func_bp_list
(
GtkTreeModel
*
model
,
...
...
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