I have gotten my program to run magma_dsyrk(), but I am getting the wrong answer. I have #include "magma.h" and #include "magma_lapack.h" at the top of the program and have magma_init(); and magma_finalize(); before and after calling magma_dsyrk(). cblas_dsyrk() gives me the correct answer and here are the two calls side-by-side:
cblas_dsyrk(CblasRowMajor, CblasLower, CblasNoTrans, nrows, ncols, 1.0, A, ncols, 1.0, C, nrows);
magma_dsyrk(MagmaLower, MagmaNoTrans, nrows, ncols, 1.0, A, ncols, 1.0, C, nrows);
A and C are allocated with
double *A = (double *)_mm_malloc(sizeof(double)*nrows*ncols, 64);
double *C = (double *)_mm_malloc(sizeof(double)*nrows*nrows, 64);
I am compiling with
icc -fPIC -O3 -DADD_ -Wall -openmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY -DHAVE_CUBLAS -DMIN_CUDA_ARCH=100 -I/usr/local/cuda/include -I/opt/intel/composer_xe_2013_sp1.3.174/mkl/include -I/home/mjswartz/Downloads/magma-1.5.0-beta2/include -I/home/mjswartz/Downloads/magma-1.5.0-beta2/control -c magma_test.c -o magma_test.o
icc -fPIC -openmp magma_test.o -o magma_test /home/mjswartz/Downloads/magma-1.5.0-beta2/testing/libtest.a /home/mjswartz/Downloads/magma-1.5.0-beta2/testing/lin/liblapacktest.a -L/home/mjswartz/Downloads/magma-1.5.0-beta2/lib -lmagma -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib/intel64 -L/usr/local/cuda/lib64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lcublas -lcudart -lstdc++ -lm
So again, like I said, I'm getting it to run, just getting the wrong answer. Does anything jump out as incorrect?
Thanks in advance!
DSYRK Issues
Re: DSYRK Issues
Update: turns out its not giving me an answer at all. I'm getting all 0.0's in C after magma_dsyrk(). Any idea why?
Re: DSYRK Issues
magma_dsyrk takes matrices on the GPU. You need to allocate a matrices on the GPU and transfer the matrices to the GPU. See magma/testing/testing_dsyrk.cpp
BTW, magma_dsyrk is simply a wrapper around cublasDsyrk.
-mark
BTW, magma_dsyrk is simply a wrapper around cublasDsyrk.
-mark