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
394e1ecc
Commit
394e1ecc
authored
Jun 14, 2016
by
Matthieu Schaller
Browse files
Now also with correct subset loops in the ghosts
parent
c50daa96
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/runner.c
View file @
394e1ecc
...
...
@@ -527,8 +527,6 @@ void runner_do_ghost(struct runner *r, struct cell *c) {
count
=
redo
;
if
(
count
>
0
)
{
return
;
/* Climb up the cell hierarchy. */
for
(
finger
=
c
;
finger
!=
NULL
;
finger
=
finger
->
parent
)
{
...
...
@@ -552,8 +550,13 @@ void runner_do_ghost(struct runner *r, struct cell *c) {
}
/* Otherwise, sub interaction? */
else
if
(
l
->
t
->
type
==
task_type_sub_pair
)
{
// MATTHIEU
/* Otherwise, sub-self interaction? */
else
if
(
l
->
t
->
type
==
task_type_sub_self
)
runner_dosub_subset_density
(
r
,
finger
,
parts
,
pid
,
count
,
NULL
,
-
1
,
1
);
/* Otherwise, sub-pair interaction? */
else
if
(
l
->
t
->
type
==
task_type_sub_pair
)
{
/* Left or right? */
if
(
l
->
t
->
ci
==
finger
)
...
...
src/scheduler.c
View file @
394e1ecc
...
...
@@ -774,22 +774,22 @@ void scheduler_reweight(struct scheduler *s) {
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
break
;
case
task_type_sub_pair
:
if
(
t
->
ci
->
nodeID
!=
nodeID
||
t
->
cj
->
nodeID
!=
nodeID
)
{
if
(
t
->
flags
<
0
)
t
->
weight
+=
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
;
else
t
->
weight
+=
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
}
else
{
if
(
t
->
flags
<
0
)
t
->
weight
+=
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
;
else
t
->
weight
+=
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
}
break
;
case
task_type_sub_self
:
t
->
weight
+=
1
*
wscale
*
t
->
ci
->
count
*
t
->
ci
->
count
;
if
(
t
->
ci
->
nodeID
!=
nodeID
||
t
->
cj
->
nodeID
!=
nodeID
)
{
if
(
t
->
flags
<
0
)
t
->
weight
+=
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
;
else
t
->
weight
+=
3
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
}
else
{
if
(
t
->
flags
<
0
)
t
->
weight
+=
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
;
else
t
->
weight
+=
2
*
wscale
*
t
->
ci
->
count
*
t
->
cj
->
count
*
sid_scale
[
t
->
flags
];
}
break
;
case
task_type_sub_self
:
t
->
weight
+=
1
*
wscale
*
t
->
ci
->
count
*
t
->
ci
->
count
;
break
;
case
task_type_ghost
:
if
(
t
->
ci
==
t
->
ci
->
super
)
t
->
weight
+=
wscale
*
t
->
ci
->
count
;
...
...
@@ -967,7 +967,8 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
case
task_type_pair
:
case
task_type_sub_pair
:
qid
=
t
->
ci
->
super
->
owner
;
if
(
qid
<
0
||
s
->
queues
[
qid
].
count
>
s
->
queues
[
t
->
cj
->
super
->
owner
].
count
)
if
(
qid
<
0
||
s
->
queues
[
qid
].
count
>
s
->
queues
[
t
->
cj
->
super
->
owner
].
count
)
qid
=
t
->
cj
->
super
->
owner
;
break
;
case
task_type_recv
:
...
...
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