Fix build with GMX_CYCLE_SUBCOUNTERS
authorRoland Schulz <roland@rschulz.eu>
Fri, 18 Oct 2013 17:40:37 +0000 (13:40 -0400)
committerRoland Schulz <roland@utk.edu>
Wed, 30 Oct 2013 04:44:57 +0000 (00:44 -0400)
Was broken by 4d2f9bcee0734a

Changed that the function signature isn't depending on the
compile options.

Change-Id: I7c3e9d6bdcadc80b02dd0f523358c8122f0f9fcc

src/gromacs/legacyheaders/gmx_wallcycle.h
src/gromacs/mdlib/gmx_wallcycle.c
src/gromacs/mdlib/sim_util.c

index 82cc44204647288dde311a3bceebc30c9abc856b..66f8e4401aaa6ee93abdaac376d1b168efd264ac 100644 (file)
@@ -98,23 +98,12 @@ gmx_large_int_t wcycle_get_reset_counters(gmx_wallcycle_t wc);
 void wcycle_set_reset_counters(gmx_wallcycle_t wc, gmx_large_int_t reset_counters);
 /* Set reset_counters */
 
-/* Uncomment the next line to get extra cycle counters of sub parts */
-/* #define GMX_CYCLE_SUBCOUNTERS */
-
-#ifdef GMX_CYCLE_SUBCOUNTERS
-
 void wallcycle_sub_start(gmx_wallcycle_t wc, int ewcs);
 /* Set the start sub cycle count for ewcs */
 
 void wallcycle_sub_stop(gmx_wallcycle_t wc, int ewcs);
 /* Stop the sub cycle count for ewcs */
 
-#else
-/* Define the counter call to nothing to avoid any effect on performance */
-#define wallcycle_sub_start(wc, ewcs)
-#define wallcycle_sub_stop(wc, ewcs)
-#endif
-
 #ifdef __cplusplus
 }
 #endif
index ace2478b063e72575dfa33a8fb79432755d905c0..06cd091fdd2448837e3b27f91a2de5652f669893 100644 (file)
@@ -859,4 +859,9 @@ void wallcycle_sub_stop(gmx_wallcycle_t wc, int ewcs)
     }
 }
 
+#else
+
+void wallcycle_sub_start(gmx_wallcycle_t gmx_unused wc, int gmx_unused ewcs) {}
+void wallcycle_sub_stop(gmx_wallcycle_t gmx_unused wc, int gmx_unused ewcs) {}
+
 #endif /* GMX_CYCLE_SUBCOUNTERS */
index 9ee926ca111a4542873958f70c9d4118420552cb..c9791f161868bd156e918c94a42bf8d5644bd26c 100644 (file)
@@ -502,7 +502,8 @@ static void do_nb_verlet(t_forcerec *fr,
                          gmx_enerdata_t *enerd,
                          int flags, int ilocality,
                          int clearF,
-                         t_nrnb *nrnb)
+                         t_nrnb *nrnb,
+                         gmx_wallcycle_t wcycle)
 {
     int                        nnbl, kernel_type, enr_nbnxn_kernel_ljc, enr_nbnxn_kernel_lj;
     char                      *env;
@@ -863,7 +864,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
         wallcycle_start(wcycle, ewcLAUNCH_GPU_NB);
         /* launch local nonbonded F on GPU */
         do_nb_verlet(fr, ic, enerd, flags, eintLocal, enbvClearFNo,
-                     nrnb);
+                     nrnb, wcycle);
         wallcycle_stop(wcycle, ewcLAUNCH_GPU_NB);
     }
 
@@ -944,7 +945,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
             wallcycle_start(wcycle, ewcLAUNCH_GPU_NB);
             /* launch non-local nonbonded F on GPU */
             do_nb_verlet(fr, ic, enerd, flags, eintNonlocal, enbvClearFNo,
-                         nrnb);
+                         nrnb, wcycle);
             cycles_force += wallcycle_stop(wcycle, ewcLAUNCH_GPU_NB);
         }
     }
@@ -1075,7 +1076,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
     {
         /* Maybe we should move this into do_force_lowlevel */
         do_nb_verlet(fr, ic, enerd, flags, eintLocal, enbvClearFYes,
-                     nrnb);
+                     nrnb, wcycle);
     }
 
     if (!bUseOrEmulGPU || bDiffKernels)
@@ -1086,7 +1087,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
         {
             do_nb_verlet(fr, ic, enerd, flags, eintNonlocal,
                          bDiffKernels ? enbvClearFYes : enbvClearFNo,
-                         nrnb);
+                         nrnb, wcycle);
         }
 
         if (!bUseOrEmulGPU)
@@ -1177,7 +1178,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
             {
                 wallcycle_start_nocount(wcycle, ewcFORCE);
                 do_nb_verlet(fr, ic, enerd, flags, eintNonlocal, enbvClearFYes,
-                             nrnb);
+                             nrnb, wcycle);
                 cycles_force += wallcycle_stop(wcycle, ewcFORCE);
             }
             wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
@@ -1250,7 +1251,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
             wallcycle_start_nocount(wcycle, ewcFORCE);
             do_nb_verlet(fr, ic, enerd, flags, eintLocal,
                          DOMAINDECOMP(cr) ? enbvClearFNo : enbvClearFYes,
-                         nrnb);
+                         nrnb, wcycle);
             wallcycle_stop(wcycle, ewcFORCE);
         }
         wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);