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
0dc501a0
Commit
0dc501a0
authored
Aug 28, 2013
by
Pedro Gonnet
Browse files
fix waitall, may terminate early.
Former-commit-id: dc7fbe6566032ee469ab0a2d36c10cca630ea51b
parent
d02fc045
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/engine.c
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
)
{
...
...
src/space.c
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
;
...
...
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