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
f9d79855
Commit
f9d79855
authored
Mar 02, 2018
by
Matthieu Schaller
Browse files
Print the scale-factor to stdout and the timestep file.
parent
14f5b1f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
f9d79855
...
...
@@ -845,9 +845,10 @@ int main(int argc, char *argv[]) {
/* Legend */
if
(
myrank
==
0
)
printf
(
"# %6s %14s %14s %9s %12s %12s %12s %16s [%s] %6s
\n
"
,
"Step"
,
"Time"
,
"Time-step"
,
"Time-bins"
,
"Updates"
,
"g-Updates"
,
"s-Updates"
,
"Wall-clock time"
,
clocks_getunit
(),
"Props"
);
printf
(
"# %6s %14s %14s %14s %9s %12s %12s %12s %16s [%s] %6s
\n
"
,
"Step"
,
"Time"
,
"Scale-factor"
,
"Time-step"
,
"Time-bins"
,
"Updates"
,
"g-Updates"
,
"s-Updates"
,
"Wall-clock time"
,
clocks_getunit
(),
"Props"
);
/* File for the timers */
if
(
with_verbose_timers
)
timers_open_file
(
myrank
);
...
...
examples/plot_scaling_results.py
View file @
f9d79855
...
...
@@ -148,8 +148,8 @@ def parse_files():
# Loop over all files for a given series and load the times
for
j
in
range
(
0
,
len
(
file_list
)):
times
=
np
.
loadtxt
(
file_list
[
j
],
usecols
=
(
8
,))
updates
=
np
.
loadtxt
(
file_list
[
j
],
usecols
=
(
5
,))
times
=
np
.
loadtxt
(
file_list
[
j
],
usecols
=
(
9
,))
updates
=
np
.
loadtxt
(
file_list
[
j
],
usecols
=
(
6
,))
totalTime
[
i
].
append
(
np
.
sum
(
times
))
sumTotal
.
append
(
np
.
sum
(
totalTime
[
i
]))
...
...
examples/plot_scaling_results_breakdown.py
View file @
f9d79855
...
...
@@ -149,8 +149,8 @@ def parse_files():
# Loop over all files for a given series and load the times
for
j
in
range
(
0
,
len
(
file_list
)):
times
=
np
.
loadtxt
(
file_list
[
j
],
usecols
=
(
8
,))
updates
=
np
.
loadtxt
(
file_list
[
j
],
usecols
=
(
5
,))
times
=
np
.
loadtxt
(
file_list
[
j
],
usecols
=
(
9
,))
updates
=
np
.
loadtxt
(
file_list
[
j
],
usecols
=
(
6
,))
totalTime
[
i
].
append
(
np
.
sum
(
times
))
sumTotal
.
append
(
np
.
sum
(
totalTime
[
i
]))
...
...
src/engine.c
View file @
f9d79855
...
...
@@ -4371,17 +4371,17 @@ void engine_step(struct engine *e) {
if
(
e
->
nodeID
==
0
)
{
/* Print some information to the screen */
printf
(
" %6d %14e %14e %4d %4d %12zu %12zu %12zu %21.3f %6d
\n
"
,
e
->
step
,
e
->
time
,
e
->
time
_step
,
e
->
min_ac
ti
v
e_
bin
,
e
->
m
ax
_active_bin
,
e
->
updates
,
e
->
g_updates
,
e
->
s_updates
,
e
->
wallclock_time
,
e
->
step_props
);
printf
(
" %6d %14e %14e
%14e
%4d %4d %12zu %12zu %12zu %21.3f %6d
\n
"
,
e
->
step
,
e
->
time
,
e
->
cosmology
->
a
,
e
->
ti
m
e_
step
,
e
->
m
in
_active_bin
,
e
->
max_active_bin
,
e
->
updates
,
e
->
g_updates
,
e
->
s_updates
,
e
->
wallclock_time
,
e
->
step_props
);
fflush
(
stdout
);
fprintf
(
e
->
file_timesteps
,
" %6d %14e %14e %4d %4d %12zu %12zu %12zu %21.3f %6d
\n
"
,
e
->
step
,
e
->
time
,
e
->
time
_step
,
e
->
min_ac
ti
v
e_
bin
,
e
->
m
ax
_active_bin
,
e
->
updates
,
e
->
g_updates
,
e
->
s_updates
,
e
->
wallclock_time
,
e
->
step_props
);
" %6d %14e %14e
%14e
%4d %4d %12zu %12zu %12zu %21.3f %6d
\n
"
,
e
->
step
,
e
->
time
,
e
->
cosmology
->
a
,
e
->
ti
m
e_
step
,
e
->
m
in
_active_bin
,
e
->
max_active_bin
,
e
->
updates
,
e
->
g_updates
,
e
->
s_updates
,
e
->
wallclock_time
,
e
->
step_props
);
fflush
(
e
->
file_timesteps
);
}
...
...
@@ -5530,9 +5530,10 @@ void engine_config(int restart, struct engine *e,
engine_step_prop_snapshot
,
engine_step_prop_restarts
);
fprintf
(
e
->
file_timesteps
,
"# %6s %14s %14s %9s %12s %12s %12s %16s [%s] %6s
\n
"
,
"Step"
,
"Time"
,
"Time-step"
,
"Time-bins"
,
"Updates"
,
"g-Updates"
,
"s-Updates"
,
"Wall-clock time"
,
clocks_getunit
(),
"Props"
);
"# %6s %14s %14s %14s %9s %12s %12s %12s %16s [%s] %6s
\n
"
,
"Step"
,
"Time"
,
"Scale-factor"
,
"Time-step"
,
"Time-bins"
,
"Updates"
,
"g-Updates"
,
"s-Updates"
,
"Wall-clock time"
,
clocks_getunit
(),
"Props"
);
fflush
(
e
->
file_timesteps
);
}
}
...
...
Yves Revaz
@yvesrevaz
mentioned in issue
#416 (closed)
·
Mar 28, 2018
mentioned in issue
#416 (closed)
mentioned in issue #416
Toggle commit list
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