MAGMA 2.0 now available

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

MAGMA 2.0 now available

Postby mgates3 » Tue Feb 09, 2016 8:57 pm

MAGMA 2.0 is now available from our software download page.
http://icl.cs.utk.edu/magma/software/

Additionally, we have a survey for feedback on MAGMA, LAPACK, and other dense linear algebra libraries.
https://www.surveymonkey.com/r/2016DenseLinearAlgebra

This release includes a major interface change for all MAGMA BLAS functions; most higher level functions such as magma_zgetrf have not changed their interface. Significant changes:

  • Added queue argument to magmablas routines, and deprecated magmablas{Set,Get}KernelStream. This resolves a thread safety issue with using global magmablas{Set,Get}KernelStream.
  • Fixed bugs related to relying on CUDA NULL stream implicit synchronization.
  • Fixed memory leaks (zunmqr_m, zheevdx_2stage, etc.). Add -DDEBUG_MEMORY option to catch leaks.
  • Fixed geqrf*_gpu bugs for m == nb, n >> m (ex: -N 64,10000); and m >> n, n == nb+i (ex: -N 10000,129)
  • Fixed zunmql2_gpu for rectangular sizes.
  • Fixed zhegvdx_m itype 3.
  • Added zunglq, zungbr, zgeadd2 (which takes both alpha and beta).

MAGMA sparse

  • Added QMR, TFQMR, preconditioned TFQMR
  • Added CGS, preconditioned CGS
  • Added kernel-fused versions for CGS/PCGS QMR, TFQMR/PTFQMR
  • Changed relative stopping criterion to be relative to RHS
  • Fixed bug in complex version of CG
  • Accelerated version of Jacobi-CG
  • Added very efficient IDR
  • Performance tuning for SELLP SpMV
Last edited by mgates3 on Tue Feb 09, 2016 9:02 pm, edited 1 time in total.
Reason: make sticky for 180 days
mgates3
 
Posts: 750
Joined: Fri Jan 06, 2012 2:13 pm

MAGMA 2.0 now available

Postby gelfgat » Mon Feb 22, 2016 3:40 am

Just downloaded and tried to compile and link MAGMA 2.0.

With make.inc.mkl-gcc I receive errors looking as below:
_______________________________________________
Error: Expected initialization expression at (1)
control/magma_zfortran.F90:1833:17:
magma_devptr_t :: dA
______________________________________________

With make.inc.mkl-icc similar errors look as follows:
______________________________________________
control/magma_zfortran.F90(1360): error #5082: Syntax error, found ')' when expecting one of: <REAL_KIND_CON> <REAL_CONSTANT> <DBLPRC_CONSTANT> <DBLPRC_KIND_CON> <QUAPRC_CONSTANT> ...
integer(kind=) :: ddA
______________________________________________

Please help
Alex
Last edited by mgates3 on Mon Feb 22, 2016 4:39 pm, edited 1 time in total.
gelfgat
 
Posts: 5
Joined: Mon Feb 22, 2016 2:17 am

Re: MAGMA 2.0 now available

Postby mgates3 » Mon Feb 22, 2016 4:43 pm

Can you please include some more context? It's difficult to tell what's going on without seeing both the command that is run (e.g., gfortran) and the output. Also, what OS are you using, what version of gcc, gfortran, icc, ifort? For example, on our system:

Code: Select all
magma-2.0.0> make -j1 control/magma_zfortran.o
gfortran -O3 -fPIC -DNDEBUG -DADD_ -Wall -Wno-unused-dummy-argument -x f95-cpp-input -I/mnt/sw/cuda-7.0.28/include -I/mnt/scratch/sw/intel/composer_xe_2015.2.164/mkl/include -I./include -I./control -Dmagma_devptr_t="integer(kind=8)" -c -o control/magma_zfortran.o control/magma_zfortran.F90
mv magma_zfortran.mod include/

magma-2.0.0> gfortran --version
GNU Fortran (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.

magma-2.0.0> g++ --version
g++ (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.

magma-2.0.0> ls -l make.inc
lrwxrwxrwx 1 mgates3 dongarra 16 Feb  8 21:54 make.inc -> make.inc.mkl-gcc
mgates3
 
Posts: 750
Joined: Fri Jan 06, 2012 2:13 pm

Re: MAGMA 2.0 now available

Postby gelfgat » Tue Feb 23, 2016 3:08 am

Hi,

Thanks for your attention. Here is some more information. Please let me know is something else is needed.

My OS is Ubuntu 15.10.

$gfortran --\version:
GNU Fortran (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010
$ g++ --\version
g++ (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010

Output on the command
$make -j1 control/magma_zfortran.o:
gfortran -O3 -fPIC -DADD_ -Wall -Wno-unused-dummy-argument -x f95-cpp-input -I/opt/pgi/linux86-64/2015/cuda/7.5/inc
lude -I/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include -I./include -I./control -Dmagma_devptr_t="in
teger(kind=)" -c -o control/magma_zfortran.o control/magma_zfortran.F90
Makefile:560: recipe for target 'control/magma_zfortran.o' failed

followed by many lines like these:

Error: Expected initialization expression at (1)
control/magma_zfortran.F90:1296:17:

magma_devptr_t :: dwork
1
Error: Expected initialization expression at (1)
control/magma_zfortran.F90:1304:17:

magma_devptr_t :: dA
1
Error: Expected initialization expression at (1)
control/magma_zfortran.F90:1317:17:

magma_devptr_t :: dA
1
Error: Expected initialization expression at (1)
control/magma_zfortran.F90:1319:17:

magma_devptr_t :: dB
1
Error: Expected initialization expression at (1)
control/magma_zfortran.F90:1331:17:

magma_devptr_t :: dA
1
Error: Expected initialization expression at (1)
control/magma_zfortran.F90:1333:17:

magma_devptr_t :: dB
gelfgat
 
Posts: 5
Joined: Mon Feb 22, 2016 2:17 am

Re: MAGMA 2.0 now available

Postby mgates3 » Wed Feb 24, 2016 11:34 am

The problem arises from this part of the gfortran command:
-Dmagma_devptr_t="integer(kind=)"

That should be:
-Dmagma_devptr_t="integer(kind=8)"

MAGMA has a simple tool that is suppose to generate that 8. Here's compiling and running it manually, though this should happen automatically. Notice the "8" before the bottom prompt.
Code: Select all
magma> make control/sizeptr
gcc -m64 -O3 -fPIC -fopenmp -DADD_ -Wall -Wshadow -DMAGMA_NOAFFINITY -pedantic -Wno-long-long -std=c99 -DHAVE_CUBLAS -DMIN_CUDA_ARCH=300 -I/usr/local/cuda-6.5/include -I./include -I./control -c -o control/sizeptr.o control/sizeptr.c
gcc -m64 -O3 -fPIC -fopenmp -DADD_ -Wall -Wshadow -DMAGMA_NOAFFINITY -pedantic -Wno-long-long -std=c99 -DHAVE_CUBLAS -DMIN_CUDA_ARCH=300 -m64     -fPIC -fopenmp -o control/sizeptr control/sizeptr.o

magma> ./control/sizeptr
8magma>


It seems very odd that sizeptr would not compile & run. A workaround is simply to hard-code 8 into the Makefile. Change:
PTROPT = -Dmagma_devptr_t="integer(kind=$(PTRSIZE))"
to
PTROPT = -Dmagma_devptr_t="integer(kind=8)"

-mark
mgates3
 
Posts: 750
Joined: Fri Jan 06, 2012 2:13 pm

Re: MAGMA 2.0 now available

Postby gelfgat » Thu Feb 25, 2016 6:25 am

Mark,

Thanks a lot. It worked both with gfortran and ifort.

One comment:
I needed to run "make sparse" to get sparse matrices libraries. This is not explained in the installation instructions.

And one remaining problem:
When I run
make install prefix=/opt/magma
the output is the following:
____________________________________
mkdir -p /opt/magma
mkdir -p /opt/magma/include
mkdir -p /opt/magma/lib
mkdir -p /opt/magma/lib/pkgconfig
# MAGMA
cp include/*.h /opt/magma/include
cp sparse-iter/include/*.h /opt/magma/include
cp lib/libmagma.a lib/libmagma.so lib/libmagma_sparse.a lib/libmagma_sparse.so /opt/magma/lib
# pkgconfig
cat /lib/pkgconfig/magma.pc.in | \
sed -e s:@INSTALL_PREFIX@:"/opt/magma": | \
sed -e s:@CFLAGS@:"-DADD_ -openmp -I/opt/pgi/linux86-64/2015/cuda/7.5//include -I/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/include": | \
sed -e s:@LIBS@:"-openmp -L/opt/pgi/linux86-64/2015/cuda/7.5//lib64 -L/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lstdc++ -lm -lcublas -lcusparse -lcudart": | \
sed -e s:@MAGMA_REQUIRED@:: \
> /opt/magma/lib/pkgconfig/magma.pc
cat: /lib/pkgconfig/magma.pc.in: No such file or directory
______________________________________________________

As I understand, I can link libraries without this installation, but it would be nice to have it also solved.

Alex
gelfgat
 
Posts: 5
Joined: Mon Feb 22, 2016 2:17 am

Re: MAGMA 2.0 now available

Postby mgates3 » Fri Feb 26, 2016 4:34 pm

If you do only "make install", then yes, it compiles the dense library but not the sparse library.

If you do "make", or equivalently "make all", that should compile both dense and sparse libraries, and all testers. Then "make install" would install the libraries.

For installing, there is a mistake in the Makefile. Setting MAGMA_DIR to "." should fix that.

Code: Select all
setenv MAGMA_DIR .
make install prefix=/tmp/magma


I uploaded a 2.0.1 version that fixes just these two "make install" issues. You can just use the above workaround, though, as nothing else changed.

-mark
mgates3
 
Posts: 750
Joined: Fri Jan 06, 2012 2:13 pm

Re: MAGMA 2.0 now available

Postby gelfgat » Sun Feb 28, 2016 5:54 am

Mark,

Many thanks. I downloaded version 2.0.1 and everything worked. The only comment: writing into /usr/local requires root permissions. I replaced it by ~/local and everything worked fine.

Alex
gelfgat
 
Posts: 5
Joined: Mon Feb 22, 2016 2:17 am


Return to User discussion

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

cron