Commit dfd3066d authored by Leonardo Solis's avatar Leonardo Solis
Browse files

#31, removed wrong/misleading code/comments about time measurent

parent 9256b1d3
...@@ -4,11 +4,6 @@ ...@@ -4,11 +4,6 @@
#include "getparameters.h" #include "getparameters.h"
#include "performdocking.h" #include "performdocking.h"
// ------------------------
// Correct time measurement
// Moved to performdocking.cpp to skip measuring build time
// ------------------------
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
...@@ -20,13 +15,15 @@ int main(int argc, char* argv[]) ...@@ -20,13 +15,15 @@ int main(int argc, char* argv[])
Liganddata myligand_init; Liganddata myligand_init;
Dockpars mypars; Dockpars mypars;
clock_t clock_start_program, clock_stop_program; clock_t clock_start_program;
/*
clock_t clock_stop_program;
*/
clock_start_program = clock(); clock_start_program = clock();
// ------------------------ // ------------------------
// Correct time measurement // Time measurement
// Moved to performdocking.cpp to skip measuring build time
double num_sec, num_usec, elapsed_sec; double num_sec, num_usec, elapsed_sec;
timeval time_start,time_end; timeval time_start,time_end;
gettimeofday(&time_start,NULL); gettimeofday(&time_start,NULL);
...@@ -89,20 +86,19 @@ int main(int argc, char* argv[]) ...@@ -89,20 +86,19 @@ int main(int argc, char* argv[])
if (docking_with_gpu(&mygrid, floatgrids.data(), &mypars, &myligand_init, &argc, argv, clock_start_program) != 0) if (docking_with_gpu(&mygrid, floatgrids.data(), &mypars, &myligand_init, &argc, argv, clock_start_program) != 0)
return 1; return 1;
/* /*
clock_stop_program = clock(); clock_stop_program = clock();
printf("Program run time: %.3f sec\n", ELAPSEDSECS(clock_stop_program, clock_start_program)); printf("Program run time: %.3f sec\n", ELAPSEDSECS(clock_stop_program, clock_start_program));
*/ */
// ------------------------ // ------------------------
// Correct time measurement // Time measurement
// Moved to performdocking.cpp to skip measuring build time
gettimeofday(&time_end,NULL); gettimeofday(&time_end,NULL);
num_sec = time_end.tv_sec - time_start.tv_sec; num_sec = time_end.tv_sec - time_start.tv_sec;
num_usec = time_end.tv_usec - time_start.tv_usec; num_usec = time_end.tv_usec - time_start.tv_usec;
elapsed_sec = num_sec + (num_usec/1000000); elapsed_sec = num_sec + (num_usec/1000000);
printf("Program run time %.3f sec (CORRECTED, used for EVALUATION)\n",elapsed_sec); printf("Full program-execution time %.3f secs\n",elapsed_sec);
//// ------------------------ // ------------------------
return 0; return 0;
} }
//// ------------------------
//// Correct time measurement
//// Moved from main.cpp to performdocking.cpp
//// to skip measuring build time
//// ------------------------
#include "performdocking.h" #include "performdocking.h"
//// -------------------------------- //// --------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment