Skip to content

Test error with -DBUILD_SHARED_LIBS=1 #5213

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

Open
pcbcos opened this issue Apr 9, 2025 · 4 comments
Open

Test error with -DBUILD_SHARED_LIBS=1 #5213

pcbcos opened this issue Apr 9, 2025 · 4 comments

Comments

@pcbcos
Copy link

pcbcos commented Apr 9, 2025

My OS is windows10, and I am trying to build OpenBLAS with cmake and gcc.
gcc version 14.2.0 (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r3)
cmake version 3.31.5

My build option is
cmake -Bbuild . -GNinja -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DBINARY=64 -DINTERFACE64=0 -DCMAKE_INSTALL_PREFIX="C:\Program Files (x86)\openblas_test"

but something goes wrong when running ctest, such as

3/120 Test #3: sblas1 ...................................................................................... Passed 0.04 sec
Start 4: sblas2
** On entry to SGEMV parameter number 1 had an illegal value
** On entry to SGEMV parameter number 2 had an illegal value
** On entry to SGEMV parameter number 3 had an illegal value
** On entry to SGEMV parameter number 6 had an illegal value
** On entry to SGEMV parameter number 8 had an illegal value
** On entry to SGEMV parameter number 11 had an illegal value
** On entry to SGBMV parameter number 1 had an illegal value
** On entry to SGBMV parameter number 2 had an illegal value
** On entry to SGBMV parameter number 3 had an illegal value
** On entry to SGBMV parameter number 4 had an illegal value
** On entry to SGBMV parameter number 5 had an illegal value
** On entry to SGBMV parameter number 8 had an illegal value
** On entry to SGBMV parameter number 10 had an illegal value
** On entry to SGBMV parameter number 13 had an illegal value
** On entry to SSYMV parameter number 1 had an illegal value
** On entry to SSYMV parameter number 2 had an illegal value
** On entry to SSYMV parameter number 5 had an illegal value
** On entry to SSYMV parameter number 7 had an illegal value
** On entry to SSYMV parameter number 10 had an illegal value
** On entry to SSBMV parameter number 1 had an illegal value
** On entry to SSBMV parameter number 2 had an illegal value
** On entry to SSBMV parameter number 3 had an illegal value
** On entry to SSBMV parameter number 6 had an illegal value
** On entry to SSBMV parameter number 8 had an illegal value
** On entry to SSBMV parameter number 11 had an illegal value
** On entry to SSPMV parameter number 1 had an illegal value
** On entry to SSPMV parameter number 2 had an illegal value
** On entry to SSPMV parameter number 6 had an illegal value
** On entry to SSPMV parameter number 9 had an illegal value
** On entry to STRMV parameter number 1 had an illegal value
** On entry to STRMV parameter number 2 had an illegal value
** On entry to STRMV parameter number 3 had an illegal value
** On entry to STRMV parameter number 4 had an illegal value
** On entry to STRMV parameter number 6 had an illegal value
** On entry to STRMV parameter number 8 had an illegal value
** On entry to STBMV parameter number 1 had an illegal value
** On entry to STBMV parameter number 2 had an illegal value
** On entry to STBMV parameter number 3 had an illegal value
** On entry to STBMV parameter number 4 had an illegal value
** On entry to STBMV parameter number 5 had an illegal value
** On entry to STBMV parameter number 7 had an illegal value
** On entry to STBMV parameter number 9 had an illegal value
** On entry to STPMV parameter number 1 had an illegal value
** On entry to STPMV parameter number 2 had an illegal value
** On entry to STPMV parameter number 3 had an illegal value
** On entry to STPMV parameter number 4 had an illegal value
** On entry to STPMV parameter number 7 had an illegal value
** On entry to STRSV parameter number 1 had an illegal value
** On entry to STRSV parameter number 2 had an illegal value
** On entry to STRSV parameter number 3 had an illegal value
** On entry to STRSV parameter number 4 had an illegal value
** On entry to STRSV parameter number 6 had an illegal value
** On entry to STRSV parameter number 8 had an illegal value
** On entry to STBSV parameter number 1 had an illegal value
** On entry to STBSV parameter number 2 had an illegal value
** On entry to STBSV parameter number 3 had an illegal value
** On entry to STBSV parameter number 4 had an illegal value
** On entry to STBSV parameter number 5 had an illegal value
** On entry to STBSV parameter number 7 had an illegal value
** On entry to STBSV parameter number 9 had an illegal value
** On entry to STPSV parameter number 1 had an illegal value
** On entry to STPSV parameter number 2 had an illegal value
** On entry to STPSV parameter number 3 had an illegal value
** On entry to STPSV parameter number 4 had an illegal value
** On entry to STPSV parameter number 7 had an illegal value
** On entry to SGER parameter number 1 had an illegal value
** On entry to SGER parameter number 2 had an illegal value
** On entry to SGER parameter number 5 had an illegal value
** On entry to SGER parameter number 7 had an illegal value
** On entry to SGER parameter number 9 had an illegal value
** On entry to SSYR parameter number 1 had an illegal value
** On entry to SSYR parameter number 2 had an illegal value
** On entry to SSYR parameter number 5 had an illegal value
** On entry to SSYR parameter number 7 had an illegal value
** On entry to SSPR parameter number 1 had an illegal value
** On entry to SSPR parameter number 2 had an illegal value
** On entry to SSPR parameter number 5 had an illegal value
** On entry to SSYR2 parameter number 1 had an illegal value
** On entry to SSYR2 parameter number 2 had an illegal value
** On entry to SSYR2 parameter number 5 had an illegal value
** On entry to SSYR2 parameter number 7 had an illegal value
** On entry to SSYR2 parameter number 9 had an illegal value
** On entry to SSPR2 parameter number 1 had an illegal value
** On entry to SSPR2 parameter number 2 had an illegal value
** On entry to SSPR2 parameter number 5 had an illegal value
** On entry to SSPR2 parameter number 7 had an illegal value
4/120 Test #4: sblas2 ...................................................................................... Passed 2.46 sec

But by setting -DBUILD_SHARED_LIBS=1, everything goes right . But I want to build a dynamic library.

LastTest.log

@martin-frbg
Copy link
Collaborator

This looks a bit weird, are you sure it is picking up the correct version of libopenblas.dll ?

@pcbcos
Copy link
Author

pcbcos commented Apr 9, 2025

Yes,I just copied it from {CMAKE_INSTALL_PREFIX}/bin .And

C:\Users\WengZ\Downloads\OpenBLAS-0.3.29\build>ldd test\cblat2.exe
ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ff826ab0000)
KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ff824cd0000)
KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ff824520000)
ucrtbase.dll => /c/Windows/System32/ucrtbase.dll (0x7ff824940000)
libopenblas.dll => /c/Users/WengZ/Downloads/OpenBLAS-0.3.29/build/test/libopenblas.dll (0x7fffa25d0000)
libgfortran-5.dll => /c/winlibs/mingw64/bin/libgfortran-5.dll (0x7ffebcdb0000)
ADVAPI32.dll => /c/Windows/System32/ADVAPI32.dll (0x7ff825040000)
msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ff824fa0000)
sechost.dll => /c/Windows/System32/sechost.dll (0x7ff824e50000)
RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ff825380000)
libgcc_s_seh-1.dll => /c/winlibs/mingw64/bin/libgcc_s_seh-1.dll (0x7fffa93f0000)
bcrypt.dll => /c/Windows/System32/bcrypt.dll (0x7ff8244f0000)
libquadmath-0.dll => /c/winlibs/mingw64/bin/libquadmath-0.dll (0x7fffabc50000)
libwinpthread-1.dll => /c/winlibs/mingw64/bin/libwinpthread-1.dll (0x7fffadc80000)

@martin-frbg
Copy link
Collaborator

Right, that should work. Then the test code is probably finding the "wrong" version of the error reporting function "xerbla" - the normal one from the library, instead of its own local implementation that only checks if the correct error code is returned when calling each function with bad arguments.
Not sure why this happens in your case, but you could try changing the "T" on the line T LOGICAL FLAG TO TEST ERROR EXITS (right above the one with the threshold value) in test/sblat2.dat to "F" to disable that part of the test.

@pcbcos
Copy link
Author

pcbcos commented Apr 9, 2025

Yes, after disabling all error tests, there are no more error reports. Thank you very much!

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

No branches or pull requests

2 participants