Hi Durga,
Sorry for the late reply and thanks for reporting that issue. As Rayson
mentioned, CUDA is intrinsically C++ and indeed uses the host C++
compiler. Hence linking MPI + CUDA code may need to use mpic++.
It happens to work with mpicc on various platforms where the libstdc++
is
On Mar 20, 2016, at 9:23 PM, Gilles Gouaillardet
wrote:
>
> Durga,
>
> since the MPI c++ bindings are not required, you might want to
> mpicc ... -lstd++
> instead of
> mpicxx ...
I'm not sure I'd recommend that. Using the C++ compiler may do other
On Sun, Mar 20, 2016 at 10:37 PM, dpchoudh . wrote:
> I'd tend to agree with Gilles. I have written CUDA programs in pure C
> (i.e. neither involving MPI nor C++) and a pure C based tool chain builds
> the code successfully. So I don't see why CUDA should be intrinsically
Thanks Eric,
that makes sense now.
Durga,
since the MPI c++ bindings are not required, you might want to
mpicc ... -lstd++
instead of
mpicxx ...
Cheers,
Gilles
On Monday, March 21, 2016, Erik Schnetter wrote:
> According to the error message, "device.o" is the file
I'd tend to agree with Gilles. I have written CUDA programs in pure C (i.e.
neither involving MPI nor C++) and a pure C based tool chain builds the
code successfully. So I don't see why CUDA should be intrinsically C++.
>From the Makefile (that I had attached in my previous mail) the only CUDA
According to the error message, "device.o" is the file that causes the error.
According to the source code to which you point, this file is
generated from a Cuda file, not from a C file. Cuda is close to C++,
and apparently nvcc makes use of C++ features. Thus you need the C++
run-time libraries.
I am a bit puzzled...
if only cuda uses the c++ std libraries, then it should depend on them
(ldd libcudaxyz.so can be used to confirm that)
and then linking with cuda lib should pull the c++ libs
could there be a version issue ?
e.g. the missing symbol is not provided by the version of the c++
Durga,
The Cuda libraries use the C++ std libraries. That's the std::ios_base
errors.. You need the C++ linker to bring those in.
Damien
On March 20, 2016 9:15:47 AM "dpchoudh ." wrote:
Hello all
I downloaded some code samples from here: