run arrayfire on ec2 gpu - amazon-ec2

Recent days we are trying to use Amazon GPU instances.But their graphic card NVIDIA GRID K520 supports only cuda 5.5. From installation documentation of arrayfire minimum version of cuda is 6.5.Need help to compile arrayfire with cuda 5.5.

You should be able to compile ArrayFire using CUDA 5.5. In fact I was just able to do so on my MacBook Pro. All you have to do is change the CUDA_VERSION to 5.5 in the CMake options.
You should also be able to update the CUDA Toolkit on the EC2 instance. I can't think of a reason why you wouldn't be able to update the driver and install the newest CUDA Toolkit on the machine.
If you have additional questions you can find us at:
https://groups.google.com/forum/#!forum/arrayfire-users

Related

Compile OpenCV 3.4 and Cuda 9.2 with MS VS15 2017

I need to do fast image processing so I decide to go for OpenCV with CUDA support. Now I'm trying to build OpenCV as dll to use it in my project, but I am not even able to generate the VS project since CMake keeps giving me this error:
CMakeError. I am on Windows 10, CMake 3.11 with VS 15 2017 x64 generator, OpenCV 3.4 (the last release).
I have installed CUDA 9.2, 9.1 and 8.0 and set CUDA_HOME environment variable as the CUDA toolkit directory. Nothing seems to work.
Then I try to set the CUDA_SDK_ROOT_DIR through the CMake GUI, but the CUDA toolkit directory seems to be not the right one and I'm not able to find the CUDA sample directory anywhere.
I have googled a lot, but I found nothing that had been able to help me. Did someone face this very same issue? How can I solve it?
PS: I have successfully created the dll with TBB and IPP (without CUDA) and it is still not fast enough, so I really need to use Cuda.
I have solved using Cuda 9.1 and VS 15.45. To install CUDA in a correct way you need to use custom installation and delete the VS integration, since it seems to have some problems. Once installation is complete, CMake should detect it.
This is a guide that could help.

gcc can't find cuda_runtime.h even though path is provided with -I flag (cygwin) [duplicate]

I'm trying to build a simple application with CUDA and I've been trying for hours on end and I just can't make it work on windows. nvcc absolutely refuses to compile without Visual Studio's compiler which doesn't support things I need. I tried building using nvcc with clang but It just asks me to use Visual Studio's compiler. I've also tried using clang directly since it now supports CUDA but I receive this error:
clang++.exe: error: Unsupported CUDA gpu architecture: compute_52
This makes no sense to me because I have the CUDA toolkit version 7.5 and my graphics card is a GTX 970 (two of them). I have googled this extensively and everywhere I come across the error the person always has is their CUDA toolkit is < 7.5. I'm on the brink of tears right now trying to get something as simple as VLA to work on this CUDA application and I just can't achieve it...
The CUDA windows toolchain requires the Visual Studio C++ compiler. You cannot use anything else on that platform. If the VS compiler doesn't support the language features you need within CUDA host code, you have no choice but to change platforms, or your expectations.
You can still potentially compile non-CUDA host code using another compiler and then link that code using NVCC and the VS toolchain.
Try to use clang-cl, --cubin=clang-cl.exe
It may be worth to work on a Linux VM or WSL2 within windows. As per the CUDA docs.
To compile new CUDA applications, a CUDA Toolkit for Linux x86 is
needed. CUDA Toolkit support for WSL is still in preview stage as
developer tools such as profilers are not available yet. However, CUDA
application development is fully supported in the WSL2 environment, as
a result, users should be able to compile new CUDA Linux applications
with the latest CUDA Toolkit for x86 Linux.
https://docs.nvidia.com/cuda/wsl-user-guide/index.html#:~:text=However%2C%20CUDA%20application%20development%20is,becomes%20available%20within%20WSL%202.

Omnet++ 5.0 and inet framework installation problems

What's the right way to install omnet++ 5.0 and inet framework on windows 7 64bit OS. I want to work with them for my thesis. I have been having issues with the installations. I have never used omnet before this is my first shot at it.
I am running OMNeT++ 5.0 on win7 x64 without any problems.
Just download the windows version on the website OMNeT++
and follow the instructions in ..\omnetpp-5.0\doc\InstallGuide.pdf in chapter 2.
In case of any problems, I suggest you ask again in a more specific way.
I was able to figure out the problem. Its from the windows extracting tool. I extracted omnet using 7zip archiver and now everything works fine

Opencv 3: cudarithm.hpp not installed on linux when building without cuda

I have a question regarding the CUDA modules in OpenCV 3. Formerly in OpenCV 2 there was the opencv_gpu module and there was always a opencv2/gpu/gpu.hpp file in the include folder. It would be moved there during install whether OpenCV was built with CUDA or without. In the latter case however, CUDA functions would not be usable later in the code, which could be checked by invoking cv::gpu::getCudaEnabledDeviceCount() which would then always return 0. This way a program that used CUDA could be compiled with versions of OpenCV that were built with CUDA, as well as with ones built without CUDA.
In Opencv 3.0 the CUDA functions have been moved to the modules cudaarithm, cudaimgproc, cudafilters, cudawarping and so on. They are only available if you add the opencv contrib repository.
Now, I was creating a program that uses cuda. Then I realized, that when building and installing OpenCV without CUDA, meaining the machine does not support CUDA and the NVIDIA cuda toolkit is not installed, the header files for the CUDA modules are not copied into the include folder when installing. This way the program doesn't compile. How do you compile a program using the OpenCV CUDA modules with a build that was built without CUDA in OpenCV 3?
Previous Version OpenCV upto 2.3 default build was with CUDA from that onwards if you want to run Opencv with cuda support you have build OpenCV from source with CUDA Check This Guide.
You must have a CUDA enabled GPU to run Opencv with CUDA. NVIDIA CUDA enabled GPU List
Ok, at least for OpenCV 3.1 it appears not to be a problem. The cuda modules have also been moved back to the main repository.
It is necessary to have a version of OpenCV compiled with CUDA. That can be done also on a machine without an Nvidia GPU. The Nvidia CUDA toolkit has to be installed (just ignore the warning message about the GPU). The graphics driver, however, is not required. This way compiling OpenCV with CUDA should not be a problem also on a machine that is not CUDA-enabled.
In your project you can then just include the cudaarithm etc. modules and perform the check if any CUDA devices are available at runtime, just like before.

CUDA installation on Windows

I installed CUDA Toolkit 3.2, CUDA SDK and MS Visual Studio 2008 (not necessarily in this order) on my Windows 7 that does not have an nvidia graphics card.
But when I try running my CUDA code, the CUDA keywords are'nt identified.
I am a beginner. Pls tell me what I am doing wrong here.
Thanks
Are you building using nvcc? If not, Visual C++ will choke on the CUDA-specific syntax.
You should be able to build the SDK samples with your setup, but you won't be able to run since you do not have a CUDA capable GPU. Emulation is no longer supported, so you have a couple of options available:
gpuocelot
PGI CUDA x86
Check out this stackoverflow post for details of syntax highlighting and more in VS2008.
Incidentally, if you installed the Toolkit before VS2008 then the rules files will not have been copied to the VS directories (clearly, since they didn't exist). You can find them and instructions in the CUDA Toolkit in the extras directory.
You if are trying to execute cuda programs on non gpu machines, I would suggest you to try mCUDA. It doesn't need GPU or Graphics card for CUDA execution.
The installation of CUDA development tools on a system running the appropriate version
 Verify the system has a CUDA‐enabled GPU and a supported version of OS.
Many [NVIDIA products today contain CUDA‐enabled GPUs][1]. These include:
 NVIDIA GeForce® 8, 9, 200, and 400 series GPUs
 NVIDIA Tesla™ computing solutions
 Many of the NVIDIA Quadro® products
 Verify the NVIDIA driver and the CUDA software.
 Update the NVIDIA driver.
 Install the CUDA software.
 Verify the the CUDA software linking With VS2008/VS2010
For that you can check my Blog Also http://hemprasad.wordpress.com/2012/10/12/cuda-installation-on-vs-2010/
Test your installation by compiling and running one of the sample programs in the
CUDA software to validate that the hardware and software are running correctly and
communicating with each other.
If you don't have a NVIDIA card, you can still use the emulator but you need to install the SDK and the toolkit. Try to fix your problem by adding in your Visual Studio project settings the include and library path of CUDA.
CUDA is only supported on machines with nVidia video cards. That is likely an issue.
Furthermore, you need to install drivers (dev or otherwise) that is new enough to support the CUDA Toolkit version.
Third, what do you mean by the keywords aren't identified? Do you mean there's no syntax highlighting in your IDE? If so, try [this][1]http://codereflect.com/2008/09/04/how-to-enable-syntax-highlighting-for-cuda-files-in-visual-studio-2005/

Resources