diff --git a/.gitignore b/.gitignore index 68e34d1965ff374fa957a17d9ad0240a857cf6c8..c31cac8ed4efffdc75fa91f4b608265379c6d48c 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,7 @@ tests/test_nonsym_force_1_vec.dat tests/test_nonsym_force_2_vec.dat tests/potential.dat tests/testGreetings +tests/testSelectOutput tests/testReading tests/testSingle tests/testTimeIntegration diff --git a/src/common_io.c b/src/common_io.c index bc8e547d6705a709dc75aa9d1f32a6285a647049..248fe016c4d050d97fa8c775549d5153e5a2c70e 100644 --- a/src/common_io.c +++ b/src/common_io.c @@ -890,8 +890,10 @@ void io_check_output_fields(const struct swift_params* params, /* Check that we have a 0 or 1 */ if (retParam != 0 && retParam != 1) - error("Unexpected input for %s. Received %i but expect 0 or 1. ", - field_name, retParam); + message( + "WARNING: Unexpected input for %s. Received %i but expect 0 or " + "1. ", + field_name, retParam); /* Found it, so move to the next one. */ break; diff --git a/tests/testSelectOutput.c b/tests/testSelectOutput.c index fecffd861e19b48e61c0b5b5e8ab5d8c070e376a..3bedddd03784bafddd4599c124929a6d88fbd9b0 100644 --- a/tests/testSelectOutput.c +++ b/tests/testSelectOutput.c @@ -42,8 +42,9 @@ void select_output_engine_init(struct engine *e, struct space *s, /* set parameters */ e->verbose = 1; e->time = 0; - e->snapshotOutputCount = 0; - e->snapshotCompression = 0; + e->snapshot_output_count = 0; + e->snapshot_compression = 0; + e->snapshot_label_delta = 1; }; void select_output_space_init(struct space *s, double *dim, int periodic, @@ -77,7 +78,11 @@ void select_output_engine_clean(struct engine *e) { 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"; size_t Ngas = 0, Ngpart = 0, Nspart = 0; @@ -139,7 +144,7 @@ int main() { /* check output selection */ message("Checking output parameters."); long long N_total[swift_type_count] = {Ngas, Ngpart, 0, 0, Nspart, 0}; - io_check_output_fields(¶m_file, &e, N_total); + io_check_output_fields(¶m_file, N_total); /* write output file */ message("Writing output.");