diff --git a/examples/Makefile.am b/examples/Makefile.am index 5a2f58bf6d83da14d53915fb4f562c58778dd8b3..59ae86ba982ec313cad5ae82acef427f7fc3e485 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -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) + diff --git a/examples/test.c b/examples/test.c index c9db5bfb67871e7b8388373afa91e6688c92429b..bf9b05da642e54c536823236b8316c74842761fd 100644 --- a/examples/test.c +++ b/examples/test.c @@ -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. */