Today I encountered the possible bug in magma-1.4.1 release code.
I wrote some code using MAGMA but failed to compiled code with -DHAVE_CUBLAS option.
Finally I found the root cause of this issue. magma_types.h contains a switch but
actually this does not check the #define properly.
The following patch fixes this issue.
- Code: Select all
--- magma_types.h.old 2014-01-30 13:26:23.650750056 +0900
+++ magma_types.h 2014-01-30 13:26:56.816516221 +0900
@@ -44,7 +44,7 @@
// ========================================
// define types specific to implementation (CUDA, OpenCL, MIC)
// define macros to deal with complex numbers
-#if HAVE_CUBLAS
+#if defined(HAVE_CUBLAS)
#ifndef CUBLAS_V2_H_
#include <cublas.h>
#endif