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

Segmentation fault - make #3271

Closed
alicezanella opened this issue Jun 15, 2021 · 9 comments
Closed

Segmentation fault - make #3271

alicezanella opened this issue Jun 15, 2021 · 9 comments

Comments

@alicezanella
Copy link

Hi, I'm encountering this error while installing OpenBLAS on a server.
I have gcc-9.3.0 and I'm installing OpenBlas with the command make -PREFIX=/path/to/OpenBLAS

The last lines of the error are:
` SSPR2 PASSED THE TESTS OF ERROR-EXITS

******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HALF ACCURATE *******
EXPECTED RESULT COMPUTED RESULT
1 -0.237168 -0.331480
2 -0.451824 -0.491060
3 0.653113E-01 -0.162305E-01
4 -0.753422E-01 -0.127707
5 -0.526524 -0.560541
6 -0.355192 -0.447647
7 -0.373141 -0.413615
8 -0.435047 -0.497468
9 -0.378995 -0.415332
10 0.381000 0.375386
11 -0.276510 -0.370202
12 -0.215018 -0.377088
13 0.275770 0.244847
14 -0.470472 -0.478406
15 0.486229 0.505925
16 -0.112075E-02 -0.991446E-01
17 0.389812 0.353051
18 0.184293 0.181773
19 -0.365242 -0.347867
20 -0.328101 -0.403456
21 -0.395292 -0.368007
22 0.750818E-01 0.432704E-01
23 0.156788 0.468433E-01
24 -0.180572 -0.258246
25 0.170541 0.114308
26 0.156244 0.557455E-01
27 -0.429421E-01 -0.728971E-01
28 -0.540277 -0.628006
29 0.318071 0.259518
30 -0.250377 -0.407847
31 0.136863 0.136863
32 0.357405E-01 0.454790E-02
THESE ARE THE RESULTS FOR COLUMN 32
******* SSPR2 FAILED ON CALL NUMBER:
483: SSPR2 ('U', 63, 1.0, X, 1, Y, 1, AP) .

END OF TESTS
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./dblat2 < ./dblat2.dat

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
gfortran -O2 -Wall -m64 -o cblat3 cblat3.o ../libopenblas_nehalemp-r0.2.20.a -lm -lpthread -lgfortran -lm -lpthread -lgfortran
#0 0x7f66280390df in ???
#1 0x426bbd in ???
#2 0x426ed5 in ???
#3 0x410400 in ???
#4 0x40b124 in ???
#5 0x40fcf0 in ???
#6 0x401e4e in ???
#7 0x7f6628025b44 in ???
#8 0x401ec9 in ???
#9 0xffffffffffffffff in ???
Segmentation fault
Makefile:29: recipe for target 'level2' failed
make[1]: *** [level2] Error 139
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/zanella/softwares/OpenBLAS-master/test'
Makefile:116: recipe for target 'tests' failed
make: *** [tests] Error 2
`

Thank you for your help,

Alice

@martin-frbg
Copy link
Collaborator

martin-frbg commented Jun 15, 2021

This error could be caused by mixing gcc and gfortran from different versions (does gfortran -v also report version 9.3.0 ?), but also the version of OpenBLAS you are trying to build is almost four years old and had many known bugs. Could you please try with the current version (0.3.15) or check out the develop branch from github ?

@alicezanella
Copy link
Author

alicezanella commented Jun 15, 2021

This error could be caused by mixing gcc and gfortran from different versions (does gfortran -v also report version 9.3.0 ?), but also the version of OpenBLAS you are trying to build is almost four years old and had many known bugs. Could you please try with the current version (0.3.15) or check out the develop branch from github ?

Thank you for your suggestion. I was indeed building the master version, I’ll try the develop branch and let you know.

Should I directly specify FC=gfortran in the make command?

@martin-frbg
Copy link
Collaborator

The build scripts will try to figure out which fortran compiler to use, but they will only use the search paths that are configured on the system. So if gfortran -v returns 9.3.0 in a shell (and cc -v does that too) it should be alright.

@alicezanella
Copy link
Author

alicezanella commented Jun 15, 2021

I just checked and cc -v returns the wrong version (4.9.0). I'll specifically export the newest version of -cc. Do you know how to do it?

@martin-frbg
Copy link
Collaborator

Possibly gcc is softlinked to the newer compiler, but cc still points to the original system compiler. make CC=gcc (or make CC=/path/to/the/new/gcc to be extra sure) should get around this.

@alicezanella
Copy link
Author

Thank you. If I type which gcc it shows the correct 9.3.0 version.

@alicezanella
Copy link
Author

@martin-frbg Thank you so much for your help.
I successfully installed the newest version of OpenBLAS (0.3.15). The problem has been solved using the make CC=gcc.

@martin-frbg
Copy link
Collaborator

martin-frbg commented Jun 15, 2021

I suspect if you type ls -l /usr/bin/gcc it will show you something like this: /usr/bin/gcc -> gcc-9 or /usr/bin/gcc -> /opt/gcc9/bin/gcc but there is no matching link for gfortran.

@alicezanella
Copy link
Author

Actually it shows: lrwxrwxrwx 1 root root 7 Feb 25 2015 /usr/bin/gcc -> gcc-4.9

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