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
0dc501a0
Commit
0dc501a0
authored
11 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
fix waitall, may terminate early.
Former-commit-id: dc7fbe6566032ee469ab0a2d36c10cca630ea51b
parent
d02fc045
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/engine.c
+3
-2
3 additions, 2 deletions
src/engine.c
src/space.c
+2
-2
2 additions, 2 deletions
src/space.c
with
5 additions
and
4 deletions
src/engine.c
+
3
−
2
View file @
0dc501a0
...
...
@@ -744,9 +744,10 @@ int engine_exchange_strays ( struct engine *e , struct part *parts , struct xpar
/* Wait for each part array to come in and collect the new
parts from the proxies. */
for
(
k
=
0
;
k
<
2
*
(
nr_in
+
nr_out
)
;
k
++
)
{
if
(
MPI_Waitany
(
2
*
e
->
nr_proxies
,
reqs_in
,
&
pid
,
&
status
)
!=
MPI_SUCCESS
||
pid
==
MPI_UNDEFINED
)
if
(
MPI_Waitany
(
2
*
e
->
nr_proxies
,
reqs_in
,
&
pid
,
&
status
)
!=
MPI_SUCCESS
)
{
error
(
"MPI_Waitany failed."
);
if
(
pid
==
MPI_UNDEFINED
)
break
;
// message( "request from proxy %i has arrived." , pid );
if
(
reqs_in
[
pid
&
~
1
]
==
MPI_REQUEST_NULL
&&
reqs_in
[
pid
|
1
]
==
MPI_REQUEST_NULL
)
{
...
...
This diff is collapsed.
Click to expand it.
src/space.c
+
2
−
2
View file @
0dc501a0
...
...
@@ -507,11 +507,11 @@ void space_rebuild ( struct space *s , double cell_max ) {
void
parts_sort
(
struct
part
*
parts
,
struct
xpart
*
xparts
,
int
*
ind
,
int
N
,
int
min
,
int
max
)
{
struct
qstack
{
int
i
,
j
,
min
,
max
;
volatile
int
i
,
j
,
min
,
max
;
volatile
int
ready
;
};
struct
qstack
*
qstack
;
int
qstack_size
=
(
max
-
min
)
/
2
+
1
;
int
qstack_size
=
(
max
-
min
)
/
2
+
1
0
;
volatile
unsigned
int
first
,
last
,
waiting
;
int
pivot
;
...
...
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