hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-6391) util/Timer.cc completely misunderstands _POSIX_CPUTIME
Date Tue, 27 Oct 2015 23:58:28 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-6391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14977418#comment-14977418
] 

Hudson commented on MAPREDUCE-6391:
-----------------------------------

FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #605 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/605/])
MAPREDUCE-6391. util/Timer.cc completely misunderstands _POSIX_CPUTIME (aw: rev bcc4c746a88cc698b2937b85ec845b9d8cc736d2)
* hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Timer.cc
* hadoop-mapreduce-project/CHANGES.txt
fix changes.txt for MAPREDUCE-6391. (aw: rev 0e344902aaca417813c7191395cd5c73dfcd4220)
* hadoop-mapreduce-project/CHANGES.txt


> util/Timer.cc completely misunderstands _POSIX_CPUTIME
> ------------------------------------------------------
>
>                 Key: MAPREDUCE-6391
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6391
>             Project: Hadoop Map/Reduce
>          Issue Type: Sub-task
>          Components: build
>    Affects Versions: 3.0.0
>            Reporter: Alan Burlison
>            Assignee: Alan Burlison
>             Fix For: 3.0.0
>
>         Attachments: MAPREDUCE-6391.001.patch
>
>
> util/Timer.cc contains the following code:
> clock_gettime(_POSIX_CPUTIME, &ts);
> I'm not exactly sure what sort of time value this code is attempting to obtain (the process's
on-CPU time perhaps?) but it is completely wrong, even on Linux. _POSIX_CPUTIME is a feature
test macro and is *not* a valid parameter to clock_gettime. From the clock_gettime manpage:
> bq. The symbols _POSIX_MONOTONIC_CLOCK, _POSIX_CPUTIME, _POSIX_THREAD_CPUTIME indicate
that CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID are available
> On  my Linux distro the value of _POSIX_CPUTIME is defined as 0. That corresponds to
> bq.  #define __CLOCK_REALTIME0       0       /* obsolete; same as CLOCK_REALTIME */
> And CLOCK_REALTIME is
> bq. #define CLOCK_REALTIME          3       /* wall clock */
> Which I suspect is not what is required here.
> Getting cross-platform CPU time is fiddly, the following blog post has a good summary:
http://nadeausoftware.com/articles/2012/03/c_c_tip_how_measure_cpu_time_benchmarking (code
examples are CC licensed so should be no taint issues)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message