runtime schedule adding => hooks must be executed even without following
authorhackbard <hackbard>
Thu, 12 Jul 2007 16:07:01 +0000 (16:07 +0000)
committerhackbard <hackbard>
Thu, 12 Jul 2007 16:07:01 +0000 (16:07 +0000)
schedule

moldyn.c

index 2fdf4c2..433be68 100644 (file)
--- a/moldyn.c
+++ b/moldyn.c
@@ -1490,13 +1490,11 @@ return 0;
        }
 
                /* check for hooks */
-               if(sched->count+1<sched->total_sched) {
-                       if(sched->hook) {
-                               printf("\n ## schedule hook %d/%d start ##\n",
-                                      sched->count+1,sched->total_sched-1);
-                               sched->hook(moldyn,sched->hook_params);
-                               printf(" ## schedule hook end ##\n");
-                       }
+               if(sched->hook) {
+                       printf("\n ## schedule hook %d/%d start ##\n",
+                              sched->count+1,sched->total_sched-1);
+                       sched->hook(moldyn,sched->hook_params);
+                       printf(" ## schedule hook end ##\n");
                }
 
                /* increase the schedule counter */