Open CL with AMD - opencl

I am trying to implement matrix multiplication usign OpenCL. I have an ATI Radeon HD Radeon 5000 series graphics card.
This is one of the programs i found on the net, but linking errors are coming which i am not able to solve.
I tried running the code mentioned in this site
http://gpgpu-computing4.blogspot.in/2009/10/matrix-multiplication-3-opencl.html
I followed setting up my visual studio project from this site http://www.guineacode.com/2010/linking-and-compiling-opencl/
but the following errors come
error LNK2019: unresolved external symbol _oclLoadProgSource referenced in function _main
error LNK2019: unresolved external symbol _shrLogEx referenced in function "void __cdecl __shrCheckErrorEX(int,int,void (__cdecl*)(int),char const *,int)" (?__shrCheckErrorEX##YAXHHP6AXH#ZPBDH#Z)
Any help would be appreciated

Can you try this ?
Make sure you have the latest Catalyst driver from AMD.
Try downloading AMD APP SDK 2.6 from here : http://developer.amd.com/sdks/AMDAPPSDK/downloads/Pages/default.aspx
After the install, do the following
Make sure to include $(AMDAPPSDKROOT)\include for header files
Library Directory : $(AMDAPPSDKROOT)\lib\x86 or x86_64 depending on your bitness
4.Now you can build and run the program
Here is an older post which talks about linking 2.4... with slight modification you can use the instruction
http://blog.cuvilib.com/2011/07/01/how-to-run-opencl-in-microsoft-vs-2008-using-amd-app-sdk/
If you are looking only MatrixMultiplication sample, AMD APP SDK bundles some samples along with pack you can find them in (Windows)
C:\USERS\%USER%\My Documents\AMD APP\ Samples
and in Linux under
/opt/AMD APP SDK/Samples
HTH

Related

Failed to find "gl.h" on macOS 11.3

I've got XCode 12.5 up and running on macOS 11.3 (M1 chip) in Github Actions as a self-hosted runner.
While my macOS workflow is able to find gl.h in the github-hosted machine just fine, my own self-hosted one reports this:
CMake Error at /Users/administrator/actions-runner/_work/Mudlet/Qt/5.14.2/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
Error: Failed to find "gl.h" in
"/System/Library/Frameworks/OpenGL.framework/Headers;/System/Library/Frameworks/AGL.framework/Headers".
Call Stack (most recent call first):
/Users/administrator/actions-runner/_work/Mudlet/Qt/5.14.2/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:202 (include)
3rdparty/vcpkg/scripts/buildsystems/vcpkg.cmake:555 (_find_package)
/Users/administrator/actions-runner/_work/Mudlet/Qt/5.14.2/clang_64/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:94 (find_package)
3rdparty/vcpkg/scripts/buildsystems/vcpkg.cmake:555 (_find_package)
/Users/administrator/actions-runner/_work/Mudlet/Qt/5.14.2/clang_64/lib/cmake/Qt5UiTools/Qt5UiToolsConfig.cmake:219 (find_package)
3rdparty/vcpkg/scripts/buildsystems/vcpkg.cmake:555 (_find_package)
3rdparty/edbee-lib/edbee-lib/CMakeLists.txt:177 (FIND_PACKAGE)
The code responsible is this line:
FIND_PACKAGE(Qt5UiTools REQUIRED)
What could be the reason that gl.h is not locatable?
I got this problem when I updated to MacOS Big Sur (11.6.2) when trying to make a qt app.
This was the error I got:
CMake Error at /usr/local/Qt-5.5.1/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
Failed to find "gl.h" in
"/System/Library/Frameworks/OpenGL.framework/Headers;/System/Library/Frameworks/AGL.framework/Headers".
Call Stack (most recent call first):
/usr/local/Qt-5.5.1/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:139 (include)
My google-fu found this from 2019 [https://github.com/ziglang/zig/issues/2208]
https://github.com/ziglang/zig/issues/2208 :
The new path to the framework is:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks
I looked, and gl.h was found in several places, including OpenGL.framework.
As a work-around, I changed the library path in /usr/local/Qt-5.5.1/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 from:
set(_GL_INCDIRS "/System/Library/Frameworks/OpenGL.framework/Headers" "/System/Library/Frameworks/AGL.framework/Headers")
to:
set(_GL_INCDIRS "/System/Library/Frameworks/OpenGL.framework/Headers" "/System/Library/Frameworks/AGL.framework/Headers" "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks")
running on macOS 11.3 (M1 chip) in Github Actions as a self-hosted runner.
Try again with the latest version of self-hosted runners, since (Aug. 2022):
GitHub Actions: Self-hosted runners now support Apple M1 hardware
Actions runner support for Apple silicon hardware, such as the M1 chip, is now generally available.
This provides teams with the capability to run self-hosted macOS workflows in a macOS ARM64 runtime.
Now the Actions runner supports M1 and the ARM64 runtime meaning developers can run it on their own M1 or M2 hardware.
Based on initial testing, there are currently two issues to be aware of:
macOS ARM64 does not support node12.
Therefore, the runner will automatically use node16 to execute any javascript Action written for node12.
All actions provided by GitHub are compatible with the runner except for a known issue with setup-python. The fix for that can be tracked here.
For additional information on how to set up a self-hosted macOS ARM64 runner, please refer to our documentation.
If you have any feedback or questions for Actions self-hosted Apple silicon support, you can submit an issue in the runner repository.

Groovie Gorilla and GPIO

I want to use RaspberryIO library with dotnet core version 3.1 on Ubuntu 20.10.
When it comes to use
Pi.Init<BootstrapWiringPi>();
I got error:
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libwiringPi.so.2.52' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibwiringPi.so.2.52: cannot open shared object file: No such file or directory
The same code works perfectly on Raspbian.
I use:
Raspberry Pi 4
In my case (Rpi3 + Ubuntu 20.04 x64 + dotnet core 3.1):
clone https://github.com/WiringPi/WiringPi
build
copy libwiringPi.so.2.60 and gpio to app folder
rename libwiringPi.so.2.60 to libwiringPi.so.2.52
and Pi.Init < BootstrapWiringPi >( );
with TestLedBlinking() is work.

Poco / zlib: error LNK2019 unresolved external "_gzopen"

I am trying to use zlib functions while working with poco c++ library. Linking to the zlib library directly does not work, because poco links to it also and I get several duplicates while linking. So I removed zlib.lib from my libraries list and used the poco version only.
Because zlib.h is part of poco, compiling works perfectly, but linking now results in the following error
error LNK2019 unresolved external "_gzopen"
So I can switch between duplicate and unresolved. Who can help me out?
On windows, defining ZLIB_DLL should force export of native zlib interface. Optionally, Poco InflatingStream and DeflatingStream wrap zlib functionality. A word of warning: these are std streams derivatives and there may be a performance penalty.

LInker error when switching from windows to console

I am using Qt for GUI and building my project in waf.
For switching to windows subsystem from console(default) i had to pass this argument to the VS linker throught my wscript(waf)
subsystem='windows'
i added this in build part for waf file and I am getting this error
MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain#16 referenced in function ___tmainCRTStartup
C:\cygwin\home\sobingt\project\build\src\View\app.exe : fatal error LNK1120: 1 unresolved externals
I want to run this program as windows not as console.The Code works if i run it as console
subsystem='console'
You need to link against qtmain.lib (IIRC). This provides a shim around winmain which you need for windowed windows apps.

Depmod - unresolved symbols in rt73 module

I'm trying to install a linux driver for my wireless network card (D-Link DWL-G510) on my Red Hat Linux 7.1 machine with a 2.4.37.9 kernel. I downloaded the serial monkey driver from the sourceforge site and was able to successfully compile the module. However, whenever I do a "make install", the make script executes a "depmod -a" command which then complains with the message: "Unresolved symbols in /lib/modules/2.4.37.9/extra/rt73.o".
I then executed a "depmod -e" command to show unresolved symbols and it indicates the following information:
request_firmware_Rsmp_38ce5074
release_firmware_Rsmp_33934162
I did a grep on the above information and it showed no source files making reference to it. I searched for it on google and it returned no results. Can anyone help?
I found out the reason - it was missing the firmware_class module. I had to rebuild kernel modules with the experimental feature CONFIG_FW_LOADER as a module which is found under Library routines\Hotplug firmware loading support. After loading the firmware_class module, the rt73 module loaded successfully also.

Resources