Magma-1.5.0 Mac OS X Mavericks Installation Error

Open discussion for MAGMA

Magma-1.5.0 Mac OS X Mavericks Installation Error

Postby pcall » Wed May 21, 2014 2:27 pm

I'm trying to install Magma 1.5.0 on Mac OS X Mavericks and am getting errors during compilation. I'm using gcc 4.9, nvcc 6.0.1, and gfortran 4.9. I've installed ATLAS and used the make.inc.atlas as a template for my make.inc. My make.inc looks like this:

Code: Select all
CC        = /usr/local/bin/gcc
NVCC      = nvcc
FORT      = gfortran

ARCH      = ar
ARCHFLAGS = cr
RANLIB    = ranlib

OPTS      = -O3 -DADD_
F77OPTS   = -Wall -m32 -O3 -DADD_
FOPTS     = -Wall -m32 -O3 -DADD_ -x f95-cpp-input
NVOPTS    = -O3 -DADD_ -Xcompiler -fno-strict-aliasing
LDOPTS    = -Wall -m32

LIB       = -llapack -lf77blas -latlas -lcblas -lcublas -lcudart -lstdc++ -lm -lgfortran -lifcore

-include make.check-atlas
-include make.check-cuda

LIBDIR    = -L$(LAPACKDIR) \
            -L$(ATLASDIR) \
            -L$(CUDADIR)/lib

INC       = -I$(CUDADIR)/include


The error I'm getting when trying to compile is this:

Code: Select all
gfortran -Wall -m32 -O3 -DADD_ -I/usr/local/cuda/include -I../include -I../control -c lapack_strevc3.f -o lapack_strevc3.o
lapack_strevc3.f: In function ‘strevc3’:
lapack_strevc3.f:230:0: error: definition in block 267 does not dominate use in block 263
       SUBROUTINE STREVC3( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL,
 ^
for SSA_NAME: _1088 in statement:
slsr_3977 = _1088 + stride.1_195;
lapack_strevc3.f:230:0: internal compiler error: verify_ssa failed

lapack_strevc3.f:230:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
make[1]: *** [lapack_strevc3.o] Abort trap: 6
make: *** [libmagma] Error 2


Has anyone seen this error before, or have any idea how to fix this?
Thanks!
pcall
 
Posts: 1
Joined: Wed May 21, 2014 2:18 pm

Re: Magma-1.5.0 Mac OS X Mavericks Installation Error

Postby mgates3 » Wed Jun 18, 2014 1:26 pm

I recently upgraded to Mavericks and have been working through the various build issues. I have not seen this problem that you had:

Code: Select all
magma-trunk/src> gfortran -Wall -m32 -O3 -DADD_ -I/usr/local/cuda/include -I../include -I../control -c lapack_strevc3.f -o lapack_strevc3.o
magma-trunk/src> gfortran --version
GNU Fortran (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.


I used the gfortran 4.9 binary from http://hpc.sourceforge.net/

However, you can try simply removing the lapack_*trevc3.f from src/Makefile and src/Makefile.src. The default version used in dgeev.cpp and zgeev.cpp should be TREVC_VERSION 4, which is magma_dtrevc3_mt, instead of lapack_dtrevc3.

===== Other issues

There continues to be an issue with MacOS's Accelerate/veclib framework. When compiling -m32, everything seems fine. When compiling -m64, single precision Fortran functions that should return float, such as sdot, snrm2, cnrm2, slange, clange, etc., are actually returning double. This can be fixed in the MAGMA header files and all the MAGMA *.f files, but correcting all instances is tedious. I'm working on a more robust work-around.

Since you used ATLAS, that should avoid the problem.

Currently, there seems to be a conflict between nvcc and Apple's clang compiler when using -m32. Using -m64 solves this issue (but then forces the previous issue).

Code: Select all
magma-trunk/magmablas> nvcc -m32 -c -o zlaset32.o zlaset.cu
clang: error: unknown argument: '-malign-double' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
mgates3
 
Posts: 428
Joined: Fri Jan 06, 2012 2:13 pm

Re: Magma-1.5.0 Mac OS X Mavericks Installation Error

Postby mgates3 » Wed Jun 18, 2014 1:31 pm

I should mention I'm using Apple's compiler:

Code: Select all
magma-trunk/src> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix

magma-trunk/src> nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2013 NVIDIA Corporation
Built on Tue_Apr__1_01:38:47_PDT_2014
Cuda compilation tools, release 6.0, V6.0.1
mgates3
 
Posts: 428
Joined: Fri Jan 06, 2012 2:13 pm


Return to User discussion

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests

cron