Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove HAVE_TMS code #2815

Merged
merged 4 commits into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 2 additions & 28 deletions src/parallel/bbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,9 @@
#include "bbsrcli.h"
#endif

#if defined(HAVE_TMS) && !NRNMPI
#include <time.h>
#include <sys/times.h>
#include <limits.h>
static struct tms tmsbuf, tms_start_;
static clock_t starttime;
#endif

extern int nrn_global_argc;
extern char** nrn_global_argv;
extern double nrn_timeus();

bool BBSImpl::is_master_ = false;
bool BBSImpl::started_ = false;
Expand Down Expand Up @@ -132,11 +125,7 @@ double BBSImpl::time() {
#if NRNMPI
return nrnmpi_wtime();
#else
#ifdef HAVE_TMS
return double(times(&tmsbuf)) / 100.;
#else
return 0.;
#endif
return nrn_timeus();
#endif
}

Expand Down Expand Up @@ -493,26 +482,11 @@ void BBSImpl::done() {
return;
}
done_ = true;
#ifdef HAVE_TMS
clock_t elapsed = times(&tmsbuf) - starttime;
printf("%d tasks in %g seconds. %g seconds waiting for tasks\n",
etaskcnt,
total_exec_time,
worker_take_time);
printf("user=%g sys=%g elapsed=%g %g%%\n",
(double) (tmsbuf.tms_utime - tms_start_.tms_utime) / 100,
(double) (tmsbuf.tms_stime - tms_start_.tms_stime) / 100,
(double) (elapsed) / 100,
100. * (double) (tmsbuf.tms_utime - tms_start_.tms_utime) / (double) elapsed);
#endif
}

void BBSImpl::start() {
if (started_) {
return;
}
started_ = 1;
#ifdef HAVE_TMS
starttime = times(&tms_start_);
#endif
}
Loading