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
617182d5
Commit
617182d5
authored
1 year ago
by
William Roper
Browse files
Options
Downloads
Patches
Plain Diff
Added explicit error for void cell tasks
parent
956c7b97
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/engine_marktasks.c
+47
-29
47 additions, 29 deletions
src/engine_marktasks.c
with
47 additions
and
29 deletions
src/engine_marktasks.c
+
47
−
29
View file @
617182d5
...
...
@@ -86,6 +86,16 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
const
enum
task_types
t_type
=
t
->
type
;
const
enum
task_subtypes
t_subtype
=
t
->
subtype
;
/* Ensure void cells haven't found their way into having tasks */
if
(
t
->
ci
->
subtype
==
void_cell
)
{
error
(
"Found a void cell with a task! (t->type=%s, t->subtype->%s)"
,
taskID_names
[
t_type
],
subtaskID_names
[
t_subtype
]);
}
if
(
t
->
cj
!=
NULL
&&
t
->
cj
->
subtype
==
void_cell
)
{
error
(
"Found a void cell with a task! (t->type=%s, t->subtype->%s)"
,
taskID_names
[
t_type
],
subtaskID_names
[
t_subtype
]);
}
/* Single-cell task? */
if
(
t_type
==
task_type_self
||
t_type
==
task_type_sub_self
)
{
...
...
@@ -331,8 +341,9 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
}
/* Activate the gravity drift */
else
if
(
t_type
==
task_type_self
&&
(
t_subtype
==
task_subtype_grav
||
t_subtype
==
task_subtype_grav_bkg
))
{
else
if
(
t_type
==
task_type_self
&&
(
t_subtype
==
task_subtype_grav
||
t_subtype
==
task_subtype_grav_bkg
))
{
if
(
ci_active_gravity
)
{
scheduler_activate
(
s
,
t
);
cell_activate_subcell_grav_tasks
(
t
->
ci
,
NULL
,
s
);
...
...
@@ -679,12 +690,13 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
scheduler_activate
(
s
,
t
);
if
(
t_type
==
task_type_pair
&&
(
t_subtype
==
task_subtype_grav
||
t_subtype
==
task_subtype_grav_bkg
||
t_subtype
==
task_subtype_grav_zoombuff
||
t_subtype
==
task_subtype_grav_zoombkg
||
t_subtype
==
task_subtype_grav_buffbkg
||
t_subtype
==
task_subtype_grav_bkgzoom
))
{
if
(
t_type
==
task_type_pair
&&
(
t_subtype
==
task_subtype_grav
||
t_subtype
==
task_subtype_grav_bkg
||
t_subtype
==
task_subtype_grav_zoombuff
||
t_subtype
==
task_subtype_grav_zoombkg
||
t_subtype
==
task_subtype_grav_buffbkg
||
t_subtype
==
task_subtype_grav_bkgzoom
))
{
/* Activate the gravity drift */
cell_activate_subcell_grav_tasks
(
t
->
ci
,
t
->
cj
,
s
);
}
...
...
@@ -932,9 +944,9 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
#ifdef SWIFT_DEBUG_CHECKS
/* Ensure we are not rebuilding on a zoom and natural cell pair */
if
((
ci
->
type
==
bkg
||
ci
->
type
==
buffer
||
cj
->
type
==
bkg
||
cj
->
type
==
buffer
)
&&
(
ci
->
type
==
zoom
||
cj
->
type
==
zoom
))
if
((
ci
->
type
==
bkg
||
ci
->
type
==
buffer
||
cj
->
type
==
bkg
||
cj
->
type
==
buffer
)
&&
(
ci
->
type
==
zoom
||
cj
->
type
==
zoom
))
error
(
"We just decided to rebuild based on a hydro zoom and natural "
"cell pair. "
...
...
@@ -1364,15 +1376,18 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* A better error for when a send task is completely absent. */
if
(
cj
->
mpi
.
send
==
NULL
)
{
int
cid
=
cell_getid_pos
(
s
->
space
,
ci
->
loc
[
0
]
+
(
ci
->
width
[
0
]
/
2
),
ci
->
loc
[
1
]
+
(
ci
->
width
[
0
]
/
2
),
ci
->
loc
[
2
]
+
(
ci
->
width
[
0
]
/
2
));
int
cjd
=
cell_getid_pos
(
s
->
space
,
cj
->
loc
[
0
]
+
(
cj
->
width
[
0
]
/
2
),
cj
->
loc
[
1
]
+
(
cj
->
width
[
0
]
/
2
),
cj
->
loc
[
2
]
+
(
cj
->
width
[
0
]
/
2
));
message
(
"Found a NULL send task for cell pair %d->%d (subtype=%s)"
,
cid
,
cjd
,
subtaskID_names
[
t_subtype
]);
int
cid
=
cell_getid_pos
(
s
->
space
,
ci
->
loc
[
0
]
+
(
ci
->
width
[
0
]
/
2
),
ci
->
loc
[
1
]
+
(
ci
->
width
[
0
]
/
2
),
ci
->
loc
[
2
]
+
(
ci
->
width
[
0
]
/
2
));
int
cjd
=
cell_getid_pos
(
s
->
space
,
cj
->
loc
[
0
]
+
(
cj
->
width
[
0
]
/
2
),
cj
->
loc
[
1
]
+
(
cj
->
width
[
0
]
/
2
),
cj
->
loc
[
2
]
+
(
cj
->
width
[
0
]
/
2
));
message
(
"Found a NULL send task for cell pair %d->%d (subtype=%s)"
,
cid
,
cjd
,
subtaskID_names
[
t_subtype
]);
}
/* Zoom sends are handled separately. */
...
...
@@ -1399,15 +1414,18 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* A better error for when a send task is completely absent. */
if
(
ci
->
mpi
.
send
==
NULL
)
{
int
cid
=
cell_getid_pos
(
s
->
space
,
ci
->
loc
[
0
]
+
(
ci
->
width
[
0
]
/
2
),
ci
->
loc
[
1
]
+
(
ci
->
width
[
0
]
/
2
),
ci
->
loc
[
2
]
+
(
ci
->
width
[
0
]
/
2
));
int
cjd
=
cell_getid_pos
(
s
->
space
,
cj
->
loc
[
0
]
+
(
cj
->
width
[
0
]
/
2
),
cj
->
loc
[
1
]
+
(
cj
->
width
[
0
]
/
2
),
cj
->
loc
[
2
]
+
(
cj
->
width
[
0
]
/
2
));
message
(
"Found a NULL send task for cell pair %d->%d (subtype=%s)"
,
cid
,
cjd
,
subtaskID_names
[
t_subtype
]);
int
cid
=
cell_getid_pos
(
s
->
space
,
ci
->
loc
[
0
]
+
(
ci
->
width
[
0
]
/
2
),
ci
->
loc
[
1
]
+
(
ci
->
width
[
0
]
/
2
),
ci
->
loc
[
2
]
+
(
ci
->
width
[
0
]
/
2
));
int
cjd
=
cell_getid_pos
(
s
->
space
,
cj
->
loc
[
0
]
+
(
cj
->
width
[
0
]
/
2
),
cj
->
loc
[
1
]
+
(
cj
->
width
[
0
]
/
2
),
cj
->
loc
[
2
]
+
(
cj
->
width
[
0
]
/
2
));
message
(
"Found a NULL send task for cell pair %d->%d (subtype=%s)"
,
cid
,
cjd
,
subtaskID_names
[
t_subtype
]);
}
/* Zoom sends are handled separately. */
...
...
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