Repository navigation
Closed
Description
Hi, I built lapack with xlf on a ppc64le (POWER8) machine. I used the options in INSTALL\make.inc.XLF, although for my BLASLIB, I switched to ../../librefblas.a.
During make, I encountered the following error:
** zunt01 === End of Compilation 1 ===
"zunt01.f", 1500-036 (I) The NOSTRICT option (default at OPT(3)) has the potential to alter the semantics of a program. Please refer to documentation on the STRICT/NOSTRICT option for more information.
1501-510 Compilation successful for file zunt01.f.
xlf -O3 -qfixed -qnosave -c zunt03.f -o zunt03.o
** zunt03 === End of Compilation 1 ===
"zunt03.f", 1500-036 (I) The NOSTRICT option (default at OPT(3)) has the potential to alter the semantics of a program. Please refer to documentation on the STRICT/NOSTRICT option for more information.
1501-510 Compilation successful for file zunt03.f.
\
xlf -qnosave -o xeigtstz \
zchkee.o zbdt01.o zbdt02.o zbdt03.o zbdt05.o zchkbb.o zchkbd.o zchkbk.o zchkbl.o zchkec.o zchkgg.o zchkgk.o zchkgl.o zchkhb.o zchkhs.o zchkst.o zckcsd.o zckglm.o zckgqr.o zckgsv.o zcklse.o zcsdts.o zdrges.o zdrgev.o zdrges3.o zdrgev3.o zdrgsx.o zdrgvx.o zdrvbd.o zdrves.o zdrvev.o zdrvsg.o zdrvst.o zdrvsx.o zdrvvx.o zerrbd.o zerrec.o zerred.o zerrgg.o zerrhs.o zerrst.o zget02.o zget10.o zget22.o zget23.o zget24.o zget35.o zget36.o zget37.o zget38.o zget51.o zget52.o zget54.o zglmts.o zgqrts.o zgrqts.o zgsvts3.o zhbt21.o zhet21.o zhet22.o zhpt21.o zhst01.o zlarfy.o zlarhs.o zlatm4.o zlctes.o zlctsx.o zlsets.o zsbmv.o zsgt01.o zslect.o zstt21.o zstt22.o zunt01.o zunt03.o dlafts.o dlahd2.o dlasum.o dlatb9.o dstech.o dstect.o dsvdch.o dsvdct.o dsxt1.o alahdg.o alasum.o alasvm.o alareq.o ilaenv.o xerbla.o xlaenv.o chkxer.o ../../libtmglib.a \
../../liblapack.a ../../librefblas.a && mv xeigtstz ../xeigtstz
make[2]: Leaving directory `/home/u0017592/projects/lapack/TESTING/EIG'
NEP: Testing Nonsymmetric Eigenvalue Problem routines
./xeigtstz < nep.in > znep.out 2>&1
/bin/sh: line 1: 29872 Segmentation fault ./xeigtstz < nep.in > znep.out 2>&1
make[1]: *** [znep.out] Error 139
make[1]: Leaving directory `/home/u0017592/projects/lapack/TESTING'
make: *** [lapack_testing] Error 2
Any idea what the problem might be? Is reference lapack tested on ppc64le architecture?
Activity
jlost commentedon Nov 11, 2016
FWIW, the problem also occurred with gfortran:
[-]xlf / ppc64le - Segfault during test: `./xeigtstz < nep.in > znep.out 2>&1`[/-][+]ppc64le - Segfault during test: `./xeigtstz < nep.in > znep.out 2>&1`[/+]jlost commentedon Nov 11, 2016
Also occurs with -O0 (no opt).
Here are the complete make logs:
make.noopt.txt
edelsohn commentedon Nov 17, 2016
$200 bounty open to fix this!
https://www.bountysource.com/issues/39160760-ppc64le-segfault-during-test-xeigtstz-nep-in-znep-out-2-1
victorliu commentedon Nov 17, 2016
On a typical Amazon AWS I can compile lapack with -O0 and -frecursive, and have the compilation and tests run all the way through without a problem. However, when I go back into the TESTING directory and try to run valgrind or gdb on xeigtstz, it segfaults within zchkee.f at line 1134, upon trying to initialize a gigantic local array.
Recompiling without -frecursive, I no longer get the segfault.
My theory: -frecursive forces local arrays to be allocated on the stack (avoiding static variables is required for thread safety; I was the one recommending this flag originally). The static arrays within the test routines blow out the stack size (just the A array in zchkee is almost 1 MB). You may need to try increasing the stack size to make the tests run correctly if you compile with -frecursive.
Edit: I should also add that valgrind finds thousands of illegal memory accesses in the main test drivers as well. I don't know enough about fortran WRITE and READ statements to know if these are spurious errors or not.
jlost commentedon Nov 18, 2016
gfortran succeeds compilation without -frecursive and fails with it. I'm most concerned with xlf, though - I also tried disabling -qnosave with xlf but no luck. Setting stack size to unlimited like so:
ulimit -s unlimitedwith -qnosave disabledResulted in:
Edited to make clear I was running with -qnosave disabled.
victorliu commentedon Nov 20, 2016
I just re-compiled using gfortran with "-frecursive -fcheck=all -O0 -ggdb". Running "make" causes the tests to fail on each test of the Aasen symmetric indefinite routines. This happens for all four precisions. Running each test manually within gdb results in:
xlintsts < stest.in:
xlintstc < ctest.in:
./xlintstd < dtest.in
xlintstz < ztest.in:
Digging into the stacktrace, it appears the bottom level function (the files mentioned above), the matrix C is accessed at index (2,1) whereas N=LDC=1 in the routine. This is not necessarily an error since the called BLAS function performs an early exit (N=0).
Full stack trace for single precision test:
More oddities involving the Aasen tests show up when running valgrind on "xlintsts < stest.in". Is it possible for you to run the test routine under your debugger (whatever it would be corresponding to xlf)?
iyamazaki commentedon Nov 20, 2016
Thank you,
I've fixed some of these errors last week but will make sure to fix them in
the next pull request (hopefully tomorrow).
Best,
Ichi
On Sun, Nov 20, 2016 at 3:23 PM, Victor Liu [email protected]
wrote:
jlost commentedon Nov 21, 2016
I ran my failing test (
./xeigtstz < nep.in) through gdb and saw that it was failing at the very beginning of zchkee.f (line 1035). I did a bit of googling and saw that that was commonly related to array allocations as @victorliu said, so I revisited settingulimit -s unlimited. This time it worked, because I had not compiled with-qnosavedisabled. I ran make again and it completed. However, there are still some failed tests. (I'm still using-O0.)Here is the relevant part of the test results:
tl;dr: with
-qnosaveandulimit -s unlimited: Compiles successfully, but with test errors. Without-qnosaveandulimit -s unlimited,./xlintsts < stest.infails. Always fails if noulimit -s unlimited.victorliu commentedon Nov 21, 2016
Please run gdb with a breakpoint on zlascl.f:209 (or whichever line it is that sets the error return) and provide a backtrace. e.g.:
jlost commentedon Nov 21, 2016
Here are the results of that. I also dumped the frame info.
working on issue #85
langou commentedon Nov 21, 2016
I have a hard time to reproduce this problem. So this is hard to me to make much progress. I can read the information you are posting.
So here is what is happening. (As far as I can see. Thanks James for the gdb, and Victor for suggestions.)
We are in LAPACK/TESTING, so we have a
fakeXERBLA. (Special for TESTING.) This XERBLA is here so that we can make (on purpose)wrongcalls to LAPACK subroutines. (Because we want to check that the error messages are correct.) In the error check, we set what the error message should be and thisfakeXERBLA checks that the expected error message is indeed the produced error message. This is how we doerror checks. All this to say that there is afakeXERBLA.Anyhow we have a true numerical error to figure out. It seems that, during the numerical test, ZGETSL calls ZLASCL with 4th parameter CFROM = NAN. (And this is NOT OK. And there is a check in ZLASCL for this purpose and this is why the program crashes.)
The fact that you see
XERBLA was called with SRNAME = ZLASCL instead of DGETSLis OK. This is because we are working with the fakeXERBLA. So XERBLA was set to expect DGETSLS at some point earlier when we were doingerror checks. We never resetted this DGETSLS (because XERBLA is not supposed to be called, because we are doingnumerical checks, as opposed toerror checks.). So XERBLA is still expecting to be called (if it is called) with DGETSLS. (Note: we print only 6 characters, so you see DGETSL but this stands for DGETSLS, and there was a mistake so we should really read ZGETSLS here. Oh my.) So XERBLA says that it is not happy, but we do not really care here. What we care is why XERBLA is called in the first place. XERBLA is called in the first place because during the numerical test, ZGETSL calls ZLASCL with 4th parameter CFROM = NAN. Why? Well I do not know yet.langou commentedon Nov 22, 2016
Another related commit at 14f49eb
langou commentedon Nov 24, 2016
@jlost : can you please do a
git pulland try again and report?I do not have access to
xlf. All is well on my mac withgfortran.Cheers, Julien.
jlost commentedon Nov 24, 2016
Sure, I'll retest in a couple of days when I'm back from vacation.
jlost commentedon Nov 28, 2016
Same results as above (2700 COMPLEX16 errors) when I compile with xlf and a freshly compiled reference BLAS.
With gfortran, I get 1 error:
langou commentedon Jan 24, 2017
Hi all. So I finally got my hands on an IBM machine. (IBM Power8E.) (Thanks @edelsohn , IBM and OSU.) So far, I am trying LAPACK with gfortran (gcc 6.2.1, and standard make.inc) and reference BLAS. You do have to use:
ulimit -s unlimitedotherwise./xeigtstzsegfaults as reported in the issue. So with gfortran on IBM Power 8E, I have no numerical errors. All tests are successful. I will try (am trying) to install XLF and report some more. Cheers, Julien.shawnl commentedon May 13, 2019
I can't figure out how to build the test executables..... I run cmake but then it doesn't generate a Makefile with any targets...
weslleyspereira commentedon Feb 17, 2021
Hello! There are some other open issues related to the same problem, e.g., #276 and #335. I am closing this issue and move the discussion to #335. Thanks to everybody who partially helped solving this issue!