what are the necessary steps to add a gpu to an existing setup, system and installation (linux)


what are the necessary steps to add a gpu to an existing system.
the installed driver would be fine for the existing gpu already installed, and the gpu to be added.
is it only necessary to update the x-org config file? must one do more? must the driver be reinstalled?
cuda 10; fedora 29

You don’t have to reinstall the driver (assuming it supports the GPU to be added).

Power down, put the new GPU in, power up.

That’s all that is needed. Assuming your OS doesn’t automatically change your X configuration, then you only need to change your X configuration if you want to.

Thanks. Will give it a try when i receive the new card.

how do you select the device(s) you want to debug on, and want the program/ code to run on?
in the past, this was easy: i had 2 devices of different cc, so i just compiled code for the cc i wanted, and the other device automatically fell away.
i know of cudaSetDevice() and have incorporated it into the code.
i now have 2 gpus in the system, both of same cc (3.5).

previously, with only a single gpu in the system, gdb let me debug until i hit some cuda api, etc, and then gave an error. so i could debug a lot of the preceding predominantly host code.
now, gdb is giving an error on (after/ when stepping) the first program line:

Error: Failed to suspend device for CUDA device 1, error=CUDBG_ERROR_UNINITIALIZED(0x5).

device 1 is the device driving the screen.
is there a way to detach the device from the code/ execution without using cudaSetDevice() - i.e. select/ limit the appropriate device?

i am able to debug host only code without a problem. the debugger/ gdb gives an error in the first host function with a cuda api, etc

must i be using CUDA_VISIBLE_DEVICES to ‘hide’ the gpu driving the screen? and exactly how? can CUDA_VISIBLE_DEVICES be set from within eclipse at all? is it sufficient to export CUDA_VISIBLE_DEVICES from the command line before i start debugging in eclipse?


tried/ trying CUDA_VISIBLE_DEVICES, but it does not seem to solve the issue.

in the particular post you listed, user eugene says:
“You can select the device to use for debugging in Nsight preferences.”
do you know how to do this?

also, in the post you mention:
“Declare it in the session before you launch nsight EE”
what do you mean by that?

just see if i used CUDA_VISIBLE_DEVICES correctly
i exported the variable in the terminal
echo’ed the variable to make sure it was set
ran deviceQuery to note the devices (remaining)
then opened eclipse to try and debug. but i still cant get past the first cuda api. same error
only the device i want to use is listed under deviceQuery now

got it. it is under preferences->nsight.

one can set software preemption there as well

cant believe i did not see it there earlier.

will try again now

seems to work now. many thanks

yes that’s what was indicated here:


ok. seemed to have missed that.