clMagma with MinGW using CMake (Solved)
Posted: Mon Apr 21, 2014 12:28 pm
Check out the code from GitHub:
https://github.com/skn123/clMagma-CMake
This is my situation:
AMD APU A10 processor
ATI Radeon Card 8600M
AMD APP SDK 2.9 for Windows..It contains both OpenCL.lib ad libOpenCL.a
ACML 6.0 Beta (intel iFort MP)
clBlas - I use MinGW's "reimp" to create a libclblas.a
Now, I am trying to do the build of clMagma on Windows using MinGW. I could only find a solution for building with CUDA (which I am not interested).
Has anyone attempted it?
Let me share my first CMakeLists.txt that I built for clcompile.exe
I am able to build the executable. However, when I try to run the executable, it crashes and I get a message called "Access Denied".
If anyone is working on this, I would like to get some pointers. Alternately, I can volunteer to build the CMakeLists.txt for clMagma.
Here is my first attempt. The stuff is crude and should not be used by anyone. This is merely a POC.
PROJECT(clMagma)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(clcompile_SRCS
"F:/Sources/clmagma-1.1.0/interface_opencl/clcompile.cpp"
"F:/Sources/clmagma-1.1.0/interface_opencl/CL_MAGMA_RT.cpp"
)
INCLUDE_DIRECTORIES("F:/Sources/clmagma-1.1.0/interface_opencl")
INCLUDE_DIRECTORIES("F:/Sources/clmagma-1.1.0/include")
INCLUDE_DIRECTORIES("F:/Sources/clmagma-1.1.0/control")
INCLUDE_DIRECTORIES("E:/Program_Files/AMD/clAmdBlas/include")
INCLUDE_DIRECTORIES("E:/Program_Files/AMD/AMD APP SDK/2.9/include")
LINK_DIRECTORIES("E:/Program_Files/AMD/acml/ifort64_mp/lib"
"E:/Program_Files/AMD/amdlibm-3.1-win64/lib/dynamic"
"E:/Program_Files/AMD/clAmdBlas/lib64/import"
"E:/Program_Files/AMD/AMD APP SDK/2.9/lib/x86_64")
SET(clcompile_LIBS
"E:/Program_Files/AMD/AMD APP SDK/2.9/lib/x86_64/libOpenCL.a"
"E:/Program_Files/AMD/clAmdBlas/lib64/import/libclamdblas.a"
"E:/Program_Files/AMD/amdlibm-3.1-win64/lib/dynamic/libamdlibm.a"
"E:/Program_Files/AMD/acml/ifort64_mp/lib/libacml_mp_dll.lib"
)
SET(clcompile_DEFS
"E:/Program_Files/AMD/amdlibm-3.1-win64/lib/dynamic/amdlibm.def"
"E:/Program_Files/AMD/clAmdBlas/lib64/import/clAmdBlas.def")
ADD_DEFINITIONS(-D_MSC_VER -DHAVE_clAmdBlas -DHAVE_CBLAS -DADD_)
ADD_EXECUTABLE(clcompile ${clcompile_SRCS} ${clcompile_DEFS})
TARGET_LINK_LIBRARIES(clcompile ${clcompile_LIBS})
https://github.com/skn123/clMagma-CMake
This is my situation:
AMD APU A10 processor
ATI Radeon Card 8600M
AMD APP SDK 2.9 for Windows..It contains both OpenCL.lib ad libOpenCL.a
ACML 6.0 Beta (intel iFort MP)
clBlas - I use MinGW's "reimp" to create a libclblas.a
Now, I am trying to do the build of clMagma on Windows using MinGW. I could only find a solution for building with CUDA (which I am not interested).
Has anyone attempted it?
Let me share my first CMakeLists.txt that I built for clcompile.exe
I am able to build the executable. However, when I try to run the executable, it crashes and I get a message called "Access Denied".
If anyone is working on this, I would like to get some pointers. Alternately, I can volunteer to build the CMakeLists.txt for clMagma.
Here is my first attempt. The stuff is crude and should not be used by anyone. This is merely a POC.
PROJECT(clMagma)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(clcompile_SRCS
"F:/Sources/clmagma-1.1.0/interface_opencl/clcompile.cpp"
"F:/Sources/clmagma-1.1.0/interface_opencl/CL_MAGMA_RT.cpp"
)
INCLUDE_DIRECTORIES("F:/Sources/clmagma-1.1.0/interface_opencl")
INCLUDE_DIRECTORIES("F:/Sources/clmagma-1.1.0/include")
INCLUDE_DIRECTORIES("F:/Sources/clmagma-1.1.0/control")
INCLUDE_DIRECTORIES("E:/Program_Files/AMD/clAmdBlas/include")
INCLUDE_DIRECTORIES("E:/Program_Files/AMD/AMD APP SDK/2.9/include")
LINK_DIRECTORIES("E:/Program_Files/AMD/acml/ifort64_mp/lib"
"E:/Program_Files/AMD/amdlibm-3.1-win64/lib/dynamic"
"E:/Program_Files/AMD/clAmdBlas/lib64/import"
"E:/Program_Files/AMD/AMD APP SDK/2.9/lib/x86_64")
SET(clcompile_LIBS
"E:/Program_Files/AMD/AMD APP SDK/2.9/lib/x86_64/libOpenCL.a"
"E:/Program_Files/AMD/clAmdBlas/lib64/import/libclamdblas.a"
"E:/Program_Files/AMD/amdlibm-3.1-win64/lib/dynamic/libamdlibm.a"
"E:/Program_Files/AMD/acml/ifort64_mp/lib/libacml_mp_dll.lib"
)
SET(clcompile_DEFS
"E:/Program_Files/AMD/amdlibm-3.1-win64/lib/dynamic/amdlibm.def"
"E:/Program_Files/AMD/clAmdBlas/lib64/import/clAmdBlas.def")
ADD_DEFINITIONS(-D_MSC_VER -DHAVE_clAmdBlas -DHAVE_CBLAS -DADD_)
ADD_EXECUTABLE(clcompile ${clcompile_SRCS} ${clcompile_DEFS})
TARGET_LINK_LIBRARIES(clcompile ${clcompile_LIBS})