Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TensorJoseph
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Camille Coti
TensorJoseph
Commits
fdfe9173
Commit
fdfe9173
authored
5 years ago
by
Camille Coti
Browse files
Options
Downloads
Patches
Plain Diff
Seems to fix the deadlock
parent
d3989c32
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/hierarchical.cpp
+4
-5
4 additions, 5 deletions
src/hierarchical.cpp
with
4 additions
and
5 deletions
src/hierarchical.cpp
+
4
−
5
View file @
fdfe9173
...
...
@@ -61,7 +61,7 @@ void create_communicators_hierarch( MPI_Comm& COMM_FOREMEN, MPI_Comm& COMM_TEAM
}
gi
::
ex
multiply_1level_foreman_hierarch_distribute_work
(
tensor3D_t
&
T
,
matrix_int_t
&
J
,
int
size
,
parameters_t
params
,
gi
::
lst
symbols
,
MPI_Comm
comm_team
)
{
gi
::
ex
multiply_1level_foreman_hierarch_distribute_work
(
tensor3D_t
&
T
,
matrix_int_t
&
J
,
int
size
,
parameters_t
params
,
gi
::
lst
symbols
,
MPI_Comm
comm_team
,
int
rank_foreman
/* DEBUG */
)
{
gi
::
ex
Tens
=
0
;
gi
::
ex
A
;
...
...
@@ -149,7 +149,7 @@ gi::ex multiply_1level_foreman_hierarch_distribute_work( tensor3D_t& T, matrix_i
running
=
np
-
1
;
// all the slaves are running
while
(
running
>
0
)
{
/* Here we might also receive a TAG_PULL if the data set is too small */
MPI_Recv
(
&
len
,
1
,
MPI_UNSIGNED
,
MPI_ANY_SOURCE
,
MPI_ANY_TAG
/* TAG_RES
*/
,
comm_team
,
&
status
);
MPI_Recv
(
&
len
,
1
,
MPI_UNSIGNED
,
MPI_ANY_SOURCE
,
/*
MPI_ANY_TAG/*
/
TAG_RES
,
comm_team
,
&
status
);
src
=
status
.
MPI_SOURCE
;
if
(
len
!=
0
)
{
...
...
@@ -178,7 +178,6 @@ gi::ex multiply_1level_foreman_hierarch_distribute_work( tensor3D_t& T, matrix_i
}
if
(
NULL
!=
expr_c
)
free
(
expr_c
);
return
Tens
;
}
...
...
@@ -231,8 +230,8 @@ void multiply_1level_foreman_hierarch( tensor3D_t& T, matrix_int_t& J, int size,
if
(
status
.
MPI_TAG
==
TAG_WORK
){
/* Distribute the work on my workers */
Tens
=
multiply_1level_foreman_hierarch_distribute_work
(
T
,
J
,
size
,
params
,
symbols
,
comm_team
);
Tens
=
multiply_1level_foreman_hierarch_distribute_work
(
T
,
J
,
size
,
params
,
symbols
,
comm_team
,
rank
/* DEBUG */
);
/* Send the result to the master */
...
...
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