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
ac61ca52
Commit
ac61ca52
authored
Apr 16, 2019
by
Pedro Gonnet
Browse files
oops -- be careful of linking NULL tasks.
parent
b5567d65
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
ac61ca52
...
...
@@ -149,6 +149,12 @@ struct end_of_step_data {
*/
void
engine_addlink
(
struct
engine
*
e
,
struct
link
**
l
,
struct
task
*
t
)
{
#ifdef SWIFT_DEBUG_CHECKS
if
(
t
==
NULL
)
{
error
(
"Trying to link NULL task."
);
}
#endif
/* Get the next free link. */
const
size_t
ind
=
atomic_inc
(
&
e
->
nr_links
);
if
(
ind
>=
e
->
size_links
)
{
...
...
src/engine_maketasks.c
View file @
ac61ca52
...
...
@@ -328,10 +328,14 @@ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c,
c
->
mpi
.
tag
,
0
,
c
,
NULL
);
}
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_xv
);
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_rho
);
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_gradient
);
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_ti
);
if
(
t_xv
!=
NULL
)
{
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_xv
);
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_rho
);
#ifdef EXTRA_HYDRO_LOOP
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_gradient
);
#endif
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_ti
);
}
/* Add dependencies. */
if
(
c
->
hydro
.
sorts
!=
NULL
)
{
...
...
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