Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add declarations for ssyrk_ and dsyrk_ when cblas is not available #403

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

d-torrance
Copy link
Contributor

Otherwise, we get the following in config.log even when BLAS is available:

configure:18317: g++ -o conftest  -std=gnu++14 -g3 -O2  -w  -I. -I.. -I. -I./fflas-ffpack -I/M2/M2/BUILD/usr-host/include  -I/M2/M2/BUILD/../include -I/M2/M2\
/BUILD/include -I/M2/M2/BUILD/usr-host/include -isystem /usr/include/libxml2    -DNDEBUG -I/usr/include/eigen3  -I/usr/include/python3.6m -I/usr/include -DBO\
OST_STACKTRACE_LINK -L/M2/M2/BUILD/usr-host/lib -g3 -L/usr/lib64 conftest.cpp  -lrefblas -llapack >&5
In file included from conftest.cpp:68:
fflas-ffpack/config-blas.h: In function 'void cblas_ssyrk(CBLAS_ORDER, CBLAS_UPLO, CBLAS_TRANSPOSE, int, int, float, const float*, int, float, float*, int)':
fflas-ffpack/config-blas.h:296:12: error: 'ssyrk_' was not declared in this scope
            ssyrk_ (EXT_BLAS_UPLO_tr(Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc); // @TODO check this
            ^~~~~~
fflas-ffpack/config-blas.h:296:12: note: suggested alternative: 'sscal_'
            ssyrk_ (EXT_BLAS_UPLO_tr(Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc); // @TODO check this
            ^~~~~~
            sscal_
fflas-ffpack/config-blas.h:298:12: error: 'ssyrk_' was not declared in this scope
            ssyrk_ (EXT_BLAS_UPLO (Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc);
            ^~~~~~
fflas-ffpack/config-blas.h:298:12: note: suggested alternative: 'sscal_'
            ssyrk_ (EXT_BLAS_UPLO (Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc);
            ^~~~~~
            sscal_
fflas-ffpack/config-blas.h: In function 'void cblas_dsyrk(CBLAS_ORDER, CBLAS_UPLO, CBLAS_TRANSPOSE, int, int, double, const double*, int, double, double*, in\
t)':
fflas-ffpack/config-blas.h:305:13: error: 'dsyrk_' was not declared in this scope
             dsyrk_ (EXT_BLAS_UPLO_tr(Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc); // @TODO check this
             ^~~~~~
fflas-ffpack/config-blas.h:305:13: note: suggested alternative: 'dscal_'
             dsyrk_ (EXT_BLAS_UPLO_tr(Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc); // @TODO check this
             ^~~~~~
             dscal_
fflas-ffpack/config-blas.h:307:13: error: 'dsyrk_' was not declared in this scope
             dsyrk_ (EXT_BLAS_UPLO (Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc);
             ^~~~~~
fflas-ffpack/config-blas.h:307:13: note: suggested alternative: 'dscal_'
             dsyrk_ (EXT_BLAS_UPLO (Uplo), EXT_BLAS_TRANSPOSE(Trans), N, K, alpha, A, lda, beta, C, ldc);
             ^~~~~~
             dscal_
configure:18317: $? = 1
configure: program exited with status 1

@d-torrance
Copy link
Contributor Author

I added an additional commit -- cblas_dsyrk was missing static inline like the other wrappers, which was leading to "multiple definition" errors when linking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant