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
58533d22
Commit
58533d22
authored
7 years ago
by
lhausamm
Committed by
Loic Hausammann
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove bug when logger is disabled
parent
e4adbf64
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!502
Logger
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/engine.h
+3
-3
3 additions, 3 deletions
src/engine.h
src/logger.c
+4
-0
4 additions, 0 deletions
src/logger.c
src/logger.h
+4
-0
4 additions, 0 deletions
src/logger.h
src/runner.c
+6
-0
6 additions, 0 deletions
src/runner.c
with
17 additions
and
3 deletions
src/engine.h
+
3
−
3
View file @
58533d22
...
...
@@ -322,13 +322,13 @@ struct engine {
/* timestamp offset for logger*/
size_t
logger_time_offset
;
/* Need to dump a snapshot ? */
int
dump_snapshot
;
/* Size of the dump file */
int
logger_size
;
#endif
/* Need to dump a snapshot ? */
int
dump_snapshot
;
/* How many steps have we done with the same set of tasks? */
int
tasks_age
;
...
...
This diff is collapsed.
Click to expand it.
src/logger.c
+
4
−
0
View file @
58533d22
...
...
@@ -21,6 +21,7 @@
#include
"../config.h"
#ifdef HAVE_POSIX_FALLOCATE
/* Are we on a sensible platform? */
#ifdef WITH_LOGGER
/* Some standard headers. */
#include
<stdint.h>
...
...
@@ -432,4 +433,7 @@ int logger_read_timestamp(unsigned long long int *t, size_t *offset,
return
mask
;
}
#endif
/* WITH_LOGGER */
#endif
/* HAVE_POSIX_FALLOCATE */
This diff is collapsed.
Click to expand it.
src/logger.h
+
4
−
0
View file @
58533d22
...
...
@@ -19,6 +19,8 @@
#ifndef SWIFT_LOGGER_H
#define SWIFT_LOGGER_H
#ifdef WITH_LOGGER
/* Includes. */
#include
"part.h"
#include
"units.h"
...
...
@@ -130,4 +132,6 @@ __attribute__((always_inline)) INLINE static int spart_should_write(
return
(
sp
->
last_output
>
e
->
logger_max_steps
);
}
#endif
/* WITH_LOGGER */
#endif
/* SWIFT_LOGGER_H */
This diff is collapsed.
Click to expand it.
src/runner.c
+
6
−
0
View file @
58533d22
...
...
@@ -2704,6 +2704,7 @@ void *runner_main(void *data) {
*/
void
runner_do_logger
(
struct
runner
*
r
,
struct
cell
*
c
,
int
timer
)
{
#ifdef WITH_LOGGER
const
struct
engine
*
e
=
r
->
e
;
struct
part
*
restrict
parts
=
c
->
parts
;
struct
xpart
*
restrict
xparts
=
c
->
xparts
;
...
...
@@ -2779,4 +2780,9 @@ void runner_do_logger(struct runner *r, struct cell *c, int timer) {
}
if
(
timer
)
TIMER_TOC
(
timer_logger
);
#else
error
(
"Logger disabled, please enable it during configuration"
);
#endif
}
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