OpenBLAS
OpenBLAS copied to clipboard
OpenBLAS seg fault while building with gcc 10.2.0 & Fortran 2018
I'm using the latest version of OpenBLAS GCC/10.2.0 Fortran 2018
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x2B1A0777C6D7
#1 0x2B1A0777CD1E
#2 0x2B1A07FD93FF
#3 0x2B1A0783B500
#4 0x2B1A07848E67
#5 0x402EB1 in MAIN__ at sblat1.f:?
make[1]: *** [level1] Segmentation fault (core dumped)
make[1]: *** Waiting for unfinished jobs....
Preceeding this error, I get warnings that look like this:
Warning: Unused dummy argument ‘ys’ at (1) [-Wunused-dummy-argument]
zblat2.f:1775:59:
1775 | $ INCMAX, A, AA, AS, X, XX, XS, Y, YY, YS, YT, G,
| 1
Warning: Unused dummy argument ‘yy’ at (1) [-Wunused-dummy-argument]
cblat3.f:1281:36:
1281 | $ A, AA, AS, B, BB, BS, C, CC, CS, CT, G )
| 1
Warning: Unused dummy argument ‘b’ at (1) [-Wunused-dummy-argument]
cblat3.f:1281:40:
1281 | $ A, AA, AS, B, BB, BS, C, CC, CS, CT, G )
| 1
Warning: Unused dummy argument ‘bb’ at (1) [-Wunused-dummy-argument]
cblat3.f:1281:44:
1281 | $ A, AA, AS, B, BB, BS, C, CC, CS, CT, G )
| 1
Warning: Unused dummy argument ‘bs’ at (1) [-Wunused-dummy-argument]
I also get warnings like this after the sigfault error:
Warning: ‘rbets’ may be used uninitialized in this function [-Wmaybe-uninitialized]
cblat3.f:1482:0:
1482 | ISAME( 8 ) = BETS.EQ.BETA
|
Warning: ‘IMAGPART_EXPR <bets>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
cblat3.f:1482:0: Warning: ‘REALPART_EXPR <bets>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
cblat3.f:1480:0:
1480 | ISAME( 8 ) = RBETS.EQ.RBETA
|
I'm building on Linux 18.04
I know I can decrease my version, but I'd rather not. I'm building for Trilinos and want the best versions I can get.
"latest version" meaning latest release (0.3.20) or current git develop branch ? And which fortran compiler for Fortran 2018 - is it gfortran 10.2.0 or something else ? (Very bad things usually happen when you mix gcc and gfortran from different versions)
Latest vendor package is 8.4.0-1ubuntu1~18.04, please settle with those. i.e CC=gcc-8 FC=gfortran-8
In principle gcc 7.3.0 included there by default is fully compatible too.
Well, 10.2.0 should work in theory (if it is actually both gcc and gfortran from 10.2.0 that get called), as would any later version.
(BTW the warnings are harmless, and you get some even after the segfault as your make is building and running various test cases in parallel. Would need to build with DEBUG=1 to get a more meaningful backtrace from the crash, but as I already mentioned a mixup of C and Fortran runtimes with different ABI would seem the most likely cause. (If you are certain that they are from the same GCC release, what is your hardware and OpenBLAS build options ?)
Analyzing first post - sblat is not cblat, and unused variable does not cause any runtime problems, it is just small memory for variable allocated and never accessed showing up in debuggers.
Please reopen with the requested information if the problem persists.