wavefunction91 / IntegratorXX

Reusable DFT Grids for the Masses
BSD 3-Clause "New" or "Revised" License
13 stars 9 forks source link

Need to include <vector> for primitive quadratures #82

Closed susilehtola closed 11 months ago

susilehtola commented 11 months ago

The primitive quadratures use std::vector which means one needs to include it.

wavefunction91 commented 11 months ago

What compiler is this failing for?

susilehtola commented 11 months ago

This is failing with G++

#include <cstdio>
#include <integratorxx/quadratures/s2/ahrens_beylkin.hpp>
#include <integratorxx/quadratures/s2/delley.hpp>
#include <integratorxx/quadratures/primitive/gausschebyshev1.hpp>
#include <integratorxx/quadratures/primitive/gausschebyshev2.hpp>
#include <integratorxx/quadratures/primitive/gausschebyshev2modified.hpp>
#include <integratorxx/quadratures/primitive/gausschebyshev3.hpp>
#include <integratorxx/quadratures/primitive/gausslegendre.hpp>
#include <integratorxx/quadratures/primitive/gausslobatto.hpp>
#include <integratorxx/quadratures/s2/lebedev_laikov.hpp>
#include <integratorxx/quadratures/radial/mhl.hpp>
#include <integratorxx/quadratures/radial/muraknowles.hpp>
#include <integratorxx/quadratures/radial/treutlerahlrichs.hpp>
#include <integratorxx/quadratures/s2/womersley.hpp>

int main(void) {
  printf("Hello world!\n");
  return 0;
}

You actually need to #include <vector> in all the quadrature headers.

wavefunction91 commented 11 months ago

Yes... I'm aware of the issue and the solution. What I don't understand is why this hasn't shown up in CI. G++12 and Clang 14 pass https://github.com/wavefunction91/IntegratorXX/actions/runs/6251597548

Sometimes compilers require direct inclusion (particularly newer compilers), whereas older compilers can sometimes get away with indirect inclusoin. I need to know exactly your compiler versions so I can see where things are slipping through in CI.

This will get merged either way.

susilehtola commented 11 months ago
$ gcc --version
gcc (GCC) 13.2.1 20230728 (Red Hat 13.2.1-1)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.