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
6374ecb8
Commit
6374ecb8
authored
7 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
always activate sorts on foreign cells and make sure that we only ever drift local cells.
parent
8edd2f26
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/cell.c
+11
-5
11 additions, 5 deletions
src/cell.c
with
11 additions
and
5 deletions
src/cell.c
+
11
−
5
View file @
6374ecb8
...
...
@@ -1591,7 +1591,7 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj,
finger
->
sorted
=
0
;
}
}
if
(
!
(
ci
->
sorted
&
(
1
<<
sid
)))
{
if
(
!
(
ci
->
sorted
&
(
1
<<
sid
))
||
ci
->
nodeID
!=
engine_rank
)
{
atomic_or
(
&
ci
->
sorts
->
flags
,
(
1
<<
sid
));
scheduler_activate
(
s
,
ci
->
sorts
);
}
...
...
@@ -1608,7 +1608,7 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj,
finger
->
sorted
=
0
;
}
}
if
(
!
(
cj
->
sorted
&
(
1
<<
sid
)))
{
if
(
!
(
cj
->
sorted
&
(
1
<<
sid
))
||
cj
->
nodeID
!=
engine_rank
)
{
atomic_or
(
&
cj
->
sorts
->
flags
,
(
1
<<
sid
));
scheduler_activate
(
s
,
cj
->
sorts
);
}
...
...
@@ -1657,7 +1657,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
finger
->
sorted
=
0
;
}
}
if
(
!
(
ci
->
sorted
&
(
1
<<
t
->
flags
)))
{
if
(
!
(
ci
->
sorted
&
(
1
<<
t
->
flags
))
||
ci
->
nodeID
!=
engine_rank
)
{
atomic_or
(
&
ci
->
sorts
->
flags
,
(
1
<<
t
->
flags
));
scheduler_activate
(
s
,
ci
->
sorts
);
if
(
ci
->
nodeID
==
engine_rank
)
scheduler_activate
(
s
,
ci
->
drift_part
);
...
...
@@ -1672,7 +1672,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
finger
->
sorted
=
0
;
}
}
if
(
!
(
cj
->
sorted
&
(
1
<<
t
->
flags
)))
{
if
(
!
(
cj
->
sorted
&
(
1
<<
t
->
flags
))
||
cj
->
nodeID
!=
engine_rank
)
{
atomic_or
(
&
cj
->
sorts
->
flags
,
(
1
<<
t
->
flags
));
scheduler_activate
(
s
,
cj
->
sorts
);
if
(
cj
->
nodeID
==
engine_rank
)
scheduler_activate
(
s
,
cj
->
drift_part
);
...
...
@@ -1718,7 +1718,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
else
error
(
"Drift task missing !"
);
if
(
t
->
type
==
task_type_pair
)
scheduler_activate
(
s
,
cj
->
drift_part
);
if
(
cell_is_active
(
cj
,
e
))
{
for
(
l
=
cj
->
send_rho
;
l
!=
NULL
&&
l
->
t
->
cj
->
nodeID
!=
ci
->
nodeID
;
...
...
@@ -1870,9 +1870,15 @@ void cell_drift_part(struct cell *c, const struct engine *e) {
float
dx_max
=
0
.
f
,
dx2_max
=
0
.
f
;
float
dx_max_sort
=
0
.
0
f
,
dx2_max_sort
=
0
.
f
;
float
cell_h_max
=
0
.
f
;
#ifdef SWIFT_DEBUG_CHECKS
/* Check that we only drift local cells. */
if
(
c
->
nodeID
!=
engine_rank
)
error
(
"Drifting a foreign cell is nope."
);
/* Check that we are actually going to move forward. */
if
(
ti_current
<
ti_old_part
)
error
(
"Attempt to drift to the past"
);
#endif // SWIFT_DEBUG_CHECKS
/* Are we not in a leaf ? */
if
(
c
->
split
)
{
...
...
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