grimme-lab / xtb

Semiempirical Extended Tight-Binding Program Package
https://xtb-docs.readthedocs.io/
GNU Lesser General Public License v3.0
595 stars 148 forks source link

test suite of a source build fails for 6.7.0 #981

Open sheepforce opened 9 months ago

sheepforce commented 9 months ago

Describe the bug xTB 6.7.0 fails 4 test cases (10 - xtb/gfn1, 11 - xtb-gfn2, 13 - xtb/hessian and 17 - xtb/oniom) with large numerical deviations.

Building with:

To Reproduce Steps to reproduce the behaviour:

  1. happens with input (include input files) ctest test suite fails. Full build log is here: xtb-build.txt
  2. start xtb with (all the options here)
  3. run xtb with your options and the --verbose flag
  4. output showing the error (see 1)

You can exactly reproduce this build by running nix build github:nix-qchem/nixos-qchem/xtb#xtb -L

Expected behaviour The test suite should pass.

Additional context I'm maintaining the xTB + tblite ecosystem for the Nix package manager and require reproducible builds from source for all packages.

Albkat commented 9 months ago

Hello, Which version of CMake, which generator, and which Fortran compiler have you used?

sheepforce commented 9 months ago

Hi,

cmake-3.28.2 gfortran-13.2.0

CMake generates standard Makefiles without additional arguments, so plain Make :)

EDIT: I've just tested with Ninja as CMake generator, it doesn't change the result, unfortunately.

Albkat commented 9 months ago

I see, I tested this with meson/ninja/ifort combination. I will look into it:)

Albkat commented 9 months ago

All right, I can reproduce this, but it will probably take some time to debug

sheepforce commented 8 months ago

I've switched over to a meson+ninja build for all packages and can confirm that the test suite passes for this build type but otherwise the same dependencies.

toxtran commented 3 weeks ago

This issue should be fixed via #1121.

@sheepforce, could you please recheck?

sheepforce commented 3 weeks ago

This issue should be fixed via #1121.

@sheepforce, could you please recheck?

Uhm partially yes! :smile: We've switched over the build system of all the Fortran packages that xTB requires to Meson in Nixpkgs and it would be quite some work to rewind everything (mctc-lib, tblite, test-drive, toml-f, simple-dftd3, dftd4, multicharge, cpcm-x) to a CMake build. What I can provide is a check at the state of all packages, when I've opened the issue (beginning of March) and everything was still using CMake in Nixpkgs; i.e. GFortran 11.4.0 and GCC 11.4.0. I'm building xTB commit 10c8a31cd6c9e1ff7a8ecf4db6d9666f39b24215. Unfortunately does not build at all with type errors:

xtb> /build/source/src/dipro/xtb.F90:53:49:
xtb> 
xtb>    53 |       call new_gfn2_calculator(xcalc, mol, error)
xtb>       |                                                 1
xtb> Error: More actual than formal arguments in procedure call at (1)
xtb> /build/source/src/dipro/xtb.F90:55:49:
xtb> 
xtb>    55 |       call new_gfn1_calculator(xcalc, mol, error)
xtb>       |                                                 1
xtb> Error: More actual than formal arguments in procedure call at (1)
xtb> /build/source/src/dipro/xtb.F90:57:50:
xtb> 
xtb>    57 |       call new_ipea1_calculator(xcalc, mol, error)
xtb>       |                                                  1
xtb> Error: More actual than formal arguments in procedure call at (1)
xtb> make[2]: *** [CMakeFiles/xtb-object.dir/build.make:257: CMakeFiles/xtb-object.dir/src/dipro/xtb.F90.o] Error 1
xtb> make[2]: *** Waiting for unfinished jobs....
xtb> make[1]: *** [CMakeFiles/Makefile2:631: CMakeFiles/xtb-object.dir/all] Error 2
xtb> make: *** [Makefile:146: all] Error 2
awvwgk commented 3 weeks ago

This issue is due to an API change in tblite, it looks like xtb is not pinning the version of tblite but using the latest git commit and therefore the incompatible change got pulled in already (meaning it is unrelated to meson / CMake as build system).

sheepforce commented 3 weeks ago

Very good point! I've updated the tblite version pinning to commit ba9c91e8708b332fad67bcb021c7054b544ef7fb. In that commit, the Tblite test suite fails one test, but if I ignore that failure, the xTB test suite now passes completely.