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
fd274f08
Commit
fd274f08
authored
19 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
fix for down bug
parent
cca05586
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/smap/configure_functions.c
+35
-47
35 additions, 47 deletions
src/smap/configure_functions.c
with
35 additions
and
47 deletions
src/smap/configure_functions.c
+
35
−
47
View file @
fd274f08
...
@@ -324,10 +324,10 @@ static int _change_state_all_bps(char *com, int state)
...
@@ -324,10 +324,10 @@ static int _change_state_all_bps(char *com, int state)
memset
(
allnodes
,
0
,
50
);
memset
(
allnodes
,
0
,
50
);
#ifdef HAVE_BG
#ifdef HAVE_BG
sprintf
(
allnodes
,
"
[
000x%d%d%d
]
"
,
sprintf
(
allnodes
,
"000x%d%d%d"
,
DIM_SIZE
[
X
]
-
1
,
DIM_SIZE
[
Y
]
-
1
,
DIM_SIZE
[
Z
]
-
1
);
DIM_SIZE
[
X
]
-
1
,
DIM_SIZE
[
Y
]
-
1
,
DIM_SIZE
[
Z
]
-
1
);
#else
#else
sprintf
(
allnodes
,
"
[
0-%d
]
"
,
sprintf
(
allnodes
,
"0-%d"
,
DIM_SIZE
[
X
]);
DIM_SIZE
[
X
]);
#endif
#endif
return
_change_state_bps
(
allnodes
,
state
);
return
_change_state_bps
(
allnodes
,
state
);
...
@@ -335,7 +335,7 @@ static int _change_state_all_bps(char *com, int state)
...
@@ -335,7 +335,7 @@ static int _change_state_all_bps(char *com, int state)
}
}
static
int
_change_state_bps
(
char
*
com
,
int
state
)
static
int
_change_state_bps
(
char
*
com
,
int
state
)
{
{
int
i
=
1
,
x
;
int
i
=
0
,
j
=
0
,
x
;
int
len
=
strlen
(
com
);
int
len
=
strlen
(
com
);
int
start
[
SYSTEM_DIMENSIONS
],
end
[
SYSTEM_DIMENSIONS
];
int
start
[
SYSTEM_DIMENSIONS
],
end
[
SYSTEM_DIMENSIONS
];
#ifdef HAVE_BG
#ifdef HAVE_BG
...
@@ -352,48 +352,41 @@ static int _change_state_bps(char *com, int state)
...
@@ -352,48 +352,41 @@ static int _change_state_bps(char *com, int state)
used
=
true
;
used
=
true
;
c_state
=
"down"
;
c_state
=
"down"
;
}
}
while
((
com
[
i
-
1
]
>
57
||
com
[
i
-
1
]
<
48
)
&&
com
[
i
-
1
]
!=
'['
)
while
((
com
[
i
]
>
57
||
com
[
i
]
<
48
)
&&
i
<
len
)
i
++
;
i
++
;
if
(
i
>
(
len
-
1
))
{
if
(
i
>
(
len
-
1
))
{
memset
(
error_string
,
0
,
255
);
memset
(
error_string
,
0
,
255
);
sprintf
(
error_string
,
sprintf
(
error_string
,
"You didn't specify any nodes to make %s. %s"
,
c_state
,
com
);
"You didn't specify any nodes to make %s. "
"in statement '%s'"
,
c_state
,
com
);
return
0
;
return
0
;
}
}
#ifdef HAVE_BG
#ifdef HAVE_BG
if
((
com
[
i
]
==
'['
)
if
((
com
[
i
+
3
]
==
'x'
)
&&
(
com
[
i
+
8
]
==
']'
)
||
(
com
[
i
+
3
]
==
'-'
))
{
&&
((
com
[
i
+
4
]
==
'x'
)
j
=
i
;
||
(
com
[
i
+
4
]
==
'-'
)))
{
for
(
j
=
0
;
j
<
3
;
j
++
)
i
++
;
if
(
com
[
i
+
j
]
>
57
||
com
[
i
+
j
]
<
48
||
(
i
+
j
)
>
len
)
goto
error_message2
;
number
=
atoi
(
com
+
i
);
number
=
atoi
(
com
+
i
);
start
[
X
]
=
number
/
100
;
start
[
X
]
=
number
/
100
;
start
[
Y
]
=
(
number
%
100
)
/
10
;
start
[
Y
]
=
(
number
%
100
)
/
10
;
start
[
Z
]
=
(
number
%
10
);
start
[
Z
]
=
(
number
%
10
);
i
+=
4
;
i
+=
4
;
number
=
atoi
(
com
+
i
);
for
(
j
=
0
;
j
<
3
;
j
++
)
end
[
X
]
=
number
/
100
;
if
(
com
[
i
+
j
]
>
57
||
com
[
i
+
j
]
<
48
||
(
i
+
j
)
>
len
)
end
[
Y
]
=
(
number
%
100
)
/
10
;
goto
error_message2
;
end
[
Z
]
=
(
number
%
10
);
number
=
atoi
(
com
+
i
);
}
else
if
((
com
[
i
]
<
58
&&
com
[
i
]
>
47
)
&&
(
com
[
i
+
6
]
<
58
&&
com
[
i
+
6
]
>
47
)
&&
((
com
[
i
+
3
]
==
'x'
)
||
(
com
[
i
+
3
]
==
'-'
)))
{
number
=
atoi
(
com
+
i
);
start
[
X
]
=
number
/
100
;
start
[
Y
]
=
(
number
%
100
)
/
10
;
start
[
Z
]
=
(
number
%
10
);
i
+=
4
;
number
=
atoi
(
com
+
i
);
end
[
X
]
=
number
/
100
;
end
[
X
]
=
number
/
100
;
end
[
Y
]
=
(
number
%
100
)
/
10
;
end
[
Y
]
=
(
number
%
100
)
/
10
;
end
[
Z
]
=
(
number
%
10
);
end
[
Z
]
=
(
number
%
10
);
}
else
if
((
com
[
i
]
<
58
&&
com
[
i
]
>
47
)
}
else
{
&&
com
[
i
-
1
]
!=
'['
)
{
for
(
j
=
0
;
j
<
3
;
j
++
)
if
(
com
[
i
+
j
]
>
57
||
com
[
i
+
j
]
<
48
||
(
i
+
j
)
>
len
)
goto
error_message2
;
number
=
atoi
(
com
+
i
);
number
=
atoi
(
com
+
i
);
start
[
X
]
=
end
[
X
]
=
number
/
100
;
start
[
X
]
=
end
[
X
]
=
number
/
100
;
start
[
Y
]
=
end
[
Y
]
=
(
number
%
100
)
/
10
;
start
[
Y
]
=
end
[
Y
]
=
(
number
%
100
)
/
10
;
...
@@ -409,7 +402,7 @@ static int _change_state_bps(char *com, int state)
...
@@ -409,7 +402,7 @@ static int _change_state_bps(char *com, int state)
||
end
[
Y
]
>
DIM_SIZE
[
Y
]
-
1
||
end
[
Y
]
>
DIM_SIZE
[
Y
]
-
1
||
end
[
Z
]
>
DIM_SIZE
[
Z
]
-
1
))
||
end
[
Z
]
>
DIM_SIZE
[
Z
]
-
1
))
goto
error_message
;
goto
error_message
;
for
(
x
=
start
[
X
];
x
<=
end
[
X
];
x
++
)
{
for
(
x
=
start
[
X
];
x
<=
end
[
X
];
x
++
)
{
for
(
y
=
start
[
Y
];
y
<=
end
[
Y
];
y
++
)
{
for
(
y
=
start
[
Y
];
y
<=
end
[
Y
];
y
++
)
{
for
(
z
=
start
[
Z
];
z
<=
end
[
Z
];
z
++
)
{
for
(
z
=
start
[
Z
];
z
<=
end
[
Z
];
z
++
)
{
...
@@ -423,27 +416,15 @@ static int _change_state_bps(char *com, int state)
...
@@ -423,27 +416,15 @@ static int _change_state_bps(char *com, int state)
}
}
}
}
#else
#else
if
((
com
[
i
]
==
'['
)
if
((
com
[
i
+
3
]
==
'x'
)
&&
(
com
[
i
+
8
]
==
']'
)
||
(
com
[
i
+
3
]
==
'-'
))
{
&&
((
com
[
i
+
4
]
==
'x'
)
||
(
com
[
i
+
4
]
==
'-'
)))
{
i
++
;
start
[
X
]
=
atoi
(
com
+
i
);
i
+=
4
;
end
[
X
]
=
atoi
(
com
+
i
);
}
else
if
((
com
[
i
]
<
58
&&
com
[
i
]
>
47
)
&&
(
com
[
i
+
6
]
<
58
&&
com
[
i
+
6
]
>
47
)
&&
((
com
[
i
+
3
]
==
'x'
)
||
(
com
[
i
+
3
]
==
'-'
)))
{
start
[
X
]
=
atoi
(
com
+
i
);
start
[
X
]
=
atoi
(
com
+
i
);
i
+=
4
;
i
+=
4
;
end
[
X
]
=
atoi
(
com
+
i
);
end
[
X
]
=
atoi
(
com
+
i
);
j
=
i
;
}
else
if
((
com
[
i
]
<
58
&&
com
[
i
]
>
47
)
}
else
{
&&
com
[
i
-
1
]
!=
'['
)
{
start
[
X
]
=
end
[
X
]
=
atoi
(
com
+
i
);
start
[
X
]
=
end
[
X
]
=
atoi
(
com
+
i
);
}
}
if
((
start
[
X
]
>
end
[
X
])
if
((
start
[
X
]
>
end
[
X
])
||
(
start
[
X
]
<
0
)
||
(
start
[
X
]
<
0
)
||
(
end
[
X
]
>
DIM_SIZE
[
X
]
-
1
))
||
(
end
[
X
]
>
DIM_SIZE
[
X
]
-
1
))
...
@@ -469,6 +450,13 @@ error_message:
...
@@ -469,6 +450,13 @@ error_message:
start
[
X
],
end
[
X
]);
start
[
X
],
end
[
X
]);
#endif
#endif
return
0
;
return
0
;
error_message2:
memset
(
error_string
,
0
,
255
);
sprintf
(
error_string
,
"There was a problem with '%s'
\n
In your request '%s'"
"You need to specify XYZ or XYZxXYZ"
,
com
+
i
,
com
);
return
0
;
}
}
static
int
_remove_allocation
(
char
*
com
,
List
allocated_blocks
)
static
int
_remove_allocation
(
char
*
com
,
List
allocated_blocks
)
{
{
...
...
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