Re: [OMPI devel] CUDA kernels in OpenMPI

2017-01-30 Thread Chris Ward
I added the following lines to my 'Makefile.am' in the directory with the CUDA sources .cu.lo: /usr/local/cuda/bin/nvcc -gencode arch=compute_60,code=sm_60 -O3 --cuda -c $< mv -f $*.cu.cpp.ii $*.ii libtool --mode=compile $(CXX) $(CXXFLAGS) -c $*.ii and added the CUDA so

Re: [OMPI devel] CUDA kernels in OpenMPI

2017-01-27 Thread Sylvain Jeaugey
Hi Chris, First, you will need to have some configure stuff to detect nvcc and use it inside your Makefile. UTK may have some examples to show here. For the C/C++ API, you need to add 'extern "C"' statements around the interfaces you want to export in C so that you can use them inside Open MP

Re: [OMPI devel] CUDA kernels in OpenMPI

2017-01-27 Thread Dmitry N. Mikushin
It's hard to tell without complete makefile example. Could you please post a minimal reprocase? Note specifically for OpenMPI there is a tricky workaround. You can use nvcc as mpicc compiler by exporting OMPI_CC=nvcc and wrapping out incompatible compiler options. Kind regards, - Dmitry Mikushin.