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
3faabb00
Commit
3faabb00
authored
Mar 04, 2016
by
Peter W. Draper
Browse files
Remove TIMER_VERBOSE support
No longer works so is just crufting up the code
parent
08d09ee8
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/runner.c
View file @
3faabb00
...
...
@@ -311,20 +311,7 @@ void runner_dosort(struct runner *r, struct cell *c, int flags, int clock) {
}
} */
#ifdef TIMER_VERBOSE
message
(
"runner %02i: %i parts at depth %i (flags = %i%i%i%i%i%i%i%i%i%i%i%i%i) "
"took %.3f ms."
,
r
->
id
,
count
,
c
->
depth
,
(
flags
&
0x1000
)
>>
12
,
(
flags
&
0x800
)
>>
11
,
(
flags
&
0x400
)
>>
10
,
(
flags
&
0x200
)
>>
9
,
(
flags
&
0x100
)
>>
8
,
(
flags
&
0x80
)
>>
7
,
(
flags
&
0x40
)
>>
6
,
(
flags
&
0x20
)
>>
5
,
(
flags
&
0x10
)
>>
4
,
(
flags
&
0x8
)
>>
3
,
(
flags
&
0x4
)
>>
2
,
(
flags
&
0x2
)
>>
1
,
(
flags
&
0x1
)
>>
0
,
clocks_from_ticks
(
TIMER_TOC
(
timer_dosort
)));
fflush
(
stdout
);
#else
if
(
clock
)
TIMER_TOC
(
timer_dosort
);
#endif
}
void
runner_dogsort
(
struct
runner
*
r
,
struct
cell
*
c
,
int
flags
,
int
clock
)
{
...
...
@@ -469,20 +456,7 @@ void runner_dogsort(struct runner *r, struct cell *c, int flags, int clock) {
}
} */
#ifdef TIMER_VERBOSE
message
(
"runner %02i: %i parts at depth %i (flags = %i%i%i%i%i%i%i%i%i%i%i%i%i) "
"took %.3f ms."
,
r
->
id
,
count
,
c
->
depth
,
(
flags
&
0x1000
)
>>
12
,
(
flags
&
0x800
)
>>
11
,
(
flags
&
0x400
)
>>
10
,
(
flags
&
0x200
)
>>
9
,
(
flags
&
0x100
)
>>
8
,
(
flags
&
0x80
)
>>
7
,
(
flags
&
0x40
)
>>
6
,
(
flags
&
0x20
)
>>
5
,
(
flags
&
0x10
)
>>
4
,
(
flags
&
0x8
)
>>
3
,
(
flags
&
0x4
)
>>
2
,
(
flags
&
0x2
)
>>
1
,
(
flags
&
0x1
)
>>
0
,
clocks_from_ticks
(
TIMER_TOC
(
timer_dosort
)));
fflush
(
stdout
);
#else
if
(
clock
)
TIMER_TOC
(
timer_dosort
);
#endif
}
/**
...
...
@@ -522,15 +496,7 @@ void runner_doinit(struct runner *r, struct cell *c, int timer) {
}
}
if
(
timer
)
{
#ifdef TIMER_VERBOSE
message
(
"runner %02i: %i parts at depth %i took %.3f ms."
,
r
->
id
,
c
->
count
,
c
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
timer_init
)));
fflush
(
stdout
);
#else
TIMER_TOC
(
timer_init
);
#endif
}
if
(
timer
)
TIMER_TOC
(
timer_init
);
}
/**
...
...
@@ -679,13 +645,7 @@ void runner_doghost(struct runner *r, struct cell *c) {
if
(
count
)
message
(
"Smoothing length failed to converge on %i particles."
,
count
);
#ifdef TIMER_VERBOSE
message
(
"runner %02i: %i parts at depth %i took %.3f ms."
,
r
->
id
,
c
->
count
,
c
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
timer_doghost
)));
fflush
(
stdout
);
#else
TIMER_TOC
(
timer_doghost
);
#endif
}
/**
...
...
@@ -779,15 +739,7 @@ void runner_dodrift(struct runner *r, struct cell *c, int timer) {
c
->
h_max
=
h_max
;
c
->
dx_max
=
dx_max
;
if
(
timer
)
{
#ifdef TIMER_VERBOSE
message
(
"runner %02i: %i parts at depth %i took %.3f ms."
,
r
->
id
,
c
->
count
,
c
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
timer_drift
)));
fflush
(
stdout
);
#else
TIMER_TOC
(
timer_drift
);
#endif
}
if
(
timer
)
TIMER_TOC
(
timer_drift
);
}
/**
...
...
@@ -991,15 +943,7 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) {
c
->
ti_end_min
=
ti_end_min
;
c
->
ti_end_max
=
ti_end_max
;
if
(
timer
)
{
#ifdef TIMER_VERBOSE
message
(
"runner %02i: %i parts at depth %i took %.3f ms."
,
r
->
id
,
c
->
count
,
c
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
timer_kick
)));
fflush
(
stdout
);
#else
TIMER_TOC
(
timer_kick
);
#endif
}
if
(
timer
)
TIMER_TOC
(
timer_kick
);
}
/**
...
...
src/runner_doiact.h
View file @
3faabb00
...
...
@@ -202,15 +202,7 @@ void DOPAIR_NAIVE(struct runner *r, struct cell *restrict ci,
IACT
(
r2q
[
k
],
&
dxq
[
3
*
k
],
hiq
[
k
],
hjq
[
k
],
piq
[
k
],
pjq
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_dopair_naive[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f) "
"took %.3f ms.
\n
"
,
r
->
id
,
count_i
,
count_j
,
ci
->
depth
,
ci
->
h_max
,
cj
->
h_max
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOPAIR
)));
#else
TIMER_TOC
(
TIMER_DOPAIR
);
#endif
}
void
DOSELF_NAIVE
(
struct
runner
*
r
,
struct
cell
*
restrict
c
)
{
...
...
@@ -305,12 +297,7 @@ void DOSELF_NAIVE(struct runner *r, struct cell *restrict c) {
IACT
(
r2q
[
k
],
&
dxq
[
3
*
k
],
hiq
[
k
],
hjq
[
k
],
piq
[
k
],
pjq
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_doself[%02i]: %i parts at depth %i took %.3f ms.
\n
"
,
r
->
id
,
count
,
c
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOSELF
)));
#else
TIMER_TOC
(
TIMER_DOSELF
);
#endif
}
/**
...
...
@@ -510,15 +497,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
IACT_NONSYM
(
r2q
[
k
],
&
dxq
[
3
*
k
],
hiq
[
k
],
hjq
[
k
],
piq
[
k
],
pjq
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_dopair_subset[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f) "
"took %.3f ms.
\n
"
,
r
->
id
,
count
,
count_j
,
ci
->
depth
,
ci
->
h_max
,
cj
->
h_max
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOPAIR
)));
#else
TIMER_TOC
(
timer_dopair_subset
);
#endif
}
/**
...
...
@@ -630,15 +609,7 @@ void DOPAIR_SUBSET_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_NONSYM
(
r2q
[
k
],
&
dxq
[
3
*
k
],
hiq
[
k
],
hjq
[
k
],
piq
[
k
],
pjq
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_dopair_subset[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f) "
"took %.3f ms.
\n
"
,
r
->
id
,
count
,
count_j
,
ci
->
depth
,
ci
->
h_max
,
cj
->
h_max
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOPAIR
)));
#else
TIMER_TOC
(
timer_dopair_subset
);
#endif
}
/**
...
...
@@ -741,13 +712,7 @@ void DOSELF_SUBSET(struct runner *r, struct cell *restrict ci,
IACT_NONSYM
(
r2q
[
k
],
&
dxq
[
3
*
k
],
hiq
[
k
],
hjq
[
k
],
piq
[
k
],
pjq
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_doself_subset[%02i]: %i/%i parts at depth %i took %.3f ms.
\n
"
,
r
->
id
,
count
,
ci
->
count
,
ci
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOSELF
)));
#else
TIMER_TOC
(
timer_dopair_subset
);
#endif
}
/**
...
...
@@ -941,16 +906,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj) {
IACT_NONSYM
(
r2q
[
k
],
&
dxq
[
3
*
k
],
hiq
[
k
],
hjq
[
k
],
piq
[
k
],
pjq
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_dopair[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f, h=%.3f) "
"took %.3f ms.
\n
"
,
r
->
id
,
count_i
,
count_j
,
ci
->
depth
,
ci
->
h_max
,
cj
->
h_max
,
fmax
(
ci
->
h
[
0
],
fmax
(
ci
->
h
[
1
],
ci
->
h
[
2
])),
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOPAIR
)));
#else
TIMER_TOC
(
TIMER_DOPAIR
);
#endif
}
void
DOPAIR2
(
struct
runner
*
r
,
struct
cell
*
ci
,
struct
cell
*
cj
)
{
...
...
@@ -1336,16 +1292,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
IACT
(
r2q2
[
k
],
&
dxq2
[
3
*
k
],
hiq2
[
k
],
hjq2
[
k
],
piq2
[
k
],
pjq2
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_dopair[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f, h=%.3f) "
"took %.3f ms.
\n
"
,
r
->
id
,
count_i
,
count_j
,
ci
->
depth
,
ci
->
h_max
,
cj
->
h_max
,
fmax
(
ci
->
h
[
0
],
fmax
(
ci
->
h
[
1
],
ci
->
h
[
2
])),
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOPAIR
)));
#else
TIMER_TOC
(
TIMER_DOPAIR
);
#endif
}
/**
...
...
@@ -1570,12 +1517,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
IACT
(
r2q2
[
k
],
&
dxq2
[
3
*
k
],
hiq2
[
k
],
hjq2
[
k
],
piq2
[
k
],
pjq2
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_doself1[%02i]: %i parts at depth %i took %.3f ms.
\n
"
,
r
->
id
,
count
,
c
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOSELF
)));
#else
TIMER_TOC
(
TIMER_DOSELF
);
#endif
}
void
DOSELF2
(
struct
runner
*
r
,
struct
cell
*
restrict
c
)
{
...
...
@@ -1767,12 +1709,7 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {
IACT
(
r2q2
[
k
],
&
dxq2
[
3
*
k
],
hiq2
[
k
],
hjq2
[
k
],
piq2
[
k
],
pjq2
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_doself2[%02i]: %i parts at depth %i took %.3f ms.
\n
"
,
r
->
id
,
count
,
c
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOSELF
)));
#else
TIMER_TOC
(
TIMER_DOSELF
);
#endif
}
/**
...
...
@@ -2054,13 +1991,7 @@ void DOSUB1(struct runner *r, struct cell *ci, struct cell *cj, int sid,
}
/* otherwise, pair interaction. */
if
(
gettimer
)
#ifdef TIMER_VERBOSE
printf
(
"runner_dosub1[%02i]: flags=%i at depth %i took %.3f ms.
\n
"
,
r
->
id
,
sid
,
ci
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOSUB
)));
#else
TIMER_TOC
(
TIMER_DOSUB
);
#endif
if
(
gettimer
)
TIMER_TOC
(
TIMER_DOSUB
);
}
void
DOSUB2
(
struct
runner
*
r
,
struct
cell
*
ci
,
struct
cell
*
cj
,
int
sid
,
...
...
@@ -2329,13 +2260,7 @@ void DOSUB2(struct runner *r, struct cell *ci, struct cell *cj, int sid,
}
/* otherwise, pair interaction. */
if
(
gettimer
)
#ifdef TIMER_VERBOSE
printf
(
"runner_dosub2[%02i]: flags=%i at depth %i took %.3f ms.
\n
"
,
r
->
id
,
sid
,
ci
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOSUB
)));
#else
TIMER_TOC
(
TIMER_DOSUB
);
#endif
if
(
gettimer
)
TIMER_TOC
(
TIMER_DOSUB
);
}
void
DOSUB_SUBSET
(
struct
runner
*
r
,
struct
cell
*
ci
,
struct
part
*
parts
,
...
...
@@ -2933,11 +2858,5 @@ void DOSUB_SUBSET(struct runner *r, struct cell *ci, struct part *parts,
}
/* otherwise, pair interaction. */
if
(
gettimer
)
#ifdef TIMER_VERBOSE
printf
(
"runner_dosub[%02i]: flags=%i at depth %i took %.3f ms.
\n
"
,
r
->
id
,
sid
,
ci
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOSUB
)));
#else
TIMER_TOC
(
TIMER_DOSUB
);
#endif
if
(
gettimer
)
TIMER_TOC
(
TIMER_DOSUB
);
}
src/runner_doiact_grav.h
View file @
3faabb00
...
...
@@ -193,16 +193,7 @@ void runner_dopair_grav_new(struct runner *r, struct cell *ci,
}
/* loop over the parts in cj and interact with the multipole. */
#ifdef TIMER_VERBOSE
printf
(
"runner_dopair[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f, h=%.3f) "
"took %.3f ms.
\n
"
,
r
->
id
,
count_i
,
count_j
,
ci
->
depth
,
ci
->
h_max
,
cj
->
h_max
,
fmax
(
ci
->
h
[
0
],
fmax
(
ci
->
h
[
1
],
ci
->
h
[
2
])),
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOPAIR
)));
#else
TIMER_TOC
(
TIMER_DOPAIR
);
#endif
}
/**
...
...
@@ -430,15 +421,7 @@ void runner_dopair_grav(struct runner *r, struct cell *restrict ci,
runner_iact_grav
(
r2q
[
k
],
&
dxq
[
3
*
k
],
piq
[
k
],
pjq
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_dopair_naive_grav[%02i]: %i/%i parts at depth %i "
"(r_max=%.3f/%.3f) took %.3f ms.
\n
"
,
r
->
id
,
count_i
,
count_j
,
ci
->
depth
,
ci
->
h_max
,
cj
->
h_max
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOPAIR
)));
#else
TIMER_TOC
(
timer_dopair_grav
);
#endif
}
/**
...
...
@@ -526,15 +509,7 @@ void runner_doself_grav(struct runner *r, struct cell *restrict c) {
runner_iact_grav
(
r2q
[
k
],
&
dxq
[
3
*
k
],
piq
[
k
],
pjq
[
k
]);
#endif
#ifdef TIMER_VERBOSE
printf
(
"runner_doself_grav[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f) "
"took %.3f ms.
\n
"
,
r
->
id
,
count_i
,
count_j
,
ci
->
depth
,
ci
->
h_max
,
cj
->
h_max
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOPAIR
)));
#else
TIMER_TOC
(
timer_doself_grav
);
#endif
}
/**
...
...
@@ -617,13 +592,7 @@ void runner_dosub_grav(struct runner *r, struct cell *ci, struct cell *cj,
runner_dograv_mm
(
r
,
ci
,
cj
);
}
if
(
gettimer
)
#ifdef TIMER_VERBOSE
printf
(
"runner_dosub_grav[%02i]: at depth %i took %.3f ms.
\n
"
,
r
->
id
,
ci
->
depth
,
clocks_from_ticks
(
TIMER_TOC
(
TIMER_DOSUB
)));
#else
TIMER_TOC
(
timer_dosub_grav
);
#endif
if
(
gettimer
)
TIMER_TOC
(
timer_dosub_grav
);
}
#endif
/* SWIFT_RUNNER_DOIACT_GRAV_H */
src/timers.h
View file @
3faabb00
...
...
@@ -57,11 +57,6 @@ extern ticks timers[timer_count];
#define timers_mask_all ((1 << timer_count) - 1)
/* Define the timer macros. */
#ifdef TIMER_VERBOSE
#ifndef TIMER
#define TIMER
#endif
#endif
#ifdef TIMER
#define TIMER_TIC_ND tic = getticks();
#define TIMER_TIC2_ND ticks tic2 = getticks();
...
...
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