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
9688d6ee
Commit
9688d6ee
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Error messages in the task_acts_on() function only when using debugging checks.
parent
a3505366
No related branches found
No related tags found
2 merge requests
!745
Rewrite of MPI loops - Add stellar feedback loops
,
!744
Mpi stars2 matthieu
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/task.c
+18
-5
18 additions, 5 deletions
src/task.c
with
18 additions
and
5 deletions
src/task.c
+
18
−
5
View file @
9688d6ee
...
...
@@ -151,6 +151,7 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
case
task_type_star_formation
:
return
task_action_all
;
case
task_type_drift_spart
:
case
task_type_stars_ghost
:
case
task_type_stars_sort
:
return
task_action_spart
;
...
...
@@ -180,7 +181,10 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
break
;
default:
error
(
"Unknow task_action for task"
);
#ifdef SWIFT_DEBUG_CHECKS
error
(
"Unknown task_action for task %s/%s"
,
taskID_names
[
t
->
type
],
subtaskID_names
[
t
->
subtype
]);
#endif
return
task_action_none
;
break
;
}
...
...
@@ -199,8 +203,11 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
return
task_action_part
;
else
if
(
t
->
ci
->
grav
.
count
>
0
)
return
task_action_gpart
;
else
else
{
#ifdef SWIFT_DEBUG_CHECKS
error
(
"Task without particles"
);
#endif
}
break
;
case
task_type_init_grav
:
...
...
@@ -216,13 +223,19 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
break
;
default:
error
(
"Unknown task_action for task"
);
#ifdef SWIFT_DEBUG_CHECKS
error
(
"Unknown task_action for task %s/%s"
,
taskID_names
[
t
->
type
],
subtaskID_names
[
t
->
subtype
]);
#endif
return
task_action_none
;
break
;
}
/* Silence compiler warnings */
error
(
"Unknown task_action for task"
);
#ifdef SWIFT_DEBUG_CHECKS
error
(
"Unknown task_action for task %s/%s"
,
taskID_names
[
t
->
type
],
subtaskID_names
[
t
->
subtype
]);
#endif
/* Silence compiler warnings. We should never get here. */
return
task_action_none
;
}
...
...
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