Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
ac61ca52
Commit
ac61ca52
authored
6 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
oops -- be careful of linking NULL tasks.
parent
b5567d65
No related branches found
No related tags found
1 merge request
!790
Collapse send recv tasks
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/engine.c
+6
-0
6 additions, 0 deletions
src/engine.c
src/engine_maketasks.c
+8
-4
8 additions, 4 deletions
src/engine_maketasks.c
with
14 additions
and
4 deletions
src/engine.c
+
6
−
0
View file @
ac61ca52
...
@@ -149,6 +149,12 @@ struct end_of_step_data {
...
@@ -149,6 +149,12 @@ struct end_of_step_data {
*/
*/
void
engine_addlink
(
struct
engine
*
e
,
struct
link
**
l
,
struct
task
*
t
)
{
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. */
/* Get the next free link. */
const
size_t
ind
=
atomic_inc
(
&
e
->
nr_links
);
const
size_t
ind
=
atomic_inc
(
&
e
->
nr_links
);
if
(
ind
>=
e
->
size_links
)
{
if
(
ind
>=
e
->
size_links
)
{
...
...
This diff is collapsed.
Click to expand it.
src/engine_maketasks.c
+
8
−
4
View file @
ac61ca52
...
@@ -328,10 +328,14 @@ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c,
...
@@ -328,10 +328,14 @@ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c,
c
->
mpi
.
tag
,
0
,
c
,
NULL
);
c
->
mpi
.
tag
,
0
,
c
,
NULL
);
}
}
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_xv
);
if
(
t_xv
!=
NULL
)
{
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_rho
);
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_xv
);
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_gradient
);
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_rho
);
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_ti
);
#ifdef EXTRA_HYDRO_LOOP
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_gradient
);
#endif
engine_addlink
(
e
,
&
c
->
mpi
.
recv
,
t_ti
);
}
/* Add dependencies. */
/* Add dependencies. */
if
(
c
->
hydro
.
sorts
!=
NULL
)
{
if
(
c
->
hydro
.
sorts
!=
NULL
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment