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
f06160d3
Commit
f06160d3
authored
22 years ago
by
tewk
Browse files
Options
Downloads
Patches
Plain Diff
Patched file to get it to compile, it need a to be rewritten to conform to the new
comm layer
parent
be9fcbdb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scontrol/scontrol.c
+29
-26
29 additions, 26 deletions
src/scontrol/scontrol.c
with
29 additions
and
26 deletions
src/scontrol/scontrol.c
+
29
−
26
View file @
f06160d3
...
@@ -406,37 +406,37 @@ print_node (char *node_name, struct node_buffer *node_buffer_ptr)
...
@@ -406,37 +406,37 @@ print_node (char *node_name, struct node_buffer *node_buffer_ptr)
void
void
print_node_list
(
char
*
node_list
)
print_node_list
(
char
*
node_list
)
{
{
static
struct
node_buffer
*
old_node_
buffer
_ptr
=
NULL
;
static
node_info_msg_t
*
old_node_
info
_ptr
=
NULL
;
struct
node_buffer
*
node_
buffer
_ptr
=
NULL
;
node_info_msg_t
*
node_
info
_ptr
=
NULL
;
int
start_inx
,
end_inx
,
count_inx
,
error_code
,
i
;
int
start_inx
,
end_inx
,
count_inx
,
error_code
,
i
;
char
*
str_ptr1
,
*
str_ptr2
,
*
format
,
*
my_node_list
;
char
*
str_ptr1
,
*
str_ptr2
,
*
format
,
*
my_node_list
;
char
this_node_name
[
BUF_SIZE
];
char
this_node_name
[
BUF_SIZE
];
if
(
old_node_
buffer
_ptr
)
{
if
(
old_node_
info
_ptr
)
{
error_code
=
slurm_load_node
(
old_node_
buffer
_ptr
->
last_update
,
error_code
=
slurm_load_node
(
old_node_
info
_ptr
->
last_update
,
&
node_
buffer
_ptr
);
&
node_
info
_ptr
);
if
(
error_code
==
0
)
if
(
error_code
==
0
)
slurm_free_node_info
(
old_node_
buffer
_ptr
);
slurm_free_node_info
(
old_node_
info
_ptr
);
else
if
(
error_code
==
-
1
)
else
if
(
error_code
==
-
1
)
node_
buffer
_ptr
=
old_node_
buffer
_ptr
;
node_
info
_ptr
=
old_node_
info
_ptr
;
}
}
else
else
error_code
=
slurm_load_node
((
time_t
)
NULL
,
&
node_
buffer
_ptr
);
error_code
=
slurm_load_node
((
time_t
)
NULL
,
&
node_
info
_ptr
);
if
(
error_code
>
0
)
{
if
(
error_code
>
0
)
{
if
(
quiet_flag
!=
1
)
if
(
quiet_flag
!=
1
)
printf
(
"load_node error %d
\n
"
,
error_code
);
printf
(
"load_node error %d
\n
"
,
error_code
);
return
;
return
;
}
}
else
if
(
error_code
==
0
)
else
if
(
error_code
==
0
)
old_node_
buffer
_ptr
=
node_
buffer
_ptr
;
old_node_
info
_ptr
=
node_
info
_ptr
;
if
(
quiet_flag
==
-
1
)
if
(
quiet_flag
==
-
1
)
printf
(
"last_update_time=%ld
\n
"
,
(
long
)
node_
buffer
_ptr
->
last_update
);
printf
(
"last_update_time=%ld
\n
"
,
(
long
)
node_
info
_ptr
->
last_update
);
if
(
node_list
==
NULL
)
{
if
(
node_list
==
NULL
)
{
print_node
(
NULL
,
node_
buffer
_ptr
);
/*
print_node (NULL, node_
info
_ptr);
*/
}
}
else
{
else
{
format
=
NULL
;
format
=
NULL
;
...
@@ -476,7 +476,7 @@ print_node_list (char *node_list)
...
@@ -476,7 +476,7 @@ print_node_list (char *node_list)
sizeof
(
this_node_name
));
sizeof
(
this_node_name
));
else
else
sprintf
(
this_node_name
,
format
,
i
);
sprintf
(
this_node_name
,
format
,
i
);
print_node
(
this_node_name
,
node_
buffer
_ptr
);
/*
print_node (this_node_name, node_
info
_ptr);
*/
}
}
if
(
format
)
if
(
format
)
free
(
format
);
free
(
format
);
...
@@ -496,36 +496,38 @@ void
...
@@ -496,36 +496,38 @@ void
print_part
(
char
*
partition_name
)
print_part
(
char
*
partition_name
)
{
{
int
error_code
,
i
;
int
error_code
,
i
;
static
struct
part_buffer
*
old_part_
buffer
_ptr
=
NULL
;
static
partition_info_msg_t
*
old_part_
info
_ptr
=
NULL
;
struct
part_buffer
*
part_
buffer
_ptr
=
NULL
;
partition_info_msg_t
*
part_
info
_ptr
=
NULL
;
struct
part_table
*
part_ptr
=
NULL
;
partition_table_msg_t
*
part_ptr
=
NULL
;
if
(
old_part_
buffer
_ptr
)
{
if
(
old_part_
info
_ptr
)
{
error_code
=
slurm_load_part
(
old_part_
buffer
_ptr
->
last_update
,
error_code
=
slurm_load_part
itions
(
old_part_
info
_ptr
->
last_update
,
&
part_
buffer
_ptr
);
&
part_
info
_ptr
);
if
(
error_code
==
0
)
if
(
error_code
==
0
)
slurm_free_part_info
(
old_part_
buffer
_ptr
);
slurm_free_part
ition
_info
(
old_part_
info
_ptr
);
else
if
(
error_code
==
-
1
)
else
if
(
error_code
==
-
1
)
part_
buffer
_ptr
=
old_part_
buffer
_ptr
;
part_
info
_ptr
=
old_part_
info
_ptr
;
}
}
else
else
error_code
=
slurm_load_part
((
time_t
)
NULL
,
&
part_
buffer
_ptr
);
error_code
=
slurm_load_part
itions
((
time_t
)
NULL
,
&
part_
info
_ptr
);
if
(
error_code
>
0
)
{
if
(
error_code
>
0
)
{
if
(
quiet_flag
!=
1
)
if
(
quiet_flag
!=
1
)
printf
(
"slurm_load_part error %d
\n
"
,
error_code
);
printf
(
"slurm_load_part error %d
\n
"
,
error_code
);
return
;
return
;
}
}
else
if
(
error_code
==
0
)
else
if
(
error_code
==
0
)
old_part_
buffer
_ptr
=
part_
buffer
_ptr
;
old_part_
info
_ptr
=
part_
info
_ptr
;
if
(
quiet_flag
==
-
1
)
if
(
quiet_flag
==
-
1
)
printf
(
"last_update_time=%ld
\n
"
,
(
long
)
part_
buffer
_ptr
->
last_update
);
printf
(
"last_update_time=%ld
\n
"
,
(
long
)
part_
info
_ptr
->
last_update
);
part_ptr
=
part_
buffer
_ptr
->
part
_table_ptr
;
part_ptr
=
part_
info
_ptr
->
part
ition_array
;
for
(
i
=
0
;
i
<
part_
buffer_ptr
->
part
_count
;
i
++
)
{
for
(
i
=
0
;
i
<
part_
info_ptr
->
record
_count
;
i
++
)
{
if
(
partition_name
&&
if
(
partition_name
&&
strcmp
(
partition_name
,
part_ptr
[
i
].
name
)
!=
0
)
strcmp
(
partition_name
,
part_ptr
[
i
].
name
)
!=
0
)
continue
;
continue
;
slurm_print_partition_table
(
&
part_ptr
[
i
]
)
;
/*
printf ("PartitionName=%s MaxTime=%u ",
printf ("PartitionName=%s MaxTime=%u ",
part_ptr[i].name, part_ptr[i].max_time);
part_ptr[i].name, part_ptr[i].max_time);
printf ("MaxNodes=%u TotalNodes=%u ",
printf ("MaxNodes=%u TotalNodes=%u ",
...
@@ -538,6 +540,7 @@ print_part (char *partition_name)
...
@@ -538,6 +540,7 @@ print_part (char *partition_name)
part_ptr[i].shared, part_ptr[i].state_up);
part_ptr[i].shared, part_ptr[i].state_up);
printf ("Nodes=%s AllowGroups=%s\n\n",
printf ("Nodes=%s AllowGroups=%s\n\n",
part_ptr[i].nodes, part_ptr[i].allow_groups);
part_ptr[i].nodes, part_ptr[i].allow_groups);
*/
if
(
partition_name
)
if
(
partition_name
)
break
;
break
;
}
}
...
@@ -585,7 +588,7 @@ process_command (int argc, char *argv[])
...
@@ -585,7 +588,7 @@ process_command (int argc, char *argv[])
fprintf
(
stderr
,
fprintf
(
stderr
,
"too many arguments for keyword:%s
\n
"
,
"too many arguments for keyword:%s
\n
"
,
argv
[
0
]);
argv
[
0
]);
error_code
=
reconfigure
();
error_code
=
slurm_
reconfigure
();
if
((
error_code
!=
0
)
&&
(
quiet_flag
!=
1
))
if
((
error_code
!=
0
)
&&
(
quiet_flag
!=
1
))
fprintf
(
stderr
,
"error %d from reconfigure
\n
"
,
fprintf
(
stderr
,
"error %d from reconfigure
\n
"
,
error_code
);
error_code
);
...
...
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