qcscine / sparrow

https://scine.ethz.ch
BSD 3-Clause "New" or "Revised" License
78 stars 15 forks source link

Tests fail with clang 12 #13

Open awvwgk opened 2 years ago

awvwgk commented 2 years ago

Building with clang 12.0.1 on MacOS results in two test failures:

[ RUN      ] Sto6gBasisTest.Pm3BasisFileIsCorrect
$SRC_DIR/src/Sparrow/Tests/Nddo/Sto6gBasisTest.cpp:144: Failure
Value of: Sto6gBasisTest::filesAreIdentical(fileName, "PM3-STO-6G.basis")
  Actual: false
Expected: true
[  FAILED  ] Sto6gBasisTest.Pm3BasisFileIsCorrect (2 ms)
[ RUN      ] Sto6gBasisTest.Pm6BasisFileIsCorrect
$SRC_DIR/src/Sparrow/Tests/Nddo/Sto6gBasisTest.cpp:151: Failure
Value of: Sto6gBasisTest::filesAreIdentical(fileName, "PM6-STO-6G.basis")
  Actual: false
Expected: true
[  FAILED  ] Sto6gBasisTest.Pm6BasisFileIsCorrect (6 ms)

...

[----------] Global test environment tear-down
[==========] 317 tests from 36 test suites ran. (9118 ms total)
[  PASSED  ] 315 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] Sto6gBasisTest.Pm3BasisFileIsCorrect
[  FAILED  ] Sto6gBasisTest.Pm6BasisFileIsCorrect

 2 FAILED TESTS
  YOU HAVE 1 DISABLED TEST

I guess this is related to clang rather than MacOS, but haven't tried reproducing on Linux yet.

Probably related to https://github.com/qcscine/utilities/issues/2

CMake setup ``` + cmake -DCMAKE_AR=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_CXX_COMPILER_AR=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_C_COMPILER_AR=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ar -DCMAKE_RANLIB=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_C_COMPILER_RANLIB=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ranlib -DCMAKE_LINKER=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-ld -DCMAKE_STRIP=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-strip -DCMAKE_INSTALL_NAME_TOOL=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-install_name_tool -DCMAKE_LIBTOOL=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin/x86_64-apple-darwin13.4.0-libtool -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_SYSROOT=/Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -DCMAKE_INSTALL_PREFIX=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place -DCMAKE_INSTALL_LIBDIR=lib '-DCMAKE_PROGRAM_PATH=/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_build_env/bin;/Users/runner/miniforge3/conda-bld/scine-sparrow_1649515310241/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin' -B _build -G Ninja -DSCINE_MARCH= -- The C compiler identification is Clang 12.0.1 -- The CXX compiler identification is Clang 12.0.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Scine::UtilsOS found locally at $PREFIX/lib/cmake/ScineUtilsOS -- Cereal was not found in your PATH, so it was downloaded. -- 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") -- Found Boost: $PREFIX/lib/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: program_options filesystem -- Found GTest locally at: GTest::gtest -- Found PythonInterp: /Users/runner/miniforge3/bin/python (found version "3.9.10") -- Doxygen not found - Documentation for Sparrow will not be built. -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: CMAKE_INSTALL_LIBDIR CMAKE_LIBTOOL -- Build files have been written to: $SRC_DIR/_build ```
system information ``` active environment : base active env location : /Users/runner/miniforge3 shell level : 1 user config file : /Users/runner/.condarc populated config files : /Users/runner/miniforge3/.condarc conda version : 4.12.0 conda-build version : 3.21.8 python version : 3.9.10.final.0 virtual packages : __osx=10.15.7=0 __unix=0=0 __archspec=1=x86_64 base environment : /Users/runner/miniforge3 (writable) conda av data dir : /Users/runner/miniforge3/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch package cache : /Users/runner/miniforge3/pkgs /Users/runner/.conda/pkgs envs directories : /Users/runner/miniforge3/envs /Users/runner/.conda/envs platform : osx-64 user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.10 Darwin/19.6.0 OSX/10.15.7 UID:GID : 501:20 netrc file : None offline mode : False ```
weymutht commented 2 years ago

Thanks a lot for reporting this. We will try to reproduce this on our Linux machines, but if it turns out to be specific to OSX, there is unfortunately next to nothing we can do.