Skip to content
GitLab
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
be2ddf1e
Commit
be2ddf1e
authored
Jan 12, 2016
by
Matthieu Schaller
Browse files
Commented out many debugging messages
parent
66ae5260
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
be2ddf1e
...
...
@@ -1828,13 +1828,6 @@ void engine_launch(struct engine *e, int nr_runners, unsigned int mask) {
*/
void
engine_init_particles
(
struct
engine
*
e
)
{
int
k
;
float
dt_max
=
0
.
0
f
,
dt_min
=
FLT_MAX
;
double
epot
=
0
.
0
,
ekin
=
0
.
0
;
float
mom
[
3
]
=
{
0
.
0
,
0
.
0
,
0
.
0
};
float
ang
[
3
]
=
{
0
.
0
,
0
.
0
,
0
.
0
};
int
count
=
0
;
struct
cell
*
c
;
struct
space
*
s
=
e
->
s
;
// engine_repartition(e);
...
...
src/runner.c
View file @
be2ddf1e
...
...
@@ -883,7 +883,7 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) {
current_dt
=
0
.
0
f
;
float
t_start
,
t_end
,
t_end_min
=
FLT_MAX
,
t_end_max
=
0
.,
dt
;
float
dt_timeline
;
float
h_max
,
dx_max
,
dt_min
,
dt_max
;
float
h_max
,
dx_max
;
//
, dt_min, dt_max;
double
ekin
=
0
.
0
,
epot
=
0
.
0
;
float
mom
[
3
]
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
},
ang
[
3
]
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
float
m
,
x
[
3
],
v_full
[
3
];
...
...
@@ -896,8 +896,8 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) {
if
(
!
c
->
split
)
{
/* Init the min/max counters. */
dt_min
=
FLT_MAX
;
dt_max
=
0
.
0
f
;
//
dt_min = FLT_MAX;
//
dt_max = 0.0f;
h_max
=
0
.
0
f
;
dx_max
=
0
.
0
f
;
...
...
@@ -993,9 +993,9 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) {
/* Otherwise, agregate data from children. */
else
{
/* Init
with the first non-null child
. */
dt_min
=
FLT_MAX
;
dt_max
=
0
.
0
f
;
/* Init
everything
. */
//
dt_min = FLT_MAX;
//
dt_max = 0.0f;
h_max
=
0
.
0
f
;
dx_max
=
0
.
0
f
;
updated
=
0
;
...
...
src/runner_doiact.h
View file @
be2ddf1e
/*******************************************************************************
* This file is part of SWIFT.
* Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk)
...
...
@@ -780,15 +781,13 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj) {
#endif
TIMER_TIC
for
(
int
p
=
0
;
p
<
ci
->
count
;
++
p
)
if
(
ci
->
parts
[
p
].
id
==
1000
&&
t_current
>
0
)
message
(
"Particle is here -- i t_current=%f ci->t_end_min=%f cj->t_end_min=%f, ci->count=%d"
,
t_current
,
ci
->
t_end_min
,
cj
->
t_end_min
,
ci
->
count
);
for
(
int
p
=
0
;
p
<
cj
->
count
;
++
p
)
if
(
cj
->
parts
[
p
].
id
==
1000
&&
t_current
>
0
)
message
(
"Particle is here -- j t_current=%f ci->t_end_min=%f cj->t_end_min=%f cj->count=%d"
,
t_current
,
ci
->
t_end_min
,
cj
->
t_end_min
,
cj
->
count
);
/* for (int p=0; p<ci->count; ++p) */
/* if(ci->parts[p].id == 1000 && t_current > 0) */
/* message("Particle is here -- i t_current=%f ci->t_end_min=%f cj->t_end_min=%f, ci->count=%d", t_current, ci->t_end_min, cj->t_end_min, ci->count); */
/* for (int p=0; p<cj->count; ++p) */
/* if(cj->parts[p].id == 1000 && t_current > 0) */
/* message("Particle is here -- j t_current=%f ci->t_end_min=%f cj->t_end_min=%f cj->count=%d", t_current, ci->t_end_min, cj->t_end_min, cj->count); */
/* Anything to do here? */
...
...
@@ -1392,9 +1391,9 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
#endif
TIMER_TIC
for
(
int
p
=
0
;
p
<
c
->
count
;
++
p
)
if
(
c
->
parts
[
p
].
id
==
1000
)
message
(
"Particle is here -- i"
);
/*
for (int p=0; p<c->count; ++p)
*/
/*
if(c->parts[p].id == 1000)
*/
/*
message("Particle is here -- i");
*/
...
...
@@ -1621,9 +1620,9 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {
#endif
TIMER_TIC
for
(
int
p
=
0
;
p
<
c
->
count
;
++
p
)
if
(
c
->
parts
[
p
].
id
==
1000
)
message
(
"Particle is here -- i"
);
/*
for (int p=0; p<c->count; ++p)
*/
/*
if(c->parts[p].id == 1000)
*/
/*
message("Particle is here -- i");
*/
/* Set up indt if needed. */
...
...
src/runner_iact_legacy.h
View file @
be2ddf1e
...
...
@@ -26,18 +26,18 @@
#include
"part.h"
#include
"vector.h"
#define PRINT_PARTS \
if (pi->id == 1000) { \
message( \
"pi->id=%lld pi->h=%f pi->N_ngb=%f pi->rho=%f pi->t_beg=%f pi->t_end=%f pos=[%f %f %f]", \
pi->id, pi->h, pi->density.wcount, pi->rho, pi->t_begin, pi->t_end, pi->x[0], pi->x[1], pi->x[2]); \
} \
if (pj->id == 1000) { \
message( \
"pj->id=%lld pj->h=%f pj->N_ngb=%f pj->rho=%f pj->t_beg=%f pj->t_end=%f pos=[%f %f %f]", \
pj->id, pj->h, pj->density.wcount, pj->rho, pj->t_begin, pj->t_end, pj->x[0], pj->x[1], pj->x[2]); \
}\
fflush(stdout);
/*
#define PRINT_PARTS \
*/
/*
if (pi->id == 1000) { \
*/
/*
message( \
*/
/*
"pi->id=%lld pi->h=%f pi->N_ngb=%f pi->rho=%f pi->t_beg=%f pi->t_end=%f pos=[%f %f %f]", \
*/
/*
pi->id, pi->h, pi->density.wcount, pi->rho, pi->t_begin, pi->t_end, pi->x[0], pi->x[1], pi->x[2]); \
*/
/*
} \
*/
/*
if (pj->id == 1000) { \
*/
/*
message( \
*/
/*
"pj->id=%lld pj->h=%f pj->N_ngb=%f pj->rho=%f pj->t_beg=%f pj->t_end=%f pos=[%f %f %f]", \
*/
/*
pj->id, pj->h, pj->density.wcount, pj->rho, pj->t_begin, pj->t_end, pj->x[0], pj->x[1], pj->x[2]); \
*/
/*
}\
*/
/*
fflush(stdout);
*/
/**
...
...
@@ -72,7 +72,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
float
dv
[
3
],
curlvr
[
3
];
int
k
;
PRINT_PARTS
;
//
PRINT_PARTS;
/* Get the masses. */
mi
=
pi
->
mass
;
...
...
@@ -248,7 +248,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density(
float
dv
[
3
],
curlvr
[
3
];
int
k
;
PRINT_PARTS
;
//
PRINT_PARTS;
/* Get the masses. */
mj
=
pj
->
mass
;
...
...
src/task.c
View file @
be2ddf1e
...
...
@@ -273,37 +273,33 @@ void task_print_mask(unsigned int mask) {
void
task_do_rewait
(
struct
task
*
t
)
{
const
unsigned
int
mask
=
t
->
flags
;
for
(
struct
task
*
t2
=
(
struct
task
*
)
t
->
ci
;
t2
!=
(
struct
task
*
)
t
->
cj
;
t2
++
)
{
if
(
t2
->
skip
)
continue
;
/* Skip tasks not in the mask */
if
(
!
((
1
<<
t2
->
type
)
&
mask
)
)
continue
;
/* Skip sort tasks that have already been */
if
(
t2
->
type
==
task_type_sort
&&
t2
->
flags
==
0
)
continue
;
if
(
store
==
NULL
&&
t2
->
type
==
task_type_pair
&&
t2
->
subtype
==
task_subtype_density
)
{
message
(
"
\n
"
);
message
(
"Checking task %s-%s address: %p"
,
taskID_names
[
t2
->
type
],
subtaskID_names
[
t2
->
subtype
],
t2
);
store
=
t2
;
}
for
(
int
k
=
0
;
k
<
t2
->
nr_unlock_tasks
;
k
++
)
{
struct
task
*
t3
=
t2
->
unlock_tasks
[
k
];
atomic_inc
(
&
t3
->
wait
);
if
(
t3
==
store
)
{
message
(
"Unlocked by task %s-%s address: %p"
,
taskID_names
[
t2
->
type
],
subtaskID_names
[
t2
->
subtype
],
t2
);
}
}
}
const
unsigned
int
mask
=
t
->
flags
;
for
(
struct
task
*
t2
=
(
struct
task
*
)
t
->
ci
;
t2
!=
(
struct
task
*
)
t
->
cj
;
t2
++
)
{
if
(
t2
->
skip
)
continue
;
/* Skip tasks not in the mask */
if
(
!
((
1
<<
t2
->
type
)
&
mask
)
)
continue
;
/* Skip sort tasks that have already been */
if
(
t2
->
type
==
task_type_sort
&&
t2
->
flags
==
0
)
continue
;
/* if(store == NULL && t2->type==task_type_pair && t2->subtype==task_subtype_density) { */
/* message("\n"); */
/* message("Checking task %s-%s address: %p", taskID_names[t2->type], subtaskID_names[t2->subtype], t2); */
/* store = t2; */
/* } */
for
(
int
k
=
0
;
k
<
t2
->
nr_unlock_tasks
;
k
++
)
{
struct
task
*
t3
=
t2
->
unlock_tasks
[
k
];
atomic_inc
(
&
t3
->
wait
);
/* if (t3 == store) { */
/* message("Unlocked by task %s-%s address: %p" , taskID_names[t2->type], subtaskID_names[t2->subtype], t2); */
/* } */
}
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment