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
b0e73316
Commit
b0e73316
authored
8 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
no longer create sort tasks for each density pair.
parent
0c082205
No related branches found
No related tags found
1 merge request
!343
Subset sorting
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheduler.c
+0
-68
0 additions, 68 deletions
src/scheduler.c
with
0 additions
and
68 deletions
src/scheduler.c
+
0
−
68
View file @
b0e73316
...
...
@@ -111,40 +111,6 @@ void scheduler_addunlock(struct scheduler *s, struct task *ta,
atomic_inc
(
&
s
->
completed_unlock_writes
);
}
/**
* @brief Create the sort tasks for the hierarchy of cells under
* a sub-cell task.
*
* @param s The #scheduler.
* @param c A #cell.
* @param t The sub-cell #task that will be unlocked by the sort tasks.
*/
void
scheduler_add_subcell_tasks
(
struct
scheduler
*
s
,
struct
cell
*
c
,
struct
task
*
t
)
{
/* Recurse? */
if
(
c
->
split
)
for
(
int
k
=
0
;
k
<
8
;
k
++
)
if
(
c
->
progeny
[
k
]
!=
NULL
)
scheduler_add_subcell_tasks
(
s
,
c
->
progeny
[
k
],
t
);
/* Lock the cell before potentially adding tasks. */
lock_lock
(
&
c
->
lock
);
/* Add a sort task if not present. Note that the sort flags will be
populated in cell_activate_subcell_tasks. */
if
(
c
->
sorts
==
NULL
)
{
c
->
sorts
=
scheduler_addtask
(
s
,
task_type_sort
,
task_subtype_none
,
0
,
0
,
c
,
NULL
);
}
/* Unlock the cell. */
lock_unlock_blind
(
&
c
->
lock
);
/* The provided task should depend on the sort. */
scheduler_addunlock
(
s
,
c
->
sorts
,
t
);
}
/**
* @brief Split a hydrodynamic task if too large.
*
...
...
@@ -191,9 +157,6 @@ static void scheduler_splittask_hydro(struct task *t, struct scheduler *s) {
/* convert to a self-subtask. */
t
->
type
=
task_type_sub_self
;
/* Depend on local sorts on this cell and its sub-cells. */
scheduler_add_subcell_tasks
(
s
,
ci
,
t
);
/* Otherwise, make tasks explicitly. */
}
else
{
...
...
@@ -255,10 +218,6 @@ static void scheduler_splittask_hydro(struct task *t, struct scheduler *s) {
/* Make this task a sub task. */
t
->
type
=
task_type_sub_pair
;
/* Depend on the sort tasks of both cells. */
scheduler_add_subcell_tasks
(
s
,
ci
,
t
);
scheduler_add_subcell_tasks
(
s
,
cj
,
t
);
/* Otherwise, split it. */
}
else
{
...
...
@@ -621,28 +580,6 @@ static void scheduler_splittask_hydro(struct task *t, struct scheduler *s) {
tl
->
flags
=
space_getsid
(
s
->
space
,
&
t
->
ci
,
&
t
->
cj
,
shift
);
}
/* Otherwise, if not spilt, stitch-up the sorting. */
}
else
{
/* Create the drift and sort for ci. */
lock_lock
(
&
ci
->
lock
);
if
(
ci
->
sorts
==
NULL
)
ci
->
sorts
=
scheduler_addtask
(
s
,
task_type_sort
,
task_subtype_none
,
0
,
0
,
ci
,
NULL
);
else
ci
->
sorts
->
flags
|=
(
1
<<
sid
);
lock_unlock_blind
(
&
ci
->
lock
);
scheduler_addunlock
(
s
,
ci
->
sorts
,
t
);
/* Create the drift and sort for cj. */
lock_lock
(
&
cj
->
lock
);
if
(
cj
->
sorts
==
NULL
)
cj
->
sorts
=
scheduler_addtask
(
s
,
task_type_sort
,
task_subtype_none
,
0
,
0
,
cj
,
NULL
);
else
cj
->
sorts
->
flags
|=
(
1
<<
sid
);
lock_unlock_blind
(
&
cj
->
lock
);
scheduler_addunlock
(
s
,
cj
->
sorts
,
t
);
}
}
/* pair interaction? */
}
/* iterate over the current task. */
...
...
@@ -1197,11 +1134,6 @@ void scheduler_rewait_mapper(void *map_data, int num_elements,
if
(
t
->
wait
<
0
)
error
(
"Task unlocked by more than %d tasks!"
,
(
1
<<
(
8
*
sizeof
(
t
->
wait
)
-
1
))
-
1
);
/* Skip sort tasks that have already been performed */
if
(
t
->
type
==
task_type_sort
&&
t
->
flags
==
0
)
{
error
(
"Empty sort task encountered."
);
}
#endif
/* Sets the waits of the dependances */
...
...
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