[Llvm-bgq-discuss] Node implementation of std::chrono::system_clock?

Hal Finkel hfinkel at anl.gov
Thu May 19 08:44:12 CDT 2016


Hi Antonin,

This is fixed in the latest nightly build (r270049-20160519), and I'll pull the change into the next stable patch release soon.

 -Hal

----- Original Message -----
> From: "Antonin Portelli" <antonin.portelli at ed.ac.uk>
> To: llvm-bgq-discuss at lists.alcf.anl.gov
> Sent: Wednesday, May 18, 2016 10:54:07 AM
> Subject: [Llvm-bgq-discuss] Node implementation of std::chrono::system_clock?
> 
> Dear bgclang maintainers,
> 
> First let me thank you for making clang so easily available for BG/Q.
> I am struggling to run a code doing some timings using the C++11
> function std::chrono::system_clock::now(). If I run the code on a
> BG/Q node it throws a std::system_error exception with an empty
> message. I just wanted to if by any chance you were aware of this
> issue?
> 
> I wrote the following minimal example to isolate the problem:
> 
> #include <chrono>
> #include <iostream>
> #include <numeric>
> #include <vector>
> 
> using namespace std;
> 
> int main(void)
> {
>     auto start = chrono::system_clock::now();
>     std::vector<int> v(100000, 42);
>     auto sink = std::accumulate(v.begin(), v.end(), 0u);
>     auto end = chrono::system_clock::now();
>     std::chrono::duration<double> diff = end-start;
>     cout << diff.count() << endl;
>     
>     return 0;
> }
> 
> It runs well when compiled for the frontend but crashes throwing
> std::system_error when compiled & run on a node, the backtrace is
> the following:
> 
> 0 :Node (25)
> 1 :    <traceback not fetched> (1)
> 1 :    0000000000000000 (24)
> 2 :        .__libc_start_main (24)
> 3 :            .generic_start_main (24)
> 4 :                .main (24)
> 5 :                    .std::__1::chrono::system_clock::now() (24)
> 6 :                        .std::__1::__throw_system_error(int, char
> const*) (24)
> 7 :                            .__cxa_throw (24)
> 8 :                                .std::terminate() (24)
> 9 :                                    .__cxxabiv1::__terminate(void
> (*)()) (24)
> 10:
>                                        .__gnu_cxx::__verbose_terminate_handler()
> (24)
> 11:                                            .abort (24)
> 
> Best regards,
> 
> Antonin Portelli
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
> 
> _______________________________________________
> llvm-bgq-discuss mailing list
> llvm-bgq-discuss at lists.alcf.anl.gov
> https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-bgq-discuss mailing list