Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
e83aa571
Commit
e83aa571
authored
Apr 06, 2013
by
Pedro Gonnet
Browse files
more civilized way of dealing with fixed time-steps.
Former-commit-id: 9b7880b04520458efd8729c5dfadf2a15caaaea9
parent
4fe80ee1
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/Makefile.am
View file @
e83aa571
...
...
@@ -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)
examples/test.c
View file @
e83aa571
...
...
@@ -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. */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment