lab-cosmo / librascal

A scalable and versatile library to generate representations for atomic-scale learning
https://lab-cosmo.github.io/librascal/
GNU Lesser General Public License v2.1
80 stars 20 forks source link

Tests take too long, cut them down below 10 s in debug #121

Open tjunge opened 4 years ago

agoscinski commented 4 years ago

there has been some dramatic improvements of test time in the feat/interpolator branch by reducing the length parameter in the kernel tests, it is now around twice as fast.

  struct StrictNLCollectionFixture : MultipleStructureManagerNLStrictFixture {
    using Parent = MultipleStructureManagerNLStrictFixture;
    using ManagerTypeHolder_t = typename Parent::ManagerTypeHolder_t;

    StrictNLCollectionFixture() : Parent{} {};

    ~StrictNLCollectionFixture() = default;

    std::string filename{"reference_data/dft-smiles_500.ubjson"};
    int start{4};
    int length{3};
  };
Luthaf commented 4 years ago

Even if @agoscinski work improves the results here, test runtime in debug is still more than 3 min, so this should stay open.

mastricker commented 4 years ago

Sorry, was not intentional. I read it again while commenting and missed the part of the debug and though I only closed my comment, but apparently I closed the issue. Sorry again...

Luthaf commented 4 years ago

no problem! =)

mastricker commented 4 years ago

Just adding things I see as time consumers here for reference once the works starts:

In general: multiple seems to be an issue. Is it possible to cut down on the number of tests with reference data for the spherical expansion?

Luthaf commented 4 years ago

Enabling -Og (optimizations that should not interfere with debugging) --- as done in #165 --- brings the test time from 147s to 9s locally.

Else, the biggest offenders are test_calculator (98s at -O0/5s at -Og) and test_kernel (15s at -O0/1s at -Og).

agoscinski commented 4 years ago

move -Og flag to a new CMAKE_BUILD_TYPE. Suggested name DebugOg