dftlibs / xcfun

XCFun: A library of exchange-correlation functionals with arbitrary-order derivatives
https://dftlibs.org/xcfun/
Mozilla Public License 2.0
57 stars 32 forks source link

tests failing #10

Closed miroi closed 8 years ago

miroi commented 8 years ago

Hi,

I tried 2 tests, got compilation error:

test/nr.cpp:

Scanning dependencies of target nr
[ 95%] Building CXX object test/CMakeFiles/nr.dir/nr.cpp.o
/u/milias/Work/qch/software/xcfun/test/nr.cpp: In instantiation of 'T newton(taylor<T, 1, 1> (*)(const taylor<T, 1, 1>&), const T&, const T&, const T&) [with T = taylor<double, 1, 17>]':
/u/milias/Work/qch/software/xcfun/test/nr.cpp:59:47:   required from here
/u/milias/Work/qch/software/xcfun/test/nr.cpp:39:7: error: ambiguous overload for 'operator-' in 'f((*(const taylor<taylor<double, 1, 17>, 1, 1>*)(& x))) - rhs'
/u/milias/Work/qch/software/xcfun/test/nr.cpp:39:7: note: candidates are:
In file included from /u/milias/Work/qch/software/xcfun/test/nr.cpp:5:0:
/u/milias/Work/qch/software/xcfun/src/taylor/taylor.h:341:30: note: taylor<T, Nvar, Ndeg> operator-(const S&, const taylor<T, Nvar, Ndeg>&) [with T = double; int Nvar = 1; int Ndeg = 17; S = taylor<taylor<double, 1, 17>, 1, 1>]
/u/milias/Work/qch/software/xcfun/src/taylor/taylor.h:349:30: note: taylor<T, Nvar, Ndeg> operator-(const taylor<T, Nvar, Ndeg>&, const S&) [with T = taylor<double, 1, 17>; int Nvar = 1; int Ndeg = 1; S = taylor<double, 1, 17>]
make[2]: *** [test/CMakeFiles/nr.dir/nr.cpp.o] Error 1
make[1]: *** [test/CMakeFiles/nr.dir/all] Error 2
make: *** [all] Error 2
milias@lxir074.gsi.de:~/Work/qch/software/xcfun/build/.g++ --version
g++ (Debian 4.7.2-5) 4.7.2

test/cxx-wo-libstdcxx.cpp: missing struct_array.h

Scanning dependencies of target cxx-wo-libstdcxx
[ 92%] Building CXX object test/CMakeFiles/cxx-wo-libstdcxx.dir/cxx-wo-libstdcxx.cpp.o
/u/milias/Work/qch/software/xcfun/test/cxx-wo-libstdcxx.cpp:8:26: fatal error: struct_array.h: No such file or directory
compilation terminated.
make[2]: *** [test/CMakeFiles/cxx-wo-libstdcxx.dir/cxx-wo-libstdcxx.cpp.o] Error 1
make[1]: *** [test/CMakeFiles/cxx-wo-libstdcxx.dir/all] Error 2
make: *** [all] Error 2
bast commented 8 years ago

How did you configure the code and on which branch are you? Bottom line: how can I reproduce this failure?

bast commented 8 years ago

Please also use a more descriptive issue title.

miroi commented 8 years ago

Hi Rado,

more details: I forked xcfun master, added these tests into https://github.com/miroi/xcfun/blob/master/test/CMakeLists.txt

and configured it

milias@lxir072.gsi.de:~/Work/qch/software/xcfun/build/.cmake ..
-- The CXX compiler identification is GNU 4.7.2
-- The C compiler identification is GNU 4.7.2
-- The Fortran compiler identification is GNU 4.7.2
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.1.2") 
-- Configuring done
-- Generating done
-- Build files have been written to: /u/milias/Work/qch/software/xcfun/build
.
.
[ 73%] Building CXX object src/CMakeFiles/xcfun.dir/functionals/m06hfc.cpp.o
[ 75%] Linking CXX static library libxcfun.a
[ 75%] Built target xcfun
[ 76%] Built target interfaces
Scanning dependencies of target example_fortran
[ 78%] Building Fortran object fortran/CMakeFiles/example_fortran.dir/__/src/xcfun_autogen.f90.o
[ 79%] Building Fortran object fortran/CMakeFiles/example_fortran.dir/xcfun_module.f90.o
[ 81%] Building Fortran object fortran/CMakeFiles/example_fortran.dir/example.f90.o
[ 82%] Linking Fortran executable example_fortran
[ 84%] Built target example_fortran
Scanning dependencies of target funeval
[ 85%] Building C object test/CMakeFiles/funeval.dir/funeval.c.o
[ 87%] Linking CXX executable funeval
[ 87%] Built target funeval
[ 89%] Building CXX object test/CMakeFiles/br.dir/br.cpp.o
/u/milias/Work/qch/software/xcfun/test/br.cpp: In function 'double BR(double)':
/u/milias/Work/qch/software/xcfun/test/br.cpp:61:14: warning: unused variable 'yn' [-Wunused-variable]
[ 90%] Linking CXX executable br
[ 90%] Built target br
[ 92%] Building CXX object test/CMakeFiles/cxx-wo-libstdcxx.dir/cxx-wo-libstdcxx.cpp.o
/u/milias/Work/qch/software/xcfun/test/cxx-wo-libstdcxx.cpp:8:26: fatal error: struct_array.h: No such file or directory
compilation terminated.
make[2]: *** [test/CMakeFiles/cxx-wo-libstdcxx.dir/cxx-wo-libstdcxx.cpp.o] Error 1
make[1]: *** [test/CMakeFiles/cxx-wo-libstdcxx.dir/all] Error 2
make: *** [all] Error 2
milias@lxir072.gsi.de:~/Work/qch/software/xcfun/build/.

Linux lxir072 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u5 x86_64 GNU/Linux

bast commented 8 years ago

So it is a modification of yours which does not compile, correct?

miroi commented 8 years ago

Yes, https://github.com/miroi/xcfun/blob/tests/test/CMakeLists.txt , I added these new tests into testing on master.

bast commented 8 years ago

But then I do not understand this issue - what is wrong with the central master version then?

miroi commented 8 years ago

These test source files, not included in testing of xcfun, are not compilable. I was looking especially for tests to learn more about xcfun.

bast commented 8 years ago

Miro, the branch you have been working on is very old. To make this more clear, I have renamed master to stable-1.x and have renamed ng to master. Please base your work on the new master which is years of development ahead of stable-1.x. With this I am closing this issue but please re-open if the problem is relevant for the current main line.