CUDA on a remote linux box

Hey there,

I was wondering if you needed X to run CUDA, and if not would the 5 second limitation still be there if the system only had one video card? I’m thinking about giving this a shot but was wondering if people already have done it.

You don’t need to run X and there is no 5 sec limitation on the console.

I have found that I need to start X and then exit it before a CUDA program will recognize the video card. And this is not because X is causing the kernel module to load, I have tried that by hand with modprobe nvidia: something else is being initialized when X loads.

There is no need to start X.
This is the script we used in the CUDA roll for Rocks, the compute nodes are not starting X but just loading the driver and making the proper entries in /dev

#!/bin/bash

modprobe nvidia

if [ “$?” -eq 0 ]; then

Count the number of NVIDIA controllers found.

N3D=/sbin/lspci | grep -i NVIDIA | grep "3D controller" | wc -l
NVGA=/sbin/lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l

N=expr $N3D + $NVGA - 1
for i in seq 0 $N; do
mknod -m 666 /dev/nvidia$i c 195 $i;
done

mknod -m 666 /dev/nvidiactl c 195 255

else
exit 1
fi

Awesome thanks guys - I’ll be setting this up probably tomorrow once I get the last bits of stuff I need off my XP partition and reformat.

[quote name=‘mfatica’ date=‘Oct 29 2007, 03:52 PM’]

There is no need to start X.

how about if I’m just starting in emulation mode on a machine that doesn’t

normally have a monitor and doesn’t have X (only has a VESA card for checking

booting problems). Can I load the nvidia module by your script without

a GPU card, and make the device nodes and then run programs in emulation mode?

Thanks Joe

you don’t need a nvidia module at all to run in emulation mode

Ah thanks. I had tried this first, but had got the message

FATAL: Module nvidia not found

and (silly me) thought a FATAL error had occured. If

I sit back then the demos start to run.

Thanks Joe