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
bb68a8b3
Commit
bb68a8b3
authored
Oct 10, 2016
by
Pedro Gonnet
Browse files
don't clear the active list in marktasks, as it may be called more than once.
parent
036cf356
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
bb68a8b3
...
...
@@ -1381,7 +1381,6 @@ void engine_count_and_link_tasks(struct engine *e) {
if
(
t
->
type
==
task_type_sort
&&
t
->
ci
->
split
)
for
(
int
j
=
0
;
j
<
8
;
j
++
)
if
(
t
->
ci
->
progeny
[
j
]
!=
NULL
&&
t
->
ci
->
progeny
[
j
]
->
sorts
!=
NULL
)
{
t
->
ci
->
progeny
[
j
]
->
sorts
->
skip
=
0
;
scheduler_addunlock
(
sched
,
t
->
ci
->
progeny
[
j
]
->
sorts
,
t
);
}
...
...
@@ -2151,13 +2150,13 @@ int engine_marktasks(struct engine *e) {
/* Multiple-timestep case */
}
else
{
/* Run through the tasks and mark as skip or not. */
size_t
extra_data
[
3
]
=
{
e
->
ti_current
,
rebuild_space
,
(
size_t
)
&
e
->
sched
};
scheduler_clear_active
(
&
e
->
sched
);
threadpool_map
(
&
e
->
threadpool
,
engine_marktasks_mapper
,
s
->
tasks
,
s
->
nr_tasks
,
sizeof
(
struct
task
),
10000
,
extra_data
);
rebuild_space
=
extra_data
[
1
];
message
(
"scheduler active tasks: %i"
,
e
->
sched
.
active_count
);
}
if
(
e
->
verbose
)
...
...
src/scheduler.c
View file @
bb68a8b3
...
...
@@ -1119,6 +1119,9 @@ void scheduler_start(struct scheduler *s, unsigned int mask,
pthread_cond_signal
(
&
s
->
sleep_cond
);
}
}
/* Clear the list of active tasks. */
s
->
active_count
=
0
;
/* To be safe, fire of one last sleep_cond in a safe way. */
pthread_mutex_lock
(
&
s
->
sleep_mutex
);
...
...
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