Skip to content
Snippets Groups Projects
Commit 1776ca03 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Some fixes to the new test

parent d668907b
No related branches found
No related tags found
1 merge request!520Select io
...@@ -80,6 +80,7 @@ tests/test_nonsym_force_1_vec.dat ...@@ -80,6 +80,7 @@ tests/test_nonsym_force_1_vec.dat
tests/test_nonsym_force_2_vec.dat tests/test_nonsym_force_2_vec.dat
tests/potential.dat tests/potential.dat
tests/testGreetings tests/testGreetings
tests/testSelectOutput
tests/testReading tests/testReading
tests/testSingle tests/testSingle
tests/testTimeIntegration tests/testTimeIntegration
......
...@@ -890,8 +890,10 @@ void io_check_output_fields(const struct swift_params* params, ...@@ -890,8 +890,10 @@ void io_check_output_fields(const struct swift_params* params,
/* Check that we have a 0 or 1 */ /* Check that we have a 0 or 1 */
if (retParam != 0 && retParam != 1) if (retParam != 0 && retParam != 1)
error("Unexpected input for %s. Received %i but expect 0 or 1. ", message(
field_name, retParam); "WARNING: Unexpected input for %s. Received %i but expect 0 or "
"1. ",
field_name, retParam);
/* Found it, so move to the next one. */ /* Found it, so move to the next one. */
break; break;
......
...@@ -42,8 +42,9 @@ void select_output_engine_init(struct engine *e, struct space *s, ...@@ -42,8 +42,9 @@ void select_output_engine_init(struct engine *e, struct space *s,
/* set parameters */ /* set parameters */
e->verbose = 1; e->verbose = 1;
e->time = 0; e->time = 0;
e->snapshotOutputCount = 0; e->snapshot_output_count = 0;
e->snapshotCompression = 0; e->snapshot_compression = 0;
e->snapshot_label_delta = 1;
}; };
void select_output_space_init(struct space *s, double *dim, int periodic, void select_output_space_init(struct space *s, double *dim, int periodic,
...@@ -77,7 +78,11 @@ void select_output_engine_clean(struct engine *e) { ...@@ -77,7 +78,11 @@ void select_output_engine_clean(struct engine *e) {
threadpool_clean(&e->threadpool); threadpool_clean(&e->threadpool);
} }
int main() { int main(int argc, char *argv[]) {
/* Initialize CPU frequency, this also starts time. */
unsigned long long cpufreq = 0;
clocks_set_cpufreq(cpufreq);
char *base_name = "testSelectOutput"; char *base_name = "testSelectOutput";
size_t Ngas = 0, Ngpart = 0, Nspart = 0; size_t Ngas = 0, Ngpart = 0, Nspart = 0;
...@@ -139,7 +144,7 @@ int main() { ...@@ -139,7 +144,7 @@ int main() {
/* check output selection */ /* check output selection */
message("Checking output parameters."); message("Checking output parameters.");
long long N_total[swift_type_count] = {Ngas, Ngpart, 0, 0, Nspart, 0}; long long N_total[swift_type_count] = {Ngas, Ngpart, 0, 0, Nspart, 0};
io_check_output_fields(&param_file, &e, N_total); io_check_output_fields(&param_file, N_total);
/* write output file */ /* write output file */
message("Writing output."); message("Writing output.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment