Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
75a9d6f7
Commit
75a9d6f7
authored
Dec 09, 2016
by
Peter W. Draper
Browse files
Revert "move calls to MPI_Irecv to the enqueue_mapper."
This reverts commit
00499932
.
parent
00499932
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scheduler.c
View file @
75a9d6f7
...
...
@@ -1027,25 +1027,6 @@ void scheduler_enqueue_mapper(void *map_data, int num_elements,
struct
task
*
tasks
=
s
->
tasks
;
for
(
int
ind
=
0
;
ind
<
num_elements
;
ind
++
)
{
struct
task
*
t
=
&
tasks
[
tid
[
ind
]];
#ifdef WITH_MPI
/* If this is a recv task, enqueue the MPI call. */
if
(
t
->
type
==
task_type_recv
)
{
int
err
;
if
(
t
->
subtype
==
task_subtype_tend
)
{
t
->
buff
=
malloc
(
sizeof
(
int
)
*
t
->
ci
->
pcell_size
);
err
=
MPI_Irecv
(
t
->
buff
,
t
->
ci
->
pcell_size
,
MPI_INT
,
t
->
ci
->
nodeID
,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
}
else
{
err
=
MPI_Irecv
(
t
->
ci
->
parts
,
t
->
ci
->
count
,
part_mpi_type
,
t
->
ci
->
nodeID
,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
}
if
(
err
!=
MPI_SUCCESS
)
{
mpi_error
(
err
,
"Failed to emit irecv for particle data."
);
}
}
#endif
if
(
atomic_dec
(
&
t
->
wait
)
==
1
&&
!
t
->
skip
)
{
scheduler_enqueue
(
s
,
t
);
}
...
...
@@ -1179,17 +1160,17 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
break
;
case
task_type_recv
:
#ifdef WITH_MPI
//
if (t->subtype == task_subtype_tend) {
//
t->buff = malloc(sizeof(int) * t->ci->pcell_size);
//
err = MPI_Irecv(t->buff, t->ci->pcell_size, MPI_INT, t->ci->nodeID,
//
t->flags, MPI_COMM_WORLD, &t->req);
//
} else {
//
err = MPI_Irecv(t->ci->parts, t->ci->count, part_mpi_type,
//
t->ci->nodeID, t->flags, MPI_COMM_WORLD, &t->req);
//
}
//
if (err != MPI_SUCCESS) {
//
mpi_error(err, "Failed to emit irecv for particle data.");
//
}
if
(
t
->
subtype
==
task_subtype_tend
)
{
t
->
buff
=
malloc
(
sizeof
(
int
)
*
t
->
ci
->
pcell_size
);
err
=
MPI_Irecv
(
t
->
buff
,
t
->
ci
->
pcell_size
,
MPI_INT
,
t
->
ci
->
nodeID
,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
}
else
{
err
=
MPI_Irecv
(
t
->
ci
->
parts
,
t
->
ci
->
count
,
part_mpi_type
,
t
->
ci
->
nodeID
,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
}
if
(
err
!=
MPI_SUCCESS
)
{
mpi_error
(
err
,
"Failed to emit irecv for particle data."
);
}
// message( "receiving %i parts with tag=%i from %i to %i." ,
// t->ci->count , t->flags , t->ci->nodeID , s->nodeID );
// fflush(stdout);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment