Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Iker Martín Álvarez
Proteo
Commits
af0082c9
Commit
af0082c9
authored
Apr 23, 2024
by
iker_martin
Browse files
Bugfix for spread distribution. Already created processes were not considered apropiatly
parent
f99dd34d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Codes/malleability/spawn_methods/ProcessDist.c
View file @
af0082c9
...
...
@@ -112,7 +112,6 @@ void node_dist(Spawn_data spawn_data, int **qty, int *used_nodes, int *total_spa
for
(
i
=
0
;
i
<
*
used_nodes
;
i
++
)
{
(
*
qty
)[
i
]
=
procs
[
i
];
if
(
procs
[
i
])
(
*
total_spawns
)
++
;
printf
(
"procs[%d] = %d
\n
"
,
i
,
procs
[
i
]);
}
}
else
{
*
total_spawns
=
1
;
...
...
@@ -138,7 +137,11 @@ void spread_dist(Spawn_data spawn_data, int *used_nodes, int *procs) {
*
used_nodes
=
mall
->
num_nodes
;
tamBl
=
spawn_data
.
target_qty
/
*
used_nodes
;
i
=
spawn_data
.
already_created
?
spawn_data
.
already_created
/
tamBl
:
0
;
i
=
spawn_data
.
already_created
/
tamBl
;
remainder
=
spawn_data
.
already_created
%
tamBl
;
if
(
remainder
)
{
procs
[
i
++
]
=
tamBl
-
remainder
;
}
for
(;
i
<*
used_nodes
;
i
++
)
{
procs
[
i
]
=
tamBl
;
}
...
...
Write
Preview
Supports
Markdown
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