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
06de9d5c
Commit
06de9d5c
authored
20 years ago
by
phung4
Browse files
Options
Downloads
Patches
Plain Diff
for debugging purposes, stubbed out the allocate_part function
parent
5ab31ec9
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/partition_allocator/partition_allocator.c
+43
-11
43 additions, 11 deletions
src/partition_allocator/partition_allocator.c
with
43 additions
and
11 deletions
src/partition_allocator/partition_allocator.c
+
43
−
11
View file @
06de9d5c
...
@@ -308,28 +308,25 @@ int _find_first_match(pa_request_t* pa_request, List* results)
...
@@ -308,28 +308,25 @@ int _find_first_match(pa_request_t* pa_request, List* results)
if
(
found_count
[
cur_dim
]
!=
geometry
[
cur_dim
]){
if
(
found_count
[
cur_dim
]
!=
geometry
[
cur_dim
]){
pa_node_t
*
pa_node
=
&
(
_pa_system
[
x
][
y
][
z
]);
pa_node_t
*
pa_node
=
&
(
_pa_system
[
x
][
y
][
z
]);
if
(
pa_node
->
conf_result_list
==
NULL
){
printf
(
"address of pa_node %d%d%d %s 0x%p
\n
"
,
printf
(
"conf_result_list is NULL
\n
"
);
}
printf
(
"address of pa_node %d%d%d %s 0x%p
\n
"
,
x
,
y
,
z
,
convert_dim
(
cur_dim
),
&
(
_pa_system
[
x
][
y
][
z
]));
x
,
y
,
z
,
convert_dim
(
cur_dim
),
&
(
_pa_system
[
x
][
y
][
z
]));
match_found
=
_check_pa_node
(
&
(
_pa_system
[
x
][
y
][
z
]),
match_found
=
_check_pa_node
(
&
(
_pa_system
[
x
][
y
][
z
]),
geometry
[
cur_dim
],
geometry
[
cur_dim
],
conn_type
,
force_contig
,
conn_type
,
force_contig
,
cur_dim
,
current_node_id
);
cur_dim
,
current_node_id
);
if
(
match_found
){
if
(
match_found
){
/* insert the pa_node_t* into the List of results */
/* insert the pa_node_t* into the List of results */
list_append
(
*
results
,
&
(
_pa_system
[
x
][
y
][
z
]));
list_append
(
*
results
,
&
(
_pa_system
[
x
][
y
][
z
]));
#ifdef DEBUG_PA
#ifdef DEBUG_PA
printf
(
"_find_first_match: found match for %s = %d%d%d
\n
"
,
printf
(
"_find_first_match: found match for %s = %d%d%d
\n
"
,
convert_dim
(
cur_dim
),
x
,
y
,
z
);
convert_dim
(
cur_dim
),
x
,
y
,
z
);
#endif
#endif
found_count
[
cur_dim
]
++
;
found_count
[
cur_dim
]
++
;
if
(
found_count
[
cur_dim
]
==
geometry
[
cur_dim
]){
if
(
found_count
[
cur_dim
]
==
geometry
[
cur_dim
]){
#ifdef DEBUG_PA
#ifdef DEBUG_PA
printf
(
"_find_first_match: found full match for %s dimension
\n
"
,
convert_dim
(
cur_dim
));
printf
(
"_find_first_match: found full match for %s dimension
\n
"
,
convert_dim
(
cur_dim
));
#endif
#endif
}
}
}
}
...
@@ -831,10 +828,45 @@ int allocate_part(pa_request_t* pa_request, List* results)
...
@@ -831,10 +828,45 @@ int allocate_part(pa_request_t* pa_request, List* results)
}
}
print_pa_request
(
pa_request
);
print_pa_request
(
pa_request
);
_find_first_match
(
pa_request
,
results
);
//
_find_first_match(pa_request, results);
if
(
!
results
)
xfree
(
results
);
/* for danny, to stub out the allocate_part function
* fills out a request for a 3x2x1 partition
*/
int
*
coord
;
*
results
=
list_create
(
delete_gen
);
/* node 000 */
coord
=
(
int
*
)
xmalloc
(
sizeof
(
int
)
*
PA_SYSTEM_DIMENSIONS
);
coord
[
0
]
=
0
;
coord
[
1
]
=
0
;
coord
[
2
]
=
0
;
list_append
(
*
results
,
coord
);
/* node 100 */
coord
=
(
int
*
)
xmalloc
(
sizeof
(
int
)
*
PA_SYSTEM_DIMENSIONS
);
coord
[
0
]
=
1
;
coord
[
1
]
=
0
;
coord
[
2
]
=
0
;
list_append
(
*
results
,
coord
);
/* node 200 */
coord
=
(
int
*
)
xmalloc
(
sizeof
(
int
)
*
PA_SYSTEM_DIMENSIONS
);
coord
[
0
]
=
2
;
coord
[
1
]
=
0
;
coord
[
2
]
=
0
;
list_append
(
*
results
,
coord
);
/* node 010 */
coord
=
(
int
*
)
xmalloc
(
sizeof
(
int
)
*
PA_SYSTEM_DIMENSIONS
);
coord
[
0
]
=
0
;
coord
[
1
]
=
1
;
coord
[
2
]
=
0
;
list_append
(
*
results
,
coord
);
/* node 110 */
coord
=
(
int
*
)
xmalloc
(
sizeof
(
int
)
*
PA_SYSTEM_DIMENSIONS
);
coord
[
0
]
=
1
;
coord
[
1
]
=
1
;
coord
[
2
]
=
0
;
list_append
(
*
results
,
coord
);
/* node 210 */
coord
=
(
int
*
)
xmalloc
(
sizeof
(
int
)
*
PA_SYSTEM_DIMENSIONS
);
coord
[
0
]
=
2
;
coord
[
1
]
=
1
;
coord
[
2
]
=
0
;
list_append
(
*
results
,
coord
);
return
0
;
return
0
;
}
}
...
...
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