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
9d692dc9
Commit
9d692dc9
authored
11 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
use unique tags.
Former-commit-id: a92f9cc8f4bbe8e647edeaa098bc7ac6ef2a8450
parent
6bee05dd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/engine.c
+4
-4
4 additions, 4 deletions
src/engine.c
with
4 additions
and
4 deletions
src/engine.c
+
4
−
4
View file @
9d692dc9
...
...
@@ -141,16 +141,16 @@ void engine_redistribute ( struct engine *e ) {
j
+=
counts
[
k
*
nr_nodes
+
nodeID
];
}
if
(
k
!=
nodeID
&&
counts
[
nodeID
*
nr_nodes
+
k
]
>
0
)
{
if
(
MPI_Isend
(
&
parts
[
i
]
,
sizeof
(
struct
part
)
*
counts
[
nodeID
*
nr_nodes
+
k
]
,
MPI_BYTE
,
k
,
0
,
MPI_COMM_WORLD
,
&
reqs
[
4
*
k
]
)
!=
MPI_SUCCESS
)
if
(
MPI_Isend
(
&
parts
[
i
]
,
sizeof
(
struct
part
)
*
counts
[
nodeID
*
nr_nodes
+
k
]
,
MPI_BYTE
,
k
,
2
*
(
nodeID
*
nr_nodes
+
k
)
+
0
,
MPI_COMM_WORLD
,
&
reqs
[
4
*
k
]
)
!=
MPI_SUCCESS
)
error
(
"Failed to isend parts to node %i."
,
k
);
if
(
MPI_Isend
(
&
xparts
[
i
]
,
sizeof
(
struct
xpart
)
*
counts
[
nodeID
*
nr_nodes
+
k
]
,
MPI_BYTE
,
k
,
1
,
MPI_COMM_WORLD
,
&
reqs
[
4
*
k
+
1
]
)
!=
MPI_SUCCESS
)
if
(
MPI_Isend
(
&
xparts
[
i
]
,
sizeof
(
struct
xpart
)
*
counts
[
nodeID
*
nr_nodes
+
k
]
,
MPI_BYTE
,
k
,
2
*
(
nodeID
*
nr_nodes
+
k
)
+
1
,
MPI_COMM_WORLD
,
&
reqs
[
4
*
k
+
1
]
)
!=
MPI_SUCCESS
)
error
(
"Failed to isend xparts to node %i."
,
k
);
i
+=
counts
[
nodeID
*
nr_nodes
+
k
];
}
if
(
k
!=
nodeID
&&
counts
[
k
*
nr_nodes
+
nodeID
]
>
0
)
{
if
(
MPI_Irecv
(
&
parts_new
[
j
]
,
sizeof
(
struct
part
)
*
counts
[
k
*
nr_nodes
+
nodeID
]
,
MPI_BYTE
,
k
,
0
,
MPI_COMM_WORLD
,
&
reqs
[
4
*
k
+
2
]
)
!=
MPI_SUCCESS
)
if
(
MPI_Irecv
(
&
parts_new
[
j
]
,
sizeof
(
struct
part
)
*
counts
[
k
*
nr_nodes
+
nodeID
]
,
MPI_BYTE
,
k
,
2
*
(
k
*
nr_nodes
+
nodeID
)
+
0
,
MPI_COMM_WORLD
,
&
reqs
[
4
*
k
+
2
]
)
!=
MPI_SUCCESS
)
error
(
"Failed to emit irecv of parts from node %i."
,
k
);
if
(
MPI_Irecv
(
&
xparts_new
[
j
]
,
sizeof
(
struct
xpart
)
*
counts
[
k
*
nr_nodes
+
nodeID
]
,
MPI_BYTE
,
k
,
1
,
MPI_COMM_WORLD
,
&
reqs
[
4
*
k
+
3
]
)
!=
MPI_SUCCESS
)
if
(
MPI_Irecv
(
&
xparts_new
[
j
]
,
sizeof
(
struct
xpart
)
*
counts
[
k
*
nr_nodes
+
nodeID
]
,
MPI_BYTE
,
k
,
2
*
(
k
*
nr_nodes
+
nodeID
)
+
1
,
MPI_COMM_WORLD
,
&
reqs
[
4
*
k
+
3
]
)
!=
MPI_SUCCESS
)
error
(
"Failed to emit irecv of parts from node %i."
,
k
);
j
+=
counts
[
k
*
nr_nodes
+
nodeID
];
}
...
...
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