MAGMA Matrix Algebra on GPU and Multicore Architectures
The MAGMA project aims to develop a dense linear algebra library similar to LAPACK but for heterogeneous/hybrid architectures, starting with current "Multicore+GPU" systems.
Included are routines for the following algorithms:
Exemple : ** Matrix Multiplication using MAGMA (subroutine : **DGEMM )
... ... magma_dsetmatrix( Am, An, h_A, lda, d_A, ldda ); magma_dsetmatrix( Bm, Bn, h_B, ldb, d_B, lddb ); magma_dsetmatrix( M, N, h_C, ldc, d_C, lddc ); start = get_current_time(); magmablas_dgemm( transA, transB, M, N, K, alpha, d_A, ldda, d_B, lddb, beta, d_C, lddc ); end = get_current_time(); magma_perf = flops / GetTimerValue(start, end); magma_dgetmatrix( M, N, d_C, lddc, h_C2, ldc ); ... ...
tesla
Exemple :
qlogin -q tesla.q -l k20
Charger le module magma :
module load magma
Adapter le Makefile suivant selon vos besoins :
include ${MAGMA_HOME}/make.inc # change $(CC) to $(FORT) to use fortran compiler #------------------------------------------------ ### You only need to set your program source file dgmem: $(CC) dgemm.cpp -o dgmem $(OPTS) $(INC) $(LIBDIR) $(LDLIBS)