From 36fa56c1c2be974ec38246b8ad72a2811d6c4ced Mon Sep 17 00:00:00 2001 From: David A Minton Date: Fri, 24 Mar 2023 08:41:30 -0400 Subject: [PATCH] Added profiling preprocessor flags and a bit of test code --- src/CMakeLists.txt | 5 +++-- src/swiftest/swiftest_kick.f90 | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b63b7148a..0ad615170 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -132,5 +132,6 @@ ENDIF() IF(BT STREQUAL "DEBUG") ADD_DEFINITIONS(-DDEBUG) -ENDIF() - +ELSEIF(BT STREQUAL "PROFILE") + ADD_DEFINITIONS(-DPROFILE) +ENDIF() \ No newline at end of file diff --git a/src/swiftest/swiftest_kick.f90 b/src/swiftest/swiftest_kick.f90 index 54da2f82a..430679b43 100644 --- a/src/swiftest/swiftest_kick.f90 +++ b/src/swiftest/swiftest_kick.f90 @@ -22,7 +22,9 @@ module subroutine swiftest_kick_getacch_int_pl(self, param) class(swiftest_parameters), intent(inout) :: param !! Current swiftest run configuration parameters ! Internals logical, save :: lfirst = .true. - +#ifdef PROFILE + type(walltimer), save :: timer +#endif if (param%lflatten_interactions) then if (param%lclose) then