Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #2893

Closed
Open
Created Jun 06, 2018 by James Willenbring@jmwilleMaintainer

Teuchos::Time::wallTime() might not return a wall time but a CPU time

Created by: finkandreas

Teuchos:e:Time::wallTime() could not return actually a wall time, but the cpu time. Looking into the implementation, I've seen this piece of code:

#ifdef HAVE_MPI
        int mpiInitialized;
        MPI_Initialized(&mpiInitialized);
        if( mpiInitialized ) {
                return(MPI_Wtime());
        }
        else {
                clock_t start;
                start = clock();
                return( (double)( start ) / CLOCKS_PER_SEC );
        }

I realized it, when I did not initialize MPI, so I'll end up with the clock() call. On Linux the value returned is the CPU time, NOT a wallclock time, i.e. in an OpenMP programm this will give wrong results.

Assignee
Assign to
Time tracking