Numba: can't locate cuda libraries - anaconda

I'm trying to take advantage of cuda with my gtx 1080 on windows, I installed cuda toolkit 10 from nvidia website and set up the environment variables using this tutorial on medium: tutorial
However' when I ran numba -s command on anaconda prompt I got the following message:
Finding cublas
ERROR: can't locate lib
Finding cusparse
ERROR: can't locate lib
Finding cufft
ERROR: can't locate lib
Finding curand
ERROR: can't locate lib
Finding nvvm
located at C:\Users\Nimrod Naim\Anaconda3\DLLs\nvvm64_32_0.dll
finding libdevice for compute_20... ERROR: can't open libdevice for compute_20
finding libdevice for compute_30... ERROR: can't open libdevice for compute_30
finding libdevice for compute_35... ERROR: can't open libdevice for compute_35
finding libdevice for compute_50... ERROR: can't open libdevice for compute_50
Found 1 CUDA devices
id 0 b'GeForce GTX 1080' [SUPPORTED]
compute capability: 6.1
pci device id: 0
pci bus id: 7
Summary:
1/1 devices are supported
thus cuda won't be enabled using numba.
Can you please help me solve that problem?
Thanks!

for cublas : sudo apt-get install cuda-cublas-[version]
nvidia-smi give the cuda version.
Other libs were installed by default (cuda 10-2 for me). Otherwise, packages are named like cuda-cusparse-[use completion to see available version, take the good one : ex: sudo apt-get install cuda-cusparse-10-2]
Same problem now, solution:
put those lines in ~/.profil :
export NUMBAPRO_CUDALIB=/usr/local/cuda/lib64
export NUMBAPRO_LIBDEVICE=/usr/local/cuda/nvvm/libdevice
export NUMBAPRO_NVVM=/usr/local/cuda/nvvm/lib64/libnvvm.so
(note that cuda here has the path /usr/local/cuda/, correct if needed)

Related

Error while installing Boost MPI on macOS

I'm trying to install boost mpi from boost 1_78_0 on macOS, but I'm getting this error:
error: Unable to find file or target named
error: '/mpi//mpi'
error: referred to from project at
error: 'libs/mpi/build'
I've tried various different entries in my project-config.jam:
using mpi ;
using mpi : /Users/nick/sfw/openmpi-4.1.2/bin/mpicxx ;
and putting the mpi bin directory in my PATH. I've run ./b2 with debugging output and it looks like my mpicxx is being used, but I'm still getting the error. I've installed this successfully many times on linux using the using mpi directive without a problem.
thanks.

How can I find libstdc++.so.6?

I'm trying to build Android project on my 64-bit kubuntu linux and encountered the error
message:
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory.
running apt-get install libstdc++6 told me that this library is allready installed on my machine and its up to date. Now I'm trying to find out where it is so I could update my path and tell adb where to look for it.
Tried ;/$ find libstdc++6 and which libstdc++6 and they both failed to find it.
A similar question suggests to use bash in order to find libstdc, but it implies
the library is under \usr\lib which is not my case. I tried "ls \usr\lib\std* " and got "No such file or directory" as a reply.
What else should I do?

Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk

I'm trying to install rpy2 for Python3 with the following command:
easy_install-3.2 rpy2
This gives a few warnings and an error:
warning: no previously-included files matching '*patch*' found anywhere in distribution
warning: no previously-included files matching '*diff*' found anywhere in distribution
warning: no previously-included files matching '.hg' found anywhere in distribution
no previously-included directories found matching 'dist'
gcc-4.2 not found, using clang instead
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
Please check your Xcode installation
build/python3_rpy/rpy/rinterface/_rinterface.c:51:10: fatal error: 'signal.h' file not found
#include <signal.h>
^
1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
The file /Developer/SDKs/MacOSX10.6.sdk seems to be missing even though I have xcode 4.5.1 installed.
There is no file called MacOSX10.6.sdk in the "Downloads for Apple Developers" on the Apple home page. What do I do?
Ps. It all works well if I do not specify python3.
What is happening is that python was built with a pre-4.3 version of Xcode where the tools and SDKs were installed in /Developer. This is no longer the case with Xcode 4.3 where the tools and SDKs are part of the Xcode.app bundle. It also looks like python was compiled using gcc rather than clang.
I would recommend dumping the installation of python3 you have and installing it via macports, which will use the latest Xcode to build its ports and will therefore be able to compile additional python modules.
Once you have installed macports, simply do:
$ sudo port install python33
There is also a good chance those python modules can be installed by simply doing:
$ sudo port install whizzopymod
EDIT: Scratch that last part as macports doesn't have rpy2 for python3. You'll have to continue using easy_install I guess.

easy_install M2Crypto failing on Windows platform

I am attempting to install M2Crypto on a Windows XP platform. I have Python, easy_install and SWIG installed, but when I attempt to easy_install M2Crypto I get the following:
SWIG\_m2crypto.i(31) : Error: Unable to find 'openssl\opensslv.h'
SWIG\_m2crypto.i(45) : Error: Unable to find 'openssl\safestack.h'
SWIG\_evp.i(12) : Error: Unable to find 'openssl\opensslconf.h'
SWIG\_ec.i(7) : Error: Unable to find 'openssl\opensslconf.h'
error: Setup script exited with error: command 'swig.exe' failed with exit status 1
I have read elsewhere that people have suggested easy_install openssl-devel, but that simply tells me that there are no packages found with that name. Is the name perhaps case-sensitive (I've tried various permutations without success), or does that advice not apply to Windows?
I'm not looking for alternatives to M2Crypto. I am picking up some existing code that uses it, so I need to get my development environment to be able to run what's already written.
As jay stated in his answer you should try to build it from source. And I tried. The setup.py does not recognize the --openssl option. Looking at the output from the default setup.py I realized that the search location was c:\pkg and not c:\pkg\openssl.
The solution:
Download and install OpenSSL from Win32 OpenSSL
Copy the lib and include folders to c:\pkg
Check that swig.exe is available in your path
Run easy_install M2Crypto
Worked for me like a charm.
Had a similar problem. After downloading the source package of M2Crypto and reading the INSTALL file I found the following:
Differences when installing on Windows
--------------------------------------
Before building from source, you need to install OpenSSL's include files,
import libraries and DLLs. By default setup.py assumes that OpenSSL include
files are in ``c:\pkg\openssl\include``, and the import libraries
in ``c:\pkg\openssl\lib``. As with other platforms, you can specify a different
OpenSSL location with --openssl option to build_ext command.

Error building openssl-sys crate on Windows

I am trying to compile a Rust program on Windows, but I get this error message:
Compiling openssl-sys v0.6.4
failed to run custom build command for `openssl-sys v0.6.4`
[...]
failed to execute command: The system couldn't find the specified file. (os error 2)
Is `gcc` not installed? (see https://github.com/alexcrichton/gcc-rs#windows-notes for help)
--- stderr
thread '<main>' panicked at 'explicit panic', C:\Users\User\.cargo\registry\src\github.com-0a35038f75765ae4\gcc-0.3.12\src\lib.rs:510
Cargo compiled every other package without problem, but it can't compile the openssl package.
I searched for help with this specific error and found a github issue for hyperium. The first answer references the openssl building guide for Windows.
I don't understand exactly how I have to build openssl in Windows. I installed MinGW and added the bin path to the global PATH variable, so gcc is reachable, but this did not solve the error.
I use Rust 1.2 and Cargo 0.4.0. My project is an example for a Telegram API wrapper.
1) Download ssl
Installs Win32 OpenSSL v1.0.2d
Install it here: C:\OpenSSL-Win32,C:\OpenSSL-Win32\include,C:\OpenSSL-Win32\lib
2) Install MinGW,and add system env path ,,C:\MinGW\bin,important,MinGW's installed path contain char 'MinGW '
3) cmd run env OPENSSLLIBDIR=C:/OpenSSL-Win32/lib OPENSSLINCLUDEDIR=C:/OpenSSL-Win32/include cargo build

Resources