Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
a5bbe133
Commit
a5bbe133
authored
5 months ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Do not reset the delta times for snapshot triggers upon restarting the code
parent
c184f132
Branches
Branches containing commit
Tags
Tags containing commit
4 merge requests
!2119
Mhd canvas
,
!2112
Prep for remix merge
,
!2109
Catching the zoom branch up with master
,
!2081
Do not reset the delta times for snapshot triggers upon restarting the code
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/engine.h
+1
-1
1 addition, 1 deletion
src/engine.h
src/engine_config.c
+1
-1
1 addition, 1 deletion
src/engine_config.c
src/engine_io.c
+10
-6
10 additions, 6 deletions
src/engine_io.c
with
12 additions
and
8 deletions
src/engine.h
+
1
−
1
View file @
a5bbe133
...
...
@@ -684,7 +684,7 @@ struct engine {
/* Function prototypes, engine.c. */
void
engine_addlink
(
struct
engine
*
e
,
struct
link
**
l
,
struct
task
*
t
);
void
engine_barrier
(
struct
engine
*
e
);
void
engine_compute_next_snapshot_time
(
struct
engine
*
e
);
void
engine_compute_next_snapshot_time
(
struct
engine
*
e
,
const
int
restart
);
void
engine_compute_next_stf_time
(
struct
engine
*
e
);
void
engine_compute_next_fof_time
(
struct
engine
*
e
);
void
engine_compute_next_statistics_time
(
struct
engine
*
e
);
...
...
This diff is collapsed.
Click to expand it.
src/engine_config.c
+
1
−
1
View file @
a5bbe133
...
...
@@ -789,7 +789,7 @@ void engine_config(int restart, int fof, struct engine *e,
#endif
/* Find the time of the first snapshot output */
engine_compute_next_snapshot_time
(
e
);
engine_compute_next_snapshot_time
(
e
,
restart
);
/* Find the time of the first statistics output */
engine_compute_next_statistics_time
(
e
);
...
...
This diff is collapsed.
Click to expand it.
src/engine_io.c
+
10
−
6
View file @
a5bbe133
...
...
@@ -565,7 +565,7 @@ void engine_io(struct engine *e) {
#endif
/* ... and find the next output time */
engine_compute_next_snapshot_time
(
e
);
engine_compute_next_snapshot_time
(
e
,
/*restart=*/
0
);
break
;
case
output_statistics
:
...
...
@@ -752,15 +752,19 @@ void engine_set_and_verify_snapshot_triggers(struct engine *e) {
* @brief Computes the next time (on the time line) for a dump
*
* @param e The #engine.
* @param restart Are we calling this upon a restart event?
*/
void
engine_compute_next_snapshot_time
(
struct
engine
*
e
)
{
void
engine_compute_next_snapshot_time
(
struct
engine
*
e
,
const
int
restart
)
{
/* Do output_list file case */
if
(
e
->
output_list_snapshots
)
{
output_list_read_next_time
(
e
->
output_list_snapshots
,
e
,
"snapshots"
,
&
e
->
ti_next_snapshot
);
engine_set_and_verify_snapshot_triggers
(
e
);
/* Unless we are restarting, check the allowed recording trigger time */
if
(
!
restart
)
engine_set_and_verify_snapshot_triggers
(
e
);
/* All done in the list case */
return
;
}
...
...
@@ -818,8 +822,8 @@ void engine_compute_next_snapshot_time(struct engine *e) {
message
(
"Next snapshot time set to t=%e."
,
next_snapshot_time
);
}
/*
S
et the recording triggers accordingly for the next output */
engine_set_and_verify_snapshot_triggers
(
e
);
/*
Unless we are restarting, s
et the recording triggers accordingly for the next output */
if
(
!
restart
)
engine_set_and_verify_snapshot_triggers
(
e
);
}
}
...
...
@@ -1184,7 +1188,7 @@ void engine_init_output_lists(struct engine *e, struct swift_params *params,
if
(
e
->
output_list_snapshots
->
select_output_on
)
output_list_check_selection
(
e
->
output_list_snapshots
,
output_options
);
engine_compute_next_snapshot_time
(
e
);
engine_compute_next_snapshot_time
(
e
,
/*restart=*/
0
);
if
(
e
->
policy
&
engine_policy_cosmology
)
e
->
a_first_snapshot
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment