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
db0dc02c
Commit
db0dc02c
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
More changes to the extra hydroloop
parent
4ebac269
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/engine_maketasks.c
+41
-73
41 additions, 73 deletions
src/engine_maketasks.c
with
41 additions
and
73 deletions
src/engine_maketasks.c
+
41
−
73
View file @
db0dc02c
...
...
@@ -1713,25 +1713,31 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements,
scheduler_addunlock
(
sched
,
t
->
cj
->
hydro
.
super
->
hydro
.
sorts
,
t
);
}
#ifdef EXTRA_HYDRO_LOOP
/* Start by constructing the task for the second and third hydro loop */
t_gradient
=
scheduler_addtask
(
sched
,
task_type_pair
,
task_subtype_gradient
,
0
,
0
,
t
->
ci
,
t
->
cj
);
t_force
=
scheduler_addtask
(
sched
,
task_type_pair
,
task_subtype_force
,
0
,
0
,
t
->
ci
,
t
->
cj
);
/* and the task for the time-step limiter */
if
(
with_limiter
)
if
(
with_limiter
)
{
t_limiter
=
scheduler_addtask
(
sched
,
task_type_pair
,
task_subtype_limiter
,
0
,
0
,
t
->
ci
,
t
->
cj
);
}
engine_addlink
(
e
,
&
t
->
ci
->
hydro
.
force
,
t_force
);
engine_addlink
(
e
,
&
t
->
cj
->
hydro
.
force
,
t_force
);
if
(
with_limiter
)
{
engine_addlink
(
e
,
&
t
->
ci
->
hydro
.
limiter
,
t_limiter
);
engine_addlink
(
e
,
&
t
->
cj
->
hydro
.
limiter
,
t_limiter
);
}
#ifdef EXTRA_HYDRO_LOOP
/* Start by constructing the task for the second and third hydro loop */
t_gradient
=
scheduler_addtask
(
sched
,
task_type_pair
,
task_subtype_gradient
,
0
,
0
,
t
->
ci
,
t
->
cj
);
/* Add the link between the new loop and both cells */
engine_addlink
(
e
,
&
t
->
ci
->
hydro
.
gradient
,
t_gradient
);
engine_addlink
(
e
,
&
t
->
cj
->
hydro
.
gradient
,
t_gradient
);
engine_addlink
(
e
,
&
t
->
ci
->
hydro
.
force
,
t_force
);
engine_addlink
(
e
,
&
t
->
cj
->
hydro
.
force
,
t_force
);
if
(
with_limiter
)
engine_addlink
(
e
,
&
t
->
ci
->
hydro
.
limiter
,
t_limiter
);
if
(
with_limiter
)
engine_addlink
(
e
,
&
t
->
cj
->
hydro
.
limiter
,
t_limiter
);
/* Now, build all the dependencies for the hydro for the cells */
/* that are local and are not descendant of the same super_hydro-cells */
...
...
@@ -1739,83 +1745,45 @@ void engine_make_extra_hydroloop_tasks_mapper(void *map_data, int num_elements,
engine_make_hydro_loops_dependencies
(
sched
,
t
,
t_gradient
,
t_force
,
t_limiter
,
t
->
ci
,
with_cooling
,
with_limiter
);
scheduler_addunlock
(
sched
,
t_force
,
t
->
ci
->
super
->
end_force
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t
->
ci
->
super
->
kick2
,
t_limiter
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
ci
->
super
->
timestep
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
ci
->
super
->
timestep_limiter
);
}
if
(
t
->
cj
->
nodeID
==
nodeID
)
{
if
(
t
->
ci
->
hydro
.
super
!=
t
->
cj
->
hydro
.
super
)
{
engine_make_hydro_loops_dependencies
(
sched
,
t
,
t_gradient
,
t_force
,
t_limiter
,
t
->
cj
,
with_cooling
,
with_limiter
);
}
if
(
t
->
ci
->
super
!=
t
->
cj
->
super
)
{
scheduler_addunlock
(
sched
,
t_force
,
t
->
cj
->
super
->
end_force
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t
->
cj
->
super
->
kick2
,
t_limiter
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
cj
->
super
->
timestep
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
cj
->
super
->
timestep_limiter
);
}
if
((
t
->
cj
->
nodeID
==
nodeID
)
&&
(
t
->
ci
->
super
!=
t
->
cj
->
super
))
{
engine_make_hydro_loops_dependencies
(
sched
,
t
,
t_gradient
,
t_force
,
t_limiter
,
t
->
ci
,
with_cooling
,
with_limiter
);
}
#else
/* Start by constructing the task for the second hydro loop */
t_force
=
scheduler_addtask
(
sched
,
task_type_pair
,
task_subtype_force
,
0
,
0
,
t
->
ci
,
t
->
cj
);
/* and the task for the time-step limiter */
if
(
with_limiter
)
t_limiter
=
scheduler_addtask
(
sched
,
task_type_pair
,
task_subtype_limiter
,
0
,
0
,
t
->
ci
,
t
->
cj
);
/* Add the link between the new loop and both cells */
engine_addlink
(
e
,
&
t
->
ci
->
hydro
.
force
,
t_force
);
engine_addlink
(
e
,
&
t
->
cj
->
hydro
.
force
,
t_force
);
if
(
with_limiter
)
engine_addlink
(
e
,
&
t
->
ci
->
hydro
.
limiter
,
t_limiter
);
if
(
with_limiter
)
engine_addlink
(
e
,
&
t
->
cj
->
hydro
.
limiter
,
t_limiter
);
/* Now, build all the dependencies for the hydro for the cells */
/* that are local and are not descendant of the same super_hydro-cells */
if
(
t
->
ci
->
nodeID
==
nodeID
)
{
engine_make_hydro_loops_dependencies
(
sched
,
t
,
t_force
,
t_limiter
,
t
->
ci
,
with_cooling
,
with_limiter
);
scheduler_addunlock
(
sched
,
t_force
,
t
->
ci
->
super
->
end_force
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t
->
ci
->
super
->
kick2
,
t_limiter
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
ci
->
super
->
timestep
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
ci
->
super
->
timestep_limiter
);
}
if
(
t
->
cj
->
nodeID
==
nodeID
)
{
if
(
t
->
ci
->
hydro
.
super
!=
t
->
cj
->
hydro
.
super
)
{
engine_make_hydro_loops_dependencies
(
sched
,
t
,
t_force
,
t_limiter
,
t
->
cj
,
with_cooling
,
with_limiter
);
}
if
(
t
->
ci
->
super
!=
t
->
cj
->
super
)
{
scheduler_addunlock
(
sched
,
t_force
,
t
->
cj
->
super
->
end_force
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t
->
cj
->
super
->
kick2
,
t_limiter
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
cj
->
super
->
timestep
);
if
(
with_limiter
)
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
cj
->
super
->
timestep_limiter
);
}
if
((
t
->
cj
->
nodeID
==
nodeID
)
&&
(
t
->
ci
->
super
!=
t
->
cj
->
super
))
{
engine_make_hydro_loops_dependencies
(
sched
,
t
,
t_force
,
t_limiter
,
t
->
ci
,
with_cooling
,
with_limiter
);
}
#endif
if
(
t
->
ci
->
nodeID
==
nodeID
)
{
scheduler_addunlock
(
sched
,
t_force
,
t
->
ci
->
super
->
end_force
);
if
(
with_limiter
)
{
scheduler_addunlock
(
sched
,
t
->
ci
->
super
->
kick2
,
t_limiter
);
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
ci
->
super
->
timestep
);
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
ci
->
super
->
timestep_limiter
);
}
}
if
((
t
->
cj
->
nodeID
==
nodeID
)
&&
(
t
->
ci
->
super
!=
t
->
cj
->
super
))
{
if
(
with_limiter
)
{
scheduler_addunlock
(
sched
,
t
->
cj
->
super
->
kick2
,
t_limiter
);
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
cj
->
super
->
timestep
);
scheduler_addunlock
(
sched
,
t_limiter
,
t
->
cj
->
super
->
timestep_limiter
);
}
}
}
/* Otherwise, sub-self interaction? */
...
...
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