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
f973c37e
Commit
f973c37e
authored
Apr 28, 2017
by
Matthieu Schaller
Browse files
Write one timer dumpfile per MPI rank.
parent
b4cbd031
Changes
5
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
f973c37e
...
...
@@ -616,7 +616,7 @@ int main(int argc, char *argv[]) {
clocks_getunit
());
/* File for the timers */
if
(
with_verbose_timers
)
timers_open_file
();
if
(
with_verbose_timers
)
timers_open_file
(
myrank
);
/* Main simulation loop */
for
(
int
j
=
0
;
!
engine_is_done
(
&
e
)
&&
e
.
step
-
1
!=
nsteps
;
j
++
)
{
...
...
src/runner.c
View file @
f973c37e
...
...
@@ -1450,7 +1450,8 @@ void runner_do_end_force(struct runner *r, struct cell *c, int timer) {
* @param clear_sorts Should we clear the sort flag and hence trigger a sort ?
* @param timer Are we timing this ?
*/
void
runner_do_recv_part
(
struct
runner
*
r
,
struct
cell
*
c
,
int
clear_sorts
,
int
timer
)
{
void
runner_do_recv_part
(
struct
runner
*
r
,
struct
cell
*
c
,
int
clear_sorts
,
int
timer
)
{
#ifdef WITH_MPI
...
...
@@ -1467,8 +1468,7 @@ void runner_do_recv_part(struct runner *r, struct cell *c, int clear_sorts, int
float
h_max
=
0
.
f
;
/* Clear this cell's sorted mask. */
if
(
clear_sorts
)
c
->
sorted
=
0
;
if
(
clear_sorts
)
c
->
sorted
=
0
;
/* If this cell is a leaf, collect the particle data. */
if
(
!
c
->
split
)
{
...
...
@@ -1876,8 +1876,8 @@ void *runner_main(void *data) {
free
(
t
->
buff
);
}
else
if
(
t
->
subtype
==
task_subtype_xv
)
{
runner_do_recv_part
(
r
,
ci
,
1
,
1
);
}
else
if
(
t
->
subtype
==
task_subtype_rho
)
{
runner_do_recv_part
(
r
,
ci
,
0
,
1
);
}
else
if
(
t
->
subtype
==
task_subtype_rho
)
{
runner_do_recv_part
(
r
,
ci
,
1
,
1
);
}
else
if
(
t
->
subtype
==
task_subtype_gpart
)
{
runner_do_recv_gpart
(
r
,
ci
,
1
);
}
else
if
(
t
->
subtype
==
task_subtype_spart
)
{
...
...
src/runner_doiact.h
View file @
f973c37e
...
...
@@ -1187,7 +1187,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
error
(
"particle shift diff exceeds dx_max_sort."
);
}
#endif
/* SWIFT_DEBUG_CHECKS */
/* Get some other useful values. */
const
double
hi_max
=
ci
->
h_max
*
kernel_gamma
-
rshift
;
const
double
hj_max
=
cj
->
h_max
*
kernel_gamma
;
...
...
src/timers.c
View file @
f973c37e
...
...
@@ -123,10 +123,14 @@ void timers_print(int step) {
/**
* @brief Opens the file to contain the timers info and print a header
*
* @param rank The MPI rank of the file.
*/
void
timers_open_file
()
{
void
timers_open_file
(
int
rank
)
{
timers_file
=
fopen
(
"timers.txt"
,
"w"
);
char
buff
[
100
];
sprintf
(
buff
,
"timers_%d.txt"
,
rank
);
timers_file
=
fopen
(
buff
,
"w"
);
fprintf
(
timers_file
,
"# timers:
\n
# step | "
);
for
(
int
k
=
0
;
k
<
timer_count
;
k
++
)
...
...
src/timers.h
View file @
f973c37e
...
...
@@ -118,7 +118,7 @@ INLINE static ticks timers_toc(unsigned int t, ticks tic) {
/* Function prototypes. */
void
timers_reset_all
();
void
timers_reset
(
unsigned
long
long
mask
);
void
timers_open_file
();
void
timers_open_file
(
int
rank
);
void
timers_close_file
();
void
timers_print
(
int
step
);
...
...
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