GithubHelp home page GithubHelp logo

to_string test fails about cppad HOT 6 CLOSED

coin-or avatar coin-or commented on July 23, 2024
to_string test fails

from cppad.

Comments (6)

bradbell avatar bradbell commented on July 23, 2024

Using the following system:
cppad.git>lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
cppad.git>g++ --version
g++ (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0

I also got an error in the to_string test.
Starting in the top soruce directory and using the commands:
rm -rf build
mkdir build
cd build
cmake -D cppad_debug_which=debug_none ..
make check_example_utility

When I changed from debug_none to debug_all, I did not get the errror.

from cppad.

bradbell avatar bradbell commented on July 23, 2024

If I insert the following print
std::cout << "max = " << max << ", check = " << check << "\n";
before line 54 in the file example/utility/to_string.cpp; just before
ok &= max == check;
The test passes. Do you get the same result ?

from cppad.

bradbell avatar bradbell commented on July 23, 2024

I have submitted a Ubuntu g++ but report for this issue; see
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1832132

from cppad.

bradbell avatar bradbell commented on July 23, 2024

I think this is a gcc problem because it reproduces on Fedora 33 with
g++ (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)

In addition, the only compiler flag that is necessary to demonstrate the bug is '-O3' (on my Fedora 33 system). Any other level of optimization passes the test.

from cppad.

bradbell avatar bradbell commented on July 23, 2024

It turns out it was an error in my test; see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98151

I have made the corresponding fix to the test; see
9c2e69f

from cppad.

bradbell avatar bradbell commented on July 23, 2024

@mkatliar Please close this issue if the current version works for you.

from cppad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.