Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
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
SWIFT
SWIFTsim
Commits
00499932
Commit
00499932
authored
8 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
move calls to MPI_Irecv to the enqueue_mapper.
parent
4706849b
No related branches found
No related tags found
1 merge request
!291
Space recycle
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheduler.c
+30
-11
30 additions, 11 deletions
src/scheduler.c
with
30 additions
and
11 deletions
src/scheduler.c
+
30
−
11
View file @
00499932
...
@@ -1027,6 +1027,25 @@ void scheduler_enqueue_mapper(void *map_data, int num_elements,
...
@@ -1027,6 +1027,25 @@ void scheduler_enqueue_mapper(void *map_data, int num_elements,
struct
task
*
tasks
=
s
->
tasks
;
struct
task
*
tasks
=
s
->
tasks
;
for
(
int
ind
=
0
;
ind
<
num_elements
;
ind
++
)
{
for
(
int
ind
=
0
;
ind
<
num_elements
;
ind
++
)
{
struct
task
*
t
=
&
tasks
[
tid
[
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
)
{
if
(
atomic_dec
(
&
t
->
wait
)
==
1
&&
!
t
->
skip
)
{
scheduler_enqueue
(
s
,
t
);
scheduler_enqueue
(
s
,
t
);
}
}
...
@@ -1160,17 +1179,17 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
...
@@ -1160,17 +1179,17 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
break
;
break
;
case
task_type_recv
:
case
task_type_recv
:
#ifdef WITH_MPI
#ifdef WITH_MPI
if
(
t
->
subtype
==
task_subtype_tend
)
{
//
if (t->subtype == task_subtype_tend) {
t
->
buff
=
malloc
(
sizeof
(
int
)
*
t
->
ci
->
pcell_size
);
//
t->buff = malloc(sizeof(int) * t->ci->pcell_size);
err
=
MPI_Irecv
(
t
->
buff
,
t
->
ci
->
pcell_size
,
MPI_INT
,
t
->
ci
->
nodeID
,
//
err = MPI_Irecv(t->buff, t->ci->pcell_size, MPI_INT, t->ci->nodeID,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
//
t->flags, MPI_COMM_WORLD, &t->req);
}
else
{
//
} else {
err
=
MPI_Irecv
(
t
->
ci
->
parts
,
t
->
ci
->
count
,
part_mpi_type
,
//
err = MPI_Irecv(t->ci->parts, t->ci->count, part_mpi_type,
t
->
ci
->
nodeID
,
t
->
flags
,
MPI_COMM_WORLD
,
&
t
->
req
);
//
t->ci->nodeID, t->flags, MPI_COMM_WORLD, &t->req);
}
//
}
if
(
err
!=
MPI_SUCCESS
)
{
//
if (err != MPI_SUCCESS) {
mpi_error
(
err
,
"Failed to emit irecv for particle data."
);
//
mpi_error(err, "Failed to emit irecv for particle data.");
}
//
}
// message( "receiving %i parts with tag=%i from %i to %i." ,
// message( "receiving %i parts with tag=%i from %i to %i." ,
// t->ci->count , t->flags , t->ci->nodeID , s->nodeID );
// t->ci->count , t->flags , t->ci->nodeID , s->nodeID );
// fflush(stdout);
// fflush(stdout);
...
...
This diff is collapsed.
Click to expand it.
Peter W. Draper
@pdraper
mentioned in commit
75a9d6f7
·
8 years ago
mentioned in commit
75a9d6f7
mentioned in commit 75a9d6f7b056ee6eeb24d7b4654d7a9e94394590
Toggle commit list
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