I seem to have a problem compiling the latest 2.3.0 magma. I have a standard opensuse system, using compiled openblas. It looks like magma itself compiles ok,
but the testing part crashes at testing_ztrsm.cpp, complaining about "no matching function call to 'magma_generate_matrix...'
That function is in testing/magma_generate.cpp, for which I get an object file. There is also a libtesting.a that has magma_generate.o. Somehow the compile line for
testing_ztrsm.cpp is not getting the message, however. I don't know how to sort it out...
Problem compiling testing - magma_generate_matrix ?
-
Boxed Cylon
- Posts: 36
- Joined: Sat Nov 21, 2009 6:03 pm
-
Boxed Cylon
- Posts: 36
- Joined: Sat Nov 21, 2009 6:03 pm
Re: Problem compiling testing - magma_generate_matrix ?
By way of a perhaps constructive follow up, the specific error is as follows:
The issue seems to be that testing_ztrsm.cpp is trying to use a variable of type std::nullptr (the 4th spot), while no such definition for magma_generate_matrix is given in testing/testings.h, at the bottom of that include file. (There are hints the issue is a result of an incomplete implementation...)
Code: Select all
g++ -O3 -fPIC -DNDEBUG -DADD_ -Wall -fopenmp -std=c++11 -DHAVE_CUBLAS -DMIN_CUDA_ARCH=300 -I/usr/local/cuda/include -I./include -I./testing -c -o testing/testing_ztrsm.o testing/testing_ztrsm.cpp
testing/testing_ztrsm.cpp: In function ‘int main(int, char**)’:
testing/testing_ztrsm.cpp:112:67: error: no matching function for call to ‘magma_generate_matrix(magma_opts&, magma_int_t&, magma_int_t&, std::nullptr_t, magmaDoubleComplex*&, magma_int_t&)’
magma_generate_matrix( opts, Ak, Ak, nullptr, hA, lda );
^
testing/testing_ztrsm.cpp:112:67: note: candidates are:
In file included from testing/testing_ztrsm.cpp:22:0:
testing/testings.h:260:6: note: template<class FloatT> void magma_generate_matrix(magma_opts&, Vector<typename blas::traits<FloatT>::real_t>&, Matrix<FloatT>&)
void magma_generate_matrix(
^
testing/testings.h:260:6: note: template argument deduction/substitution failed:
testing/testing_ztrsm.cpp:112:67: note: mismatched types ‘Vector<typename blas::traits<FloatT>::real_t>’ and ‘magma_int_t {aka int}’
magma_generate_matrix( opts, Ak, Ak, nullptr, hA, lda );
^
In file included from testing/testing_ztrsm.cpp:22:0:
testing/testings.h:266:6: note: template<class FloatT> void magma_generate_matrix(magma_opts&, magma_int_t, magma_int_t, typename blas::traits<FloatT>::real_t*, FloatT*, magma_int_t)
void magma_generate_matrix(
^
testing/testings.h:266:6: note: template argument deduction/substitution failed:
testing/testing_ztrsm.cpp:112:67: note: mismatched types ‘typename blas::traits<FloatT>::real_t*’ and ‘std::nullptr_t’
magma_generate_matrix( opts, Ak, Ak, nullptr, hA, lda );
^
Makefile:583: recipe for target 'testing/testing_ztrsm.o' failed
make: *** [testing/testing_ztrsm.o] Error 1The issue seems to be that testing_ztrsm.cpp is trying to use a variable of type std::nullptr (the 4th spot), while no such definition for magma_generate_matrix is given in testing/testings.h, at the bottom of that include file. (There are hints the issue is a result of an incomplete implementation...)
Re: Problem compiling testing - magma_generate_matrix ?
Thanks for the specific error output. Otherwise, it is impossible to debug, as it works for us.
What g++ version do you have?
If you change nullptr to NULL in testing_ztrsm.cpp, does that fix the problem?
Since nullptr is the C++11 way of saying NULL, using nullptr should work.
-mark
What g++ version do you have?
If you change nullptr to NULL in testing_ztrsm.cpp, does that fix the problem?
Since nullptr is the C++11 way of saying NULL, using nullptr should work.
-mark
-
Boxed Cylon
- Posts: 36
- Joined: Sat Nov 21, 2009 6:03 pm
Re: Problem compiling testing - magma_generate_matrix ?
The g++ version on this OpenSuse system is 4.8.5, but there is g++-6 on this system which is 6.2.1. I changed my make.inc to give g++-6, rather than the default, and it
seems to be working fine now.
For the record, changing nullptr to NULL did not work - it failed as before.
The problem seems to be just an older default version of gcc on this OpenSuse system. Sorry for the false alarm!
Now I feel the need to recompile everything using the version 6 compilers.
seems to be working fine now.
For the record, changing nullptr to NULL did not work - it failed as before.
The problem seems to be just an older default version of gcc on this OpenSuse system. Sorry for the false alarm!
Now I feel the need to recompile everything using the version 6 compilers.