Skip to content
Snippets Groups Projects
Commit e83aa571 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

more civilized way of dealing with fixed time-steps.

Former-commit-id: 9b7880b04520458efd8729c5dfadf2a15caaaea9
parent 4fe80ee1
No related branches found
No related tags found
No related merge requests found
......@@ -25,10 +25,15 @@ AM_CFLAGS = -g -Wall -Werror -I../src $(OPENMP_CFLAGS) -DCPU_TPS=2.67e9
AM_LDFLAGS =
# Set-up the library
bin_PROGRAMS = test
bin_PROGRAMS = test test_fixed
# Sources for test
test_SOURCES = test.c
test_CFLAGS = -DCOUNTER -DTIMER $(AM_CFLAGS)
test_LDADD = ../src/.libs/libswiftsim.a $(HDF5_LDFLAGS)
# Sources for test_fixed
test_fixed_SOURCES = test.c
test_fixed_CFLAGS = -DCOUNTER -DTIMER $(AM_CFLAGS) -DENGINE_FLAGS=engine_policy_fixdt
test_fixed_LDADD = ../src/.libs/libswiftsim.a $(HDF5_LDFLAGS)
......@@ -46,6 +46,11 @@
#define CPU_TPS 2.67e9
#endif
/* Engine policy flags. */
#ifndef ENGINE_POLICY
#define ENGINE_POLICY engine_policy_none
#endif
/* Error macro. */
#define error(s) { printf( "%s:%s:%i: %s\n" , __FILE__ , __FUNCTION__ , __LINE__ , s ); abort(); }
......@@ -852,7 +857,7 @@ int main ( int argc , char *argv[] ) {
/* Initialize the runner with this space. */
tic = getticks();
engine_init( &e , &s , dt_max , nr_threads , nr_queues , engine_policy_steal | engine_policy_keep );
engine_init( &e , &s , dt_max , nr_threads , nr_queues , ENGINE_POLICY | engine_policy_steal );
printf( "main: engine_init took %.3f ms.\n" , ((double)(getticks() - tic)) / CPU_TPS * 1000 ); fflush(stdout);
/* Write the state of the system as it is before starting time integration. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment