Hi mark,
Thanks for the feedback.
Ok for C++ coding style.
My problem does not come from libtest, it compiles without problem.
To compile blaspp with generic blas implementation I have defined a "generic" make.inc.linux.generic as follow:
# Generic linux framework with GNU gcc/g++
#
# Create a symbolic link:
# ln -s make.inc.linux.generic make.inc
#
# Assumes $CBLASDIR is set to where cblas.h exists, e.g., in ~/.profile
# export CBLASDIR=/usr/include/x86_64-linux-gnu/
#
# Then
# make
CXX ?= g++
LDFLAGS = -fPIC -fopenmp
CXXFLAGS = -fPIC -fopenmp -MMD -std=c++11 -pedantic \
-Wall -Wmissing-declarations \
-Wno-unused-local-typedefs
CXXFLAGS += -I${CBLASDIR} \
-DBLAS_COMPLEX_RETURN_ARGUMENT
# caveat: one must link against lapack due to test/lapack_tmp.hh used in all blaspp tests.
LIBS = -llapack -lcblas -lblas
Trying to compile it, I got the following outputs:
g++ -fPIC -fopenmp -MMD -std=c++11 -pedantic -Wall -Wmissing-declarations -Wno-unused-local-typedefs -I -DBLAS_COMPLEX_RETURN_ARGUMENT -I../libtest -Iinclude -c -o test/test_symv.o test/test_symv.cc
In file included from test/test.hh:5:0,
from test/test_symv.cc:3:
include/blas_util.hh: In function ‘void blas::internal::throw_if(bool, const char*, const char*, const char*, ...)’:
include/blas_util.hh:357:9: error: ‘va_start’ was not declared in this scope
va_start( va, format );
^~~~~~~~
include/blas_util.hh:357:9: note: suggested alternative: ‘__sqrt’
va_start( va, format );
^~~~~~~~
__sqrt
In file included from test/test_symv.cc:4:0:
test/cblas.hh: In function ‘float cblas_asum(int, const std::complex<float>*, int)’:
test/cblas.hh:212:37: error: cannot convert ‘const std::complex<float>*’ to ‘const float*’ for argument ‘2’ to ‘float cblas_scasum(blasint, const float*, blasint)’
return cblas_scasum( n, x, incx );
^
test/cblas.hh: In function ‘double cblas_asum(int, const std::complex<double>*, int)’:
test/cblas.hh:219:37: error: cannot convert ‘const std::complex<double>*’ to ‘const double*’ for argument ‘2’ to ‘double cblas_dzasum(blasint, const double*, blasint)’
return cblas_dzasum( n, x, incx );
^
test/cblas.hh: In function ‘void cblas_axpy(int, std::complex<float>, const std::complex<float>*, int, std::complex<float>*, int)’:
test/cblas.hh:248:46: error: cannot convert ‘std::complex<float>*’ to ‘const float*’ for argument ‘2’ to ‘void cblas_caxpy(blasint, const float*, const float*, blasint, float*, blasint)’
cblas_caxpy( n, &alpha, x, incx, y, incy );
^
test/cblas.hh: In function ‘void cblas_axpy(int, std::complex<double>, const std::complex<double>*, int, std::complex<double>*, int)’:
test/cblas.hh:257:46: error: cannot convert ‘std::complex<double>*’ to ‘const double*’ for argument ‘2’ to ‘void cblas_zaxpy(blasint, const double*, const double*, blasint, double*, blasint)’
cblas_zaxpy( n, &alpha, x, incx, y, incy );
... long list of compile-time errors.
Notes:
- the first error is easily fixed by including <cstdarg> header (my initial post)
- the origin of the other errors is explained in my initial post. However after investigations here is an important update:
Conclusion:
I will update to the very last release of OpenBlas and check again if I can compile blaspp without modification.
After that I will send you my observation here.
Learned lesson: IHMO blaspp is not compatible, without fixes, with OpenBlas for release < 5 Nov 2017.
-------------------
Another observation: in my version,
trsm test failed. Unfortunately I can not compare with the one using MKL, hence I am not sure if the error is mine or if it is already present in your repo.
./test trsm
input: ./test trsm
BLAS++ BLAS++ BLAS++ Ref. Ref.
type layout side uplo trans diag m n alpha align error time (s) Gflop/s time (s) Gflop/s status
d col left lower notrans nonunit 100 100 3.1416 1 1.6935e+04 0.0024 0.4159 0.0004 2.4895 FAILED
d col left lower notrans nonunit 200 200 3.1416 1 9.1367e+19 0.0059 1.3656 0.0018 4.4703 FAILED
d col left lower notrans nonunit 300 300 3.1416 1 2.4850e+47 0.0038 7.0353 0.0054 4.9701 FAILED
d col left lower notrans nonunit 400 400 3.1416 1 1.6215e+56 0.0045 14.1378 0.0120 5.3194 FAILED
d col left lower notrans nonunit 500 500 3.1416 1 1.5502e+79 0.0077 16.1667 0.0258 4.8465 FAILED
Best,
Vincent