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

Tests are failing with Clang 12 on OSX #2

Open
awvwgk opened this issue Mar 25, 2022 · 4 comments
Open

Tests are failing with Clang 12 on OSX #2

awvwgk opened this issue Mar 25, 2022 · 4 comments

Comments

@awvwgk
Copy link

awvwgk commented Mar 25, 2022

Building UtilsOS fails with Clang 12 on OSX:

-- The C compiler identification is Clang 12.0.1
-- The CXX compiler identification is Clang 12.0.1
...
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found OpenMP_C: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP: TRUE (found version "5.0") found components: C 
-- Found OpenMP_C: -fopenmp=libomp (found version "5.0") 
-- Found BLAS for use with Eigen3
-- Found GTest locally at: GTest::gtest
-- Found OpenMP_C: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP_CXX: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP: TRUE (found version "5.0")  
-- Doxygen not found - Documentation for UtilsOS will not be built.
-- Configuring done
-- Generating done

The PeriodicSystemTest.MultiplicationWorksMolecular test seems to fail due to different byte orders in an object, which might point to relying on undefined behaviour

[ RUN      ] PeriodicSystemTest.MultiplicationWorksMolecular
$SRC_DIR/src/Utils/Tests/Geometry/PeriodicSystemTest.cpp:544: Failure
Value of: ps
Expected: is equal to 408-byte object <00-00 00-00 00-00 14-40 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 14-40 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 ... 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 80-3F 16-87 12-40 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>
  Actual: 408-byte object <00-00 00-00 00-00 14-40 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 14-40 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 ... 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 80-3F 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00> (of type Scine::Utils::PeriodicSystem)
[  FAILED  ] PeriodicSystemTest.MultiplicationWorksMolecular (0 ms)

And the OptimizerTests.DimerTest_4 is failing with

[ RUN      ] OptimizerTests.DimerTest_4

    Number of individual rotations: 146

    Number of gradient calls: 224
$SRC_DIR/src/Utils/Tests/Optimizer/OptimizerTest.cpp:345: Failure
Value of: nCycles < 50
  Actual: false
Expected: true
$SRC_DIR/src/Utils/Tests/Optimizer/OptimizerTest.cpp:346: Failure
The difference between positions[0] and 0.0 is 0.53062654299789092, which exceeds 1.0e-8, where
positions[0] evaluates to -0.53062654299789092,
0.0 evaluates to 0, and
1.0e-8 evaluates to 1e-08.
$SRC_DIR/src/Utils/Tests/Optimizer/OptimizerTest.cpp:347: Failure
The difference between positions[1] and 0.0 is 1.7421974839560161, which exceeds 1.0e-8, where
positions[1] evaluates to -1.7421974839560161,
0.0 evaluates to 0, and
1.0e-8 evaluates to 1e-08.
[  FAILED  ] OptimizerTests.DimerTest_4 (0 ms)

Here is also the test summary

[==========] 665 tests from 98 test suites ran. (5461 ms total)
[  PASSED  ] 663 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] PeriodicSystemTest.MultiplicationWorksMolecular
[  FAILED  ] OptimizerTests.DimerTest_4

 2 FAILED TESTS
@weymutht
Copy link
Member

Thanks a lot for reporting this! We'll have a look at these failures, but unfortunately, there is next to no support we can give on OSX.

@awvwgk
Copy link
Author

awvwgk commented Mar 25, 2022

You might be able to reproduce this on Linux with clang 12 as well.

@weymutht
Copy link
Member

We were unsuccessful when trying to reproduce this with clang 12 on Linux (CentOS 7). It might be something specific to OSX, in which case there is little we can do.

@awvwgk
Copy link
Author

awvwgk commented Aug 13, 2022

With release 6.0.0 another test is failing on OSX:

[ RUN      ] SoluteSolventComplexTest.DoesAdditionOfMixedSolventsWork
$SRC_DIR/src/Utils/Tests/Solvation/SoluteSolventComplexTest.cpp:543: Failure
Value of: solventComplex[i][j].size()
Expected: is equal to 3
  Actual: 1 (of type int)
[  FAILED  ] SoluteSolventComplexTest.DoesAdditionOfMixedSolventsWork (1 ms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants