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

Segfault in tests when building with INTERFACE64=1 on Mac #158

Closed
ViralBShah opened this issue Nov 13, 2012 · 10 comments
Closed

Segfault in tests when building with INTERFACE64=1 on Mac #158

ViralBShah opened this issue Nov 13, 2012 · 10 comments
Assignees
Labels
Milestone

Comments

@ViralBShah
Copy link
Contributor

I am trying to build the 64-bit interface on mac as follows:

make -C openblas-v0.2.3 CC="clang -mmacosx-version-min=10.6" FC="gfortran" FFLAGS=" -O2 -fPIC" USE_THREAD=1 TARGET=  INTERFACE64=1

This fails with:

OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat2 < ./sblat2.dat
 Real BLAS Test Program Results


 Test of subprogram number  1             SDOT 

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

Backtrace for this error:
#0  0x100012bbe
#1  0x1000132d4
#2  0x7fff8b313cf9
rm -f ?BLAT3.SUMM
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat3 < ./sblat3.dat

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

Backtrace for this error:
#0  0x100039bbe
#1  0x10003a2d4
#2  0x7fff8b313cf9

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

Backtrace for this error:
#0  0x100076bbe
#1  0x1000772d4
#2  0x7fff8b313cf9
/bin/sh: line 1:   693 Segmentation fault: 11  OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat2 < ./sblat2.dat
make[2]: *** [level2] Error 139
make[2]: *** Waiting for unfinished jobs....
/bin/sh: line 1:   697 Segmentation fault: 11  OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat3 < ./sblat3.dat
make[2]: *** [level3] Error 139
make[2]: *** [level1] Segmentation fault: 11
make[1]: *** [tests] Error 2
@xianyi
Copy link
Collaborator

xianyi commented Nov 13, 2012

Hi @ViralBShah ,

I will try to fix this issue in 0.2.5 version.

A quick question, I found that I cannot use GDB on Mac. Should I use lldb?

Xianyi

@ghost ghost assigned xianyi Nov 13, 2012
@ViralBShah
Copy link
Contributor Author

Why do you say you cannot use gdb? I use gdb on the mac quite regularly. It is not as nice as on linux, but it does work. I haven't tried lldb.

@staticfloat and @StefanKarpinski may know more.

@xianyi
Copy link
Collaborator

xianyi commented Nov 13, 2012

Hi @ViralBShah,

Your FFLAGS is wrong. You should add "-fdefault-integer-8" for gfortran. If you don't set FFLAGS in cmd, OpenBLAS will set the right flags. e.g.

  make CC="clang -mmacosx-version-min=10.6" FC="gfortran" INTERFACE64=1

Thank you

Xianyi

@ViralBShah
Copy link
Contributor Author

Shouldn't the openblas build do something like this?

FFLAGS += -fdefault-integer-8

For now, I can avoid passing FFLAGS to openblas though.

@xianyi
Copy link
Collaborator

xianyi commented Nov 14, 2012

Hi @ViralBShah

I just tried the following command on my mac osx.

   make CC="clang -mmacosx-version-min=10.6" FC="gfortran" FFLAGS=" -O2 -fPIC" USE_THREAD=1 TARGET= INTERFACE64=1

It works fine.

GNU Make 3.81

Xianyi

@ViralBShah
Copy link
Contributor Author

I am using 0.2.3. Are you suggesting that it works as is, without any modifications?

@staticfloat
Copy link
Contributor

I just compiled 0.2.3 (the master branch, that is), using the buildline above on 10.8.2, and it worked. (By that I mean it compiled, ran all tests, without any problems)

@xianyi: What do you mean you can't use gdb on OSX? I use gdb quite often, and it seems to work fine. Is there specific functionality you need to use?

EDIT: Just realized I compiled 0.2.4, as that is the master branch, 0.2.3 is a tagged older version

@xianyi
Copy link
Collaborator

xianyi commented Nov 14, 2012

Hi @staticfloat ,

I can use gdb now with some warnings.

warning: Could not find object file "/Users/gkhanna/build/x86_64-apple-darwin11.3.0/libgfortran/.libs/_sign_i4.o" - no debug information available for "../../../gcc-4.7-20120204/libgfortran/generated/_sign_i4.F90".

@ViralBShah: I didn't try 0.2.3. I just tried the develop branch.

@staticfloat
Copy link
Contributor

@ViralBShah: Note that the develop branch passes all tests with Julia, so we are good to upgrade to 0.2.5 whenever it is released. Looks like this might be an error that was corrected in 0.2.4.

@xianyi: That warning shouldn't cause too much trouble. It just means you don't have the libgfortran debugging symbols around, which is probably fine for most debugging. If you really want them, you'll probably have to do a custom compilation of libgfortran.

@ViralBShah
Copy link
Contributor Author

Ok, I will wait until 0.2.5 is released in that case. No hurry.

@xianyi xianyi closed this as completed Nov 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants