Magma testing_dgemm program problem
Magma testing_dgemm program problem
Hi,
I am trying to work with Magma. I successfully installed it. At least, it reported no error messages when I installed it.
However, when I run testing_dgemm, I get magma error values of 100%. I would assume that this means that the magma array specified in the test code is zeroed out upon return.
Once again, I am getting no error messages, either in installation or in the running of the test file. Also, I don't believe that it is a problem with the machine, as one of my colleagues has it running perfectly on the same machine.
Thanks in advance,
Jacob
I am trying to work with Magma. I successfully installed it. At least, it reported no error messages when I installed it.
However, when I run testing_dgemm, I get magma error values of 100%. I would assume that this means that the magma array specified in the test code is zeroed out upon return.
Once again, I am getting no error messages, either in installation or in the running of the test file. Also, I don't believe that it is a problem with the machine, as one of my colleagues has it running perfectly on the same machine.
Thanks in advance,
Jacob
Re: Magma testing_dgemm program problem
Please copy & paste the complete input (i.e., command line) & output of your testing_dgemm run, as well as your make.inc file and any environment variables (e.g., GPU_TARGET) you may have set.
Do you get similar errors with testing_sgemm (single precision)?
-mark
Do you get similar errors with testing_sgemm (single precision)?
-mark
Re: Magma testing_dgemm program problem
Thanks for the help.
When you asked me to post my make.inc, I looked at it one more time, and I figured that I might as well try targeting all architectures.
When I did that, the problem disappeared. I thought that I had the correct architecture targeted, but apparently not.
When you asked me to post my make.inc, I looked at it one more time, and I figured that I might as well try targeting all architectures.
When I did that, the problem disappeared. I thought that I had the correct architecture targeted, but apparently not.
Re: Magma testing_dgemm program problem
Okay.
Other testers (e.g., testing_dgetrf) would output info about your actual device and warn if it wasn't supported by the GPU_TARGET you chose. This check was inadvertently left out of the testing_*gemm files, which has been fixed for the next release.
-mark
Other testers (e.g., testing_dgetrf) would output info about your actual device and warn if it wasn't supported by the GPU_TARGET you chose. This check was inadvertently left out of the testing_*gemm files, which has been fixed for the next release.
-mark
Re: Magma testing_dgemm program problem
Hi,
I've got the same problem.
Actually, there are two gpu cards in my machine: Tesla K20c and Quadro K2000.
For the first one the test of dgemm is ok for me (even if labeled as "failed") and for the
second one the cublas error is O(1) which is obviously a nonsens. Here the output exterps:
(the above test is OK for both magma and cublas)
(while the latter test fails for cublas).
My make.inc is
Hoping that some could advice me how to avoid cublas errors.
Serguei.
I've got the same problem.
Actually, there are two gpu cards in my machine: Tesla K20c and Quadro K2000.
For the first one the test of dgemm is ok for me (even if labeled as "failed") and for the
second one the cublas error is O(1) which is obviously a nonsens. Here the output exterps:
Code: Select all
# ./testing_dgemm -l --dev 0
MAGMA 1.5.0 compiled for CUDA capability >= 3.0
CUDA runtime 6000, driver 6000. OpenMP threads 8.
device 0: Tesla K20c, 705.5 MHz clock, 4799.6 MB memory, capability 3.5
device 1: Quadro K2000, 954.0 MHz clock, 2047.7 MB memory, capability 3.0
Usage: ./testing_dgemm [options] [-h|--help]
If running lapack (option --lapack), MAGMA and CUBLAS error are both computed
relative to CPU BLAS result. Else, MAGMA error is computed relative to CUBLAS result.
transA = No transpose, transB = No transpose
M N K MAGMA Gflop/s (ms) CUBLAS Gflop/s (ms) CPU Gflop/s (ms) MAGMA error CUBLAS error
=========================================================================================================
1088 1088 1088 531.11 ( 4.85) 774.24 ( 3.33) 4.62 ( 557.21) 5.95e-15 5.95e-15 failed
2112 2112 2112 577.41 ( 32.63) 1012.92 ( 18.60) 4.68 (4028.40) 7.95e-15 7.95e-15 failed
3136 3136 3136 579.34 ( 106.47) 1013.40 ( 60.87) 4.70 (13127.65) 1.11e-14 1.11e-14 failed
Code: Select all
# ./testing_dgemm -l --dev 1
MAGMA 1.5.0 compiled for CUDA capability >= 3.0
CUDA runtime 6000, driver 6000. OpenMP threads 8.
device 0: Tesla K20c, 705.5 MHz clock, 4799.6 MB memory, capability 3.5
device 1: Quadro K2000, 954.0 MHz clock, 2047.7 MB memory, capability 3.0
Usage: ./testing_dgemm [options] [-h|--help]
If running lapack (option --lapack), MAGMA and CUBLAS error are both computed
relative to CPU BLAS result. Else, MAGMA error is computed relative to CUBLAS result.
transA = No transpose, transB = No transpose
M N K MAGMA Gflop/s (ms) CUBLAS Gflop/s (ms) CPU Gflop/s (ms) MAGMA error CUBLAS error
=========================================================================================================
1088 1088 1088 27.56 ( 93.45) 6362.66 ( 0.40) 4.66 ( 553.25) 5.95e-15 9.98e-01 failed
2112 2112 2112 27.85 ( 676.61) 401148.72 ( 0.05) 4.70 (4008.75) 7.95e-15 9.99e-01 failed
3136 3136 3136 27.90 (2210.83) 1340481.28 ( 0.05) 4.71 (13093.26) 1.11e-14 9.99e-01 failedMy make.inc is
Code: Select all
#//////////////////////////////////////////////////////////////////////////////
# -- MAGMA (version 1.5.0) --
# Univ. of Tennessee, Knoxville
# Univ. of California, Berkeley
# Univ. of Colorado, Denver
# @date September 2014
#//////////////////////////////////////////////////////////////////////////////
# GPU_TARGET contains one or more of Tesla, Fermi, or Kepler,
# to specify for which GPUs you want to compile MAGMA:
# Tesla - NVIDIA compute capability 1.x cards
# Fermi - NVIDIA compute capability 2.x cards
# Kepler - NVIDIA compute capability 3.x cards
# The default is all, "Tesla Fermi Kepler".
# See http://developer.nvidia.com/cuda-gpus
#
#GPU_TARGET ?= Tesla Fermi Kepler
GPU_TARGET = Kepler
CC = gcc
CXX = g++
NVCC = nvcc
FORT = gfortran
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
CFLAGS = -fPIC -O3 -fomit-frame-pointer -mavx -m64 -DADD_ -fopenmp -DMAGMA_SETAFFINITY
FFLAGS = -fPIC -O3 -fomit-frame-pointer -mavx -m64 -DADD_
F90FLAGS = -fPIC -O3 -fomit-frame-pointer -mavx -m64 -DADD_ -x f95-cpp-input
NVCCFLAGS = -O3 -DADD_ -Xcompiler "-fno-strict-aliasing -fPIC"
LDFLAGS = -fPIC -fopenmp
# Depending on how ATLAS and LAPACK were compiled, you may need one or more of:
# -lifcore -ldl -lf2c -lgfortran
LIB = -llapack -lf77blas -latlas -lcblas -lcublas -lcudart -lstdc++ -lm -lgfortran #-lifcore
# define library directories here or in your environment
LAPACKDIR ?= /usr/local/src/lapack-3.5.0
ATLASDIR ?= /usr/local/atlas
CUDADIR ?= /usr/local/cuda
-include make.check-atlas
-include make.check-cuda
LIBDIR = -L$(LAPACKDIR) \
-L$(ATLASDIR)/lib \
-L$(CUDADIR)/lib64
INC = -I$(CUDADIR)/include
Serguei.
Re: Magma testing_dgemm program problem
Quick answer: this is a bug in the tester, not in MAGMA itself. We'll fix it for the next release.
Details: the tester creates a cublas handle on device 0, inside TESTING_INIT(). After that, it parses the command line arguments and finds that you want to use device 1, and allocates memory there. But it still tries to run the cublasDgemm using the handle for device 0, which will obviously fail.
-mark
Details: the tester creates a cublas handle on device 0, inside TESTING_INIT(). After that, it parses the command line arguments and finds that you want to use device 1, and allocates memory there. But it still tries to run the cublasDgemm using the handle for device 0, which will obviously fail.
-mark
Re: Magma testing_dgemm program problem
Thanks Marc. I confirm, adding :
just after has solved the problem:
Code: Select all
cublasDestroy( handle );
cudaSetDevice( opts.device );
cublasCreate( &handle );
Code: Select all
parse_opts( argc, argv, &opts );Code: Select all
$ ./testing_dgemm -l --dev 1
MAGMA 1.5.0 compiled for CUDA capability >= 3.0
CUDA runtime 6000, driver 6000. OpenMP threads 8.
device 0: Tesla K20c, 705.5 MHz clock, 4799.6 MB memory, capability 3.5
device 1: Quadro K2000, 954.0 MHz clock, 2047.7 MB memory, capability 3.0
Usage: ./testing_dgemm [options] [-h|--help]
If running lapack (option --lapack), MAGMA and CUBLAS error are both computed
relative to CPU BLAS result. Else, MAGMA error is computed relative to CUBLAS result.
transA = No transpose, transB = No transpose
M N K MAGMA Gflop/s (ms) CUBLAS Gflop/s (ms) CPU Gflop/s (ms) MAGMA error CUBLAS error
=========================================================================================================
1088 1088 1088 27.56 ( 93.47) 25.44 ( 101.26) 4.62 ( 557.20) 5.95e-15 5.95e-15 failed
2112 2112 2112 28.21 ( 667.97) 28.11 ( 670.21) 4.68 (4025.88) 7.95e-15 7.95e-15 failed
3136 3136 3136 28.01 (2202.12) 28.03 (2200.69) 4.69 (13139.79) 1.11e-14 1.11e-14 failed