Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
ba1222eb
Commit
ba1222eb
authored
Jul 25, 2017
by
Pedro Gonnet
Browse files
remove debugging code, formatting.
parent
617d9796
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cell.c
View file @
ba1222eb
...
...
@@ -1678,30 +1678,16 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
struct
engine
*
e
=
s
->
space
->
e
;
int
rebuild
=
0
;
if
(
c
->
count
==
14623
)
message
(
"Favourite cell"
);
/* Un-skip the density tasks involved with this cell. */
for
(
struct
link
*
l
=
c
->
density
;
l
!=
NULL
;
l
=
l
->
next
)
{
struct
task
*
t
=
l
->
t
;
struct
cell
*
ci
=
t
->
ci
;
struct
cell
*
cj
=
t
->
cj
;
if
(
ci
->
count
==
5239
&&
cj
&&
cj
->
count
==
14623
)
{
// ci->loc[0]==1.411875e+00 cj->loc[0]==1.411875e+00
message
(
"found task!"
);
}
if
((
cell_is_active
(
ci
,
e
)
&&
ci
->
nodeID
==
engine_rank
)
||
if
((
cell_is_active
(
ci
,
e
)
&&
ci
->
nodeID
==
engine_rank
)
||
(
cj
!=
NULL
&&
cell_is_active
(
cj
,
e
)
&&
cj
->
nodeID
==
engine_rank
))
{
scheduler_activate
(
s
,
t
);
if
(
ci
->
count
==
5239
&&
cj
&&
cj
->
count
==
14623
)
{
// ci->loc[0]==1.411875e+00 cj->loc[0]==1.411875e+00
message
(
"activated task!"
);
}
/* Set the correct sorting flags */
if
(
t
->
type
==
task_type_pair
)
{
/* Store some values. */
...
...
@@ -1735,7 +1721,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
/* Activate the send/recv tasks. */
if
(
ci
->
nodeID
!=
engine_rank
)
{
if
(
cell_is_active
(
cj
,
e
))
{
if
(
cell_is_active
(
cj
,
e
))
{
/* Activate the tasks to recv foreign cell ci's data. */
scheduler_activate
(
s
,
ci
->
recv_xv
);
...
...
@@ -1746,11 +1732,10 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
#endif
}
}
if
(
cell_is_active
(
ci
,
e
))
scheduler_activate
(
s
,
ci
->
recv_ti
);
if
(
cell_is_active
(
ci
,
e
))
scheduler_activate
(
s
,
ci
->
recv_ti
);
/* Look for the local cell cj's send tasks. */
if
(
cell_is_active
(
ci
,
e
))
{
if
(
cell_is_active
(
ci
,
e
))
{
struct
link
*
l
=
NULL
;
for
(
l
=
cj
->
send_xv
;
l
!=
NULL
&&
l
->
t
->
cj
->
nodeID
!=
ci
->
nodeID
;
l
=
l
->
next
)
...
...
@@ -1780,8 +1765,9 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
}
}
/* We always need to send the new end time irrespective of active status */
if
(
cell_is_active
(
cj
,
e
)){
/* We always need to send the new end time irrespective of active status
*/
if
(
cell_is_active
(
cj
,
e
))
{
struct
link
*
l
=
NULL
;
for
(
l
=
cj
->
send_ti
;
l
!=
NULL
&&
l
->
t
->
cj
->
nodeID
!=
ci
->
nodeID
;
l
=
l
->
next
)
...
...
@@ -1792,7 +1778,7 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
}
else
if
(
cj
->
nodeID
!=
engine_rank
)
{
/* Activate the tasks to recv foreign cell cj's data. */
if
(
cell_is_active
(
ci
,
e
))
{
if
(
cell_is_active
(
ci
,
e
))
{
scheduler_activate
(
s
,
cj
->
recv_xv
);
if
(
cell_is_active
(
cj
,
e
))
{
scheduler_activate
(
s
,
cj
->
recv_rho
);
...
...
@@ -1801,11 +1787,10 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
#endif
}
}
if
(
cell_is_active
(
cj
,
e
))
scheduler_activate
(
s
,
cj
->
recv_ti
);
if
(
cell_is_active
(
cj
,
e
))
scheduler_activate
(
s
,
cj
->
recv_ti
);
/* Look for the local cell ci's send tasks. */
if
(
cell_is_active
(
cj
,
e
))
{
if
(
cell_is_active
(
cj
,
e
))
{
struct
link
*
l
=
NULL
;
for
(
l
=
ci
->
send_xv
;
l
!=
NULL
&&
l
->
t
->
cj
->
nodeID
!=
cj
->
nodeID
;
l
=
l
->
next
)
...
...
@@ -1835,8 +1820,9 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
#endif
}
}
/* We always need to send the new end time irrespective of active status */
if
(
cell_is_active
(
ci
,
e
))
{
/* We always need to send the new end time irrespective of active status
*/
if
(
cell_is_active
(
ci
,
e
))
{
struct
link
*
l
=
NULL
;
for
(
l
=
ci
->
send_ti
;
l
!=
NULL
&&
l
->
t
->
cj
->
nodeID
!=
cj
->
nodeID
;
l
=
l
->
next
)
...
...
@@ -1844,14 +1830,13 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
if
(
l
==
NULL
)
error
(
"Missing link to send_ti task."
);
scheduler_activate
(
s
,
l
->
t
);
}
}
#endif
}
}
/* Unskip all the other task types. */
if
(
c
->
nodeID
==
engine_rank
&&
cell_is_active
(
c
,
e
)
)
{
if
(
c
->
nodeID
==
engine_rank
&&
cell_is_active
(
c
,
e
))
{
for
(
struct
link
*
l
=
c
->
gradient
;
l
!=
NULL
;
l
=
l
->
next
)
scheduler_activate
(
s
,
l
->
t
);
...
...
@@ -1875,7 +1860,6 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
if
(
c
->
grav_long_range
!=
NULL
)
scheduler_activate
(
s
,
c
->
grav_long_range
);
if
(
c
->
cooling
!=
NULL
)
scheduler_activate
(
s
,
c
->
cooling
);
if
(
c
->
sourceterms
!=
NULL
)
scheduler_activate
(
s
,
c
->
sourceterms
);
}
return
rebuild
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment