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

Stackoverflow for xlintstz_ztest_in under 3.9.1 on windows #548

Closed
h-vetinari opened this issue May 8, 2021 · 8 comments · Fixed by #553
Closed

Stackoverflow for xlintstz_ztest_in under 3.9.1 on windows #548

h-vetinari opened this issue May 8, 2021 · 8 comments · Fixed by #553

Comments

@h-vetinari
Copy link
Contributor

While trying to build lapack 3.9.1 for conda-forge (see here), there's a new error for ctest --output-on-failure -E "x*cblat*" after building:

 81/108 Test  #81: LAPACK-xlintstz_ztest_in .........***Failed    0.06 sec
Running: D:/bld/blas-split_1620498704464/work/build/bin/xlintstz.exe
ARGS= OUTPUT_FILE;D:/bld/blas-split_1620498704464/work/build/TESTING/ztest.out;ERROR_FILE;D:/bld/blas-split_1620498704464/work/build/TESTING/ztest.out.err;INPUT_FILE;D:/bld/blas-split_1620498704464/work/TESTING/ztest.in
Test OUTPUT:

Test ERROR:

CMake Error at D:/bld/blas-split_1620498704464/work/TESTING/runtest.cmake:36 (message):
  Test D:/bld/blas-split_1620498704464/work/build/bin/xlintstz.exe returned
  Stack overflow

The build is done with minGW, roughly as follows (more details here):

set "CC=gcc.exe"
set "CXX=g++.exe"
set "FC=gfortran.exe"

cmake -G "MinGW Makefiles" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DBUILD_SHARED_LIBS=yes ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DBUILD_TESTING=ON ^
    -DLAPACKE=ON ^
    -DCBLAS=ON ^
    -DBUILD_DEPRECATED=ON ^
    -Wno-dev ..

mingw32-make -j%CPU_COUNT%
mingw32-make install
if %ERRORLEVEL% NEQ 0 exit 1
@martin-frbg
Copy link
Collaborator

martin-frbg commented May 8, 2021

Interesting as 3.9.1 is expected to have considerably reduced the stack requirements for xlintstz compared to earlier versions.(And it definitely has on unixoid platforms)

@martin-frbg
Copy link
Collaborator

sorry, the changes I was thinking of (#492) affected xeigtstz rather than xlintstz

@weslleyspereira
Copy link
Collaborator

Yes... I would say a fix similar to #492 shall solve this issue. Both relate to stack overflow.

@h-vetinari
Copy link
Contributor Author

I've looked at #492 but it looks a bit above my paygrade... Do you mean that (something along the lines of) df02000 needs to be done for the LIN tests?

@weslleyspereira
Copy link
Collaborator

At first, I would suggest you increase the stack size ulimit -s unlimited and see if the problem is still there. Can you please try it? If this works, we can try the same solution applied in #492.

@martin-frbg
Copy link
Collaborator

martin-frbg commented May 14, 2021

On Windows with mingw, I believe the stack size would need to be adjusted at compile/link time (-Wl,--stack,2097152 or greater). One can probably get at the default value in the exe with something like dumpbin /headers.

@h-vetinari
Copy link
Contributor Author

Thanks a lot for the tip @martin-frbg, indeed, conda-forge/lapack-feedstock@3835a4d solves the failure on windows.

@martin-frbg
Copy link
Collaborator

Glad to know that it works - but I guess we may still want to copy the solution from #492 (I have converted zchkaa.f already but have not determined the minimum uiimit with the new code yet)

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

Successfully merging a pull request may close this issue.

3 participants