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
dd072659
Commit
dd072659
authored
Jan 24, 2017
by
Matthieu Schaller
Browse files
Added a check preventing the addition of tasks with ci==NULL and cj!=NULL
parent
c8be4935
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scheduler.c
View file @
dd072659
...
...
@@ -693,6 +693,12 @@ struct task *scheduler_addtask(struct scheduler *s, enum task_types type,
enum
task_subtypes
subtype
,
int
flags
,
int
wait
,
struct
cell
*
ci
,
struct
cell
*
cj
,
int
tight
)
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
ci
==
NULL
&&
cj
!=
NULL
)
error
(
"Added a task with ci==NULL and cj!=NULL type=%s/%s"
,
taskID_names
[
type
],
subtaskID_names
[
subtype
]);
#endif
/* Get the next free task. */
const
int
ind
=
atomic_inc
(
&
s
->
tasks_next
);
...
...
@@ -1080,7 +1086,7 @@ void scheduler_start(struct scheduler *s) {
/* Don't check MPI stuff */
if
(
t
->
type
==
task_type_send
||
t
->
type
==
task_type_recv
)
continue
;
if
(
ci
==
NULL
&&
cj
==
NULL
)
{
if
(
ci
==
NULL
&&
cj
==
NULL
)
{
if
(
t
->
type
!=
task_type_grav_gather_m
&&
t
->
type
!=
task_type_grav_fft
)
error
(
"Task not associated with cells!"
);
...
...
Matthieu Schaller
@matthieu
mentioned in issue
#256 (closed)
·
Jan 24, 2017
mentioned in issue
#256 (closed)
mentioned in issue #256
Toggle commit list
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