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
640f82dd
Commit
640f82dd
authored
Nov 14, 2017
by
Matthieu Schaller
Browse files
Clean-up before merge
parent
de31a223
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/scheduler.c
View file @
640f82dd
...
...
@@ -50,7 +50,6 @@
#include
"space.h"
#include
"task.h"
#include
"timers.h"
#include
"tools.h"
#include
"version.h"
/**
...
...
@@ -146,7 +145,8 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) {
/* Create file */
char
filename
[
200
]
=
"dependency_graph.dot"
;
FILE
*
f
=
open_and_check_file
(
filename
,
"w"
);
FILE
*
f
=
fopen
(
filename
,
"w"
);
if
(
f
==
NULL
)
error
(
"Error opening depenency graph file."
);
/* Write header */
fprintf
(
f
,
"digraph task_dep {
\n
"
);
...
...
src/tools.c
View file @
640f82dd
...
...
@@ -23,7 +23,6 @@
#include
"../config.h"
/* Some standard headers. */
#include
<errno.h>
#include
<math.h>
#include
<stddef.h>
#include
<stdio.h>
...
...
@@ -695,17 +694,3 @@ int compare_particles(struct part a, struct part b, double threshold) {
#endif
}
/**
* @brief Open a file and verify if it was correctly opened
*
* @param filename Name of the file
* @param mode Opening mode (e.g. 'a', 'w', ..)
*/
FILE
*
open_and_check_file
(
const
char
*
filename
,
const
char
*
mode
)
{
FILE
*
f
=
fopen
(
filename
,
mode
);
if
(
f
==
NULL
)
error
(
"Unable to open file '%s' in mode %s, error: %i"
,
filename
,
mode
,
errno
);
return
f
;
}
src/tools.h
View file @
640f82dd
...
...
@@ -52,6 +52,4 @@ int compare_values(double a, double b, double threshold, double *absDiff,
double
*
absSum
,
double
*
relDiff
);
int
compare_particles
(
struct
part
a
,
struct
part
b
,
double
threshold
);
FILE
*
open_and_check_file
(
const
char
*
filename
,
const
char
*
mode
);
#endif
/* SWIFT_TOOL_H */
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