Skip to content

Commit

Permalink
for now disabled display of "wall clock time" at end of program execu…
Browse files Browse the repository at this point in the history
…tion

Reason: Syscall clock() gives the CPU time spent by the process, not the wall clock time. For example, if your process is sleep()-ing for a longer time, this time is not included (as one would expect for a wall clock time display).
Therefore temporarily disabled the output until this is fixed.
  • Loading branch information
ZeugAusHH committed Jun 24, 2024
1 parent fc707a3 commit 8ad5713
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/Main/GenMain.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <iomanip>
#include <stdio.h>
#include <cstring>
#include <ctime>


#include <fenv.h>
#include <signal.h>

#include <mpi.h>


Expand Down Expand Up @@ -55,7 +54,7 @@
#include "SeriesParser.h"
#include "SimpleHandshake.h"

#include <sstream>


using namespace std;

Expand Down Expand Up @@ -540,14 +539,17 @@ int genmain (string inputfile, map<string,string> &comarg, bool split) {
}


if (rank==0) {
if (rank==0)
{
// remark, CL, 2024-06-24: calls to clock() give the total processor time spent by the process, *not* the wall clock time
double elapsed_Sec=double(clocknow-clockstart)/CLOCKS_PER_SEC;

time(&timer);
cout << endl<< "Program is terminating..." << endl;
time(&timer);
cout << endl<< "Program is terminating..." << endl;
cout << "Ending Time: " << ctime(&timer);
cout << "Total Wall Clock Time: " << elapsed_Sec << " seconds" << endl;
cout << "-------------------------------------" << endl;
// CL, 2024-06-24: disabled for the time being, since calls to clock() give the total processor time spent by the process, *not* the wall clock time
// cout << "Total Wall Clock Time: " << elapsed_Sec << " seconds" << endl;
cout << "-------------------------------------" << endl;


/* tracing report
Expand Down

0 comments on commit 8ad5713

Please sign in to comment.