Lapack: Stackoverflow for `xlintstz_ztest_in` under 3.9.1 on windows

Created on 8 May 2021  ·  8Comments  ·  Source: Reference-LAPACK/lapack

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
Bug

Most helpful comment

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.

All 8 comments

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)

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

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

I've looked at #492 but it looks a bit above my paygrade... Do you mean that (something along the lines of) https://github.com/Reference-LAPACK/lapack/pull/492/commits/df02000eedbda3f38e305af1290313e5b2a2b541 needs to be done for the LIN tests?

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.

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.

Thanks a lot for the tip @martin-frbg, indeed, https://github.com/conda-forge/lapack-feedstock/pull/51/commits/3835a4de851f90555b5a6ce6bdd3e6d66b57e675 solves the failure on windows.

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)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

christoph-conrads picture christoph-conrads  ·  26Comments

Peter9606 picture Peter9606  ·  7Comments

5tefan picture 5tefan  ·  3Comments

Dichloromethane picture Dichloromethane  ·  11Comments

miroi picture miroi  ·  10Comments