Commit 9fd015d1 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Only dump the used/unused parameter yaml files when *not* restarting a run

parent 94d7353f
...@@ -1244,13 +1244,15 @@ int main(int argc, char *argv[]) { ...@@ -1244,13 +1244,15 @@ int main(int argc, char *argv[]) {
error("Failed to generate restart filename"); error("Failed to generate restart filename");
/* dump the parameters as used. */ /* dump the parameters as used. */
if (!restart && myrank == 0) {
/* used parameters */ /* used parameters */
parser_write_params_to_file(params, "used_parameters.yml", 1); parser_write_params_to_file(params, "used_parameters.yml", /*used=*/1);
/* unused parameters */ /* unused parameters */
parser_write_params_to_file(params, "unused_parameters.yml", 0); parser_write_params_to_file(params, "unused_parameters.yml", /*used=*/0);
}
/* Dump memory use report if collected for the 0 step. */ /* Dump memory use report if collected for the 0 step. */
#ifdef SWIFT_MEMUSE_REPORTS #ifdef SWIFT_MEMUSE_REPORTS
{ {
char dumpfile[40]; char dumpfile[40];
......
...@@ -673,9 +673,9 @@ int main(int argc, char *argv[]) { ...@@ -673,9 +673,9 @@ int main(int argc, char *argv[]) {
#endif // SWIFT_DEBUG_THREADPOOL #endif // SWIFT_DEBUG_THREADPOOL
/* used parameters */ /* used parameters */
parser_write_params_to_file(params, "fof_used_parameters.yml", 1); parser_write_params_to_file(params, "fof_used_parameters.yml", /*used=*/1);
/* unused parameters */ /* unused parameters */
parser_write_params_to_file(params, "fof_unused_parameters.yml", 0); parser_write_params_to_file(params, "fof_unused_parameters.yml", /*used=*/0);
/* Dump memory use report */ /* Dump memory use report */
#ifdef SWIFT_MEMUSE_REPORTS #ifdef SWIFT_MEMUSE_REPORTS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment