Stochastika
Stochastika

Reputation: 305

Nsight 5.0 on MacPro lion 10.7.4

I'm new to CUDA dev and I'm using NSight 5 on a MacPro.

I'm doing a very simple simulation with two particles (ver1 and ver2 here, which are two structs that have pointers to another type of structs – links)

The code compiled but seems to run into problem when reaches the end of this block, and never stepped into the integrate_functor():

...    
thrust::device_vector<Vertex> d_vecGlobalVec(2);

d_vecGlobalVec[0] = ver1;
d_vecGlobalVec[1] = ver2;

thrust::for_each(
    d_vecGlobalVec.begin(),
    d_vecGlobalVec.end(),
    integrate_functor(deltaTime)
);
...

So my questions are:

  1. In NSight, I can see the values of member variables of ver1 and ver2; but right before the last line of the code in this block, when I expand the hierarchy of d_vecGlobalVec, I can see any of these values - the corresponding fields (e.g. of the first element in this vector) are just empty. Why is this the case? Obviously, ver1 and ver2 are on Host memo while the values in d_vecGlobalVec are on the device.

  2. 2.

A member of the NSight team posted this.

So following that, in general, does it mean that I should be able to step in and out between host and device code, and be able to see host/device variables as if there is no barrier between them?

System:

NVIDIA GeForce GT 650M 1024 MB

Mac OS X Lion 10.7.4 (11E2620)

Upvotes: 0

Views: 68

Answers (1)

Eugene
Eugene

Reputation: 9474

Make sure your device code is actually called. Check all return codes and confirm that device actually worked on the output. Sometimes thrust may run the code on host if it believes it is more effective.

I would really recommend updating to 10.8 - it has the latest drivers with the best support for NVIDIA GeForce 6xx series.

Also note that for optimum experience you need to have different GPUs for display and CUDA debugging - otherwise Mac OS X may interfere and kill the debugger.

Upvotes: 1

Related Questions