Building PCL library with GPU/CUDA support - c++

I'm building PCL library master in Windows 8.1 using CMAKE:
All other modules are successfully built except the gpu/cuda modules!
Here is the error log
Observation:
-ccbin $(VCInstallDir)bin -> Environment Variable not set successfully. Due to that this error is Generated: '$' is not recognized as an internal or external command, operable program or batch file? I'm i right? What else could be the problem?
Note that only pcl_gpu_containers module was successfully built.
Can someone please help me fix this?
Version Details:
Microsoft Visual Studio Verison: 11 (VS Prof 2012)
cuda toolkit: 7.5
boost version: boost-1_57
eigen: 3.3
VTK Version: 6.2
PC Info:
OS Name Microsoft Windows 8.1 Pro N
Version 6.3.9600 Build 9600
System Type x64-based PC
Processor AMD FX(tm)-9590 Eight-Core Processor, 4700 Mhz, 4 Core(s), 8 Logical Processor(s)
Installed Physical Memory (RAM) 8.00 GB
Name NVIDIA GeForce GT 610
Adapter Type GeForce GT 610, NVIDIA compatible
Adapter RAM (2,147,483,648) bytes
Name NVIDIA GeForce GT 730
Adapter Type GeForce GT 730, NVIDIA compatible
Adapter RAM (2,147,483,648) bytes
Here is my CMakeCache.txt

IIRC, that issue was related to a missing environment variable setting.
On my system, this setting was missing after installing CUDA as admin, then working as non-admin user.
After fixing this, now the variables are set as follows:
CUDA_PATH =
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5
and
PATH =
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\libnvvp;
...

Related

Why does Abaqus not find my c++ compiler?

I need to use uMat and user subroutines in Abaqus.
I installed Abaqus 2020, Visual Studio 2019, Intel oneApi Base Toolkit and Intel oneApi HPC Toolkit (in this order). After successfully linking the Fortran Compiler (Intel Fortran Compiler 2021.4) with VS19 (setting all the path variables and editing the abaqus2020.bat and the abaqus_v6.env) I started Abaqus Command (as admin) and used the command abaqus verify -user .. it PASSED right away.
My main problem is: if I plug in "abaqus info=system" everything is fine except the C++ Compiler.
C++ Compiler: Unable to locate or determine the version of a C++ compiler on this
system. If a C++ compiler is installed on this system, please load vcvars64.bat
file before running Abaqus
I tried:
different versions of VS
different OS
different Processor
calling the vcvars64.bat in abaqus2020.bat
Installing third party c++ compilers (MinGW)
My current setup:
Processor: AMD Ryzen 5 3600
RAM: 32 GB DDR4 3200
Graphics: MSI NVidea Geforce GTX 1660 Ti
OS: Windows 11
Linker Version: Microsoft Incremental Linker Version 14.29.30137.0
Fortran Compiler: Intel Fortran Compiler 2021.4 MPI MS-MPI 9.0.12497.11
Error Message

eclipse for c++ development on sun solaris 10. getting gtk-warning

I want to do c++ development on sun solaris 10.0 machine. I downloaded eclipse for solaris 10 but when I run it nothing popsup and I get warnings on command line. How do I bring up eclipse IDE? also will I need any plugin in my eclipse.ini to enable c++ development? there are a whole lot of files under the /plugins directory. I am very new to unix and solaris os.
Here is my environment
cat /etc/release
Solaris 10 10/09 s10x_u8wos_08a X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
uname -a
SunOS 5.10 Generic_147441-25 i86pc i386 i86pc
This is the eclipse I downloaded
http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.6-201606061100/eclipse-SDK-4.6-solaris-gtk-x86_64.zip
This is the java version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
This is the warning message
./eclipse
Eclipse:
GTK+ Version Check
***WARNING: Gtk+ version too old (micro mismatch)
***WARNING: SWT requires GTK 2.18.0
***WARNING: Detected: 2.4.9
(Eclipse:3218): Gdk-WARNING **: gdkdrawable-x11.c:994 drawable is not a pixmap or window
(Eclipse:3218): Gtk-WARNING **: gtkwidget.c:7030: widget class GtkLabel' has no property namedlink-color'
I am using cygwin and running xwindows plugin to support popup windows.
heres the downloaded eclipse.ini. I have not made any changes to it.
vi eclipse.ini
"eclipse.ini" 13 lines, 320 characters
-startup
plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.solaris.x86_64_1.1.300.v20160518-1444
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
thanks

Can't compile Cuda samples on macbook pro 2010 [duplicate]

I am trying to install CUDA on my Mac Pro (15-inch, Mid 2009 with GPU GeForce 9400M).
I have installed from https://developer.nvidia.com/cuda-downloads the toolkit.
nvcc --version returns: ... Cuda compilation tools, release 7.5, V7.5.19
I have installed directly the driver from the package, then from http://www.nvidia.com/object/mac-driver-archive.html. Then from System Preferences > CUDA Preferences, I can see CUDA Driver Version: 7.5.25 (though the update 6.5.51 is proposed (?)).
I can compile a sample (0_Simple/asyncAPI). When I launch it, I get:
[./asyncAPI] - Starting...
CUDA error at ../../common/inc/helper_cuda.h:1111
code=35(cudaErrorInsufficientDriver)
"cudaGetDeviceCount(&device_count)"
Why this error??
The CUDA 7 release cycle removed support for compute capability 1.x devices on all platforms. This includes your Geforce 9400M.
The last version with support of those devices was CUDA 6.5. You will need to work out what XCode version will work with that CUDA toolkit and your OS version and install that instead.
[This answer assembled from comments as a community wiki entry to get this question off the unanswered queue for the CUDA tag].

OpenCL (Intel Platform) shows build error(-11) with status 0

In Intel platform and Intel SDK compiler clBuildProgram returns CL_BUILD_PROGRAM_FAILURE clGetProgramBuildInfo shows status as 0. But the AMD and NVIDIA platforms will not produce any error for the same code when building with their SDK and compiler.
The program build log is shown below
OPENCL ERROR : CL_BUILD_PROGRAM_FAILURE
Build failed; error=-11, status=0, programLog:
Compilation started
Compilation done
Linking started
Linking done
Kernel <Kernel1> was successfully vectorized
The available platforms and devices are
1. FULL_PROFILE - OpenCL 1.2 - Intel(R) OpenCL - Intel(R) Corporation
1. Intel(R) Core(TM) i5-4670 CPU # 3.40GHz - OpenCL 1.2 (Build 76413)
2. Intel(R) HD Graphics 4600 - OpenCL 1.2
Operating System is Windows 7 64 bit.
I found the problem. It is because of
#pragma OPENCL EXTENSION cl_khr_fp64: enable
if I comment this and made the double to float then clBuildProgram will return success. But by enabling this gives the output.

Getting OpenCL to work on Linux laptop with Optimus technology

I have an installation of Kubuntu 13.10 on my laptop which has an Nvidia GT555m with optimus technology. I am having some trouble getting my C++ code with OpenCL to compile.
The error I keep getting is Cannot find -lOpenCL. Doing a quick search with the GNU find utility gives me the following:
/usr/lib32/nvidia-319/libOpenCL.so.1
/usr/lib32/nvidia-319/libOpenCL.so
/usr/lib32/nvidia-319/libOpenCL.so.1.0
/usr/lib32/nvidia-319/libOpenCL.so.1.0.0
/usr/lib/x86_64-linux-gnu/libOpenCL.so
/usr/lib/nvidia-319/libOpenCL.so.1
/usr/lib/nvidia-319/libOpenCL.so
/usr/lib/nvidia-319/libOpenCL.so.1.0
/usr/lib/nvidia-319/libOpenCL.so.1.0.0
I have the following OpenCL development packages installed:
opencl-headers
nvidia-opencl-dev
I also tried the utility clinfo to see if I get any information, but I get the following error:
clinfo: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory
Does anyone have any experience setting up a Linux development environment with OpenCL on their optimus laptops?
I was under the impression that I do not need to do anything fancy to get this working.
EDIT: Ok it seems the reason I was not managing to compile was because I was mixing up headers and libraries. Using the following compiles my code well:
g++ -std=c++11 -I /usr/local/cuda-5.5/include vadd.cpp -L /usr/lib/nvidia-331 -lOpenCL
I am getting another error during runtime now (but at least I managed to compile!). The error is as follows:
ERROR: clGetPlatformIDs
-1001
From doing some research this means I probably do not have the ICD portion of nvidias toolkit installed? What I cannot understand is - where to find it!
You should install the Nvidia Cuda SDK. It contains OpenCL development libraries and includes.
You don't need development packages or libraries, (OpenCL is already there, and working, just giving you a runtime error, ICD is present). What you need is a platform ready to execute the OpenCL code, so a GPU + a driver.
You need to install the propietary driver of nVIDIA: Either by using the Ubuntu tools, or by installing the package nvidia-current.
Maybe you have to install bublebee. A library to use Cuda on Nvidia cards with optimus technology.
I do not use Kubuntu yet I got it working under Mageia release 6 Linux so I guess it should be pretty similar. In my case there were Intel and Nvidia (GeForce GTX 980M) graphic cards together in my laptop. My intention was to get running only OpenCL compiled code without any set up of Xorg graphical server.
So, as advised above by DarkZeros I did it by using only a proprietary nvidia driver (in my case downloaded from Nvidia page). Then under root user:
./NVIDIA-Linux-x86_64-375.39.run --no-opengl-files
It asked me if I wanted to modify my Xorg configuration - I said "NO". This delivered nvidia kernel modules. Next, I modified /etc/modules to let the Linux know that it should load them at start up of system (this might be different on Kubuntu)
[root#localhost ~]# cat /etc/modules
nvidia
nvidia-uvm
nvidia-drm
nvidia-modeset
and that was really it. Reboot your system and loading of modules should automatically also create correct nvidia device files under a /dev directory.
[root#localhost ~]# ls /dev/nvidia*
/dev/nvidia0 /dev/nvidiactl /dev/nvidia-uvm /dev/nvidia-uvm-tools
I've got an inspiration from [ftp://download.nvidia.com/XFree86/Linux-x86/295.59/README/optimus.html][1]