Cuda without geforce

Hello!

I’m a student of applied maths who’s starting to play with cuda in order to learn his capabilities…

i have a notebook:

http://h10010.www1.hp.com/wwpc/us/en/sm/WF…95-3254425.html with ubuntu 8.04

without a CUDA gpu, but from what i understood CUDA should be able to emulate one, therefore the note should plenty fits my needs of learner…

I followed the direction on the site, although not being able to install the nvidia driver, and following the readme i launched make to start compiling the examples, but the follow error occurred:

cleo@ubuntu:~/NVIDIA_CUDA_SDK$ make

make[1]: Entering directory `/home/cleo/NVIDIA_CUDA_SDK/common'

mkdir: cannot create directory `obj': Permission denied

make[1]: *** [makedirectories] Error 1

make[1]: Leaving directory `/home/cleo/NVIDIA_CUDA_SDK/common'

make: *** [lib/libcutil.so] Error 2

cleo@ubuntu:~/NVIDIA_CUDA_SDK$ sudo !!

sudo make

make[1]: Entering directory `/home/cleo/NVIDIA_CUDA_SDK/common'

ar: creating ./../lib/libcutil.a

a - obj/release/bank_checker.cpp_o

a - obj/release/cmd_arg_reader.cpp_o

a - obj/release/cutil.cpp_o

a - obj/release/stopwatch.cpp_o

a - obj/release/stopwatch_linux.cpp_o

a - obj/release/multithreading.cpp_o

make[1]: Leaving directory `/home/cleo/NVIDIA_CUDA_SDK/common'

make[1]: Entering directory `/home/cleo/NVIDIA_CUDA_SDK/common'

In file included from ./../common/inc/paramgl.h:13,

 Â  Â  Â  Â  Â  Â  Â  Â  from src/paramgl.cpp:8:

./../common/inc/GL/glut.h:59:19: error: GL/gl.h: No such file or directory

./../common/inc/GL/glut.h:60:20: error: GL/glu.h: No such file or directory

In file included from ./../common/inc/paramgl.h:13,

 Â  Â  Â  Â  Â  Â  Â  Â  from src/paramgl.cpp:8:

./../common/inc/GL/glut.h:433: warning: ‘glutUseLayer’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:433: error: variable or field ‘glutUseLayer’ declared void

./../common/inc/GL/glut.h:433: error: ‘GLenum’ was not declared in this scope

./../common/inc/GL/glut.h:491: error: ‘GLfloat’ has not been declared

./../common/inc/GL/glut.h:491: error: ‘GLfloat’ has not been declared

./../common/inc/GL/glut.h:491: error: ‘GLfloat’ has not been declared

./../common/inc/GL/glut.h:492: error: ‘GLfloat’ does not name a type

./../common/inc/GL/glut.h:496: warning: ‘glutGet’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:496: error: ‘GLenum’ was not declared in this scope

./../common/inc/GL/glut.h:497: warning: ‘glutDeviceGet’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:497: error: ‘GLenum’ was not declared in this scope

./../common/inc/GL/glut.h:504: warning: ‘glutLayerGet’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:504: error: ‘GLenum’ was not declared in this scope

./../common/inc/GL/glut.h:518: warning: ‘glutWireSphere’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:518: error: variable or field ‘glutWireSphere’ declared void

./../common/inc/GL/glut.h:518: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:518: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:518: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:519: warning: ‘glutSolidSphere’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:519: error: variable or field ‘glutSolidSphere’ declared void

./../common/inc/GL/glut.h:519: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:519: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:519: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:520: warning: ‘glutWireCone’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:520: error: variable or field ‘glutWireCone’ declared void

./../common/inc/GL/glut.h:520: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:520: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:520: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:520: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:521: warning: ‘glutSolidCone’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:521: error: variable or field ‘glutSolidCone’ declared void

./../common/inc/GL/glut.h:521: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:521: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:521: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:521: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:522: warning: ‘glutWireCube’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:522: error: variable or field ‘glutWireCube’ declared void

./../common/inc/GL/glut.h:522: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:523: warning: ‘glutSolidCube’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:523: error: variable or field ‘glutSolidCube’ declared void

./../common/inc/GL/glut.h:523: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:524: warning: ‘glutWireTorus’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:524: error: variable or field ‘glutWireTorus’ declared void

./../common/inc/GL/glut.h:524: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:524: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:524: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:524: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:525: warning: ‘glutSolidTorus’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:525: error: variable or field ‘glutSolidTorus’ declared void

./../common/inc/GL/glut.h:525: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:525: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:525: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:525: error: ‘GLint’ was not declared in this scope

./../common/inc/GL/glut.h:528: warning: ‘glutWireTeapot’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:528: error: variable or field ‘glutWireTeapot’ declared void

./../common/inc/GL/glut.h:528: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:529: warning: ‘glutSolidTeapot’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:529: error: variable or field ‘glutSolidTeapot’ declared void

./../common/inc/GL/glut.h:529: error: ‘GLdouble’ was not declared in this scope

./../common/inc/GL/glut.h:539: warning: ‘glutVideoResizeGet’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:539: error: ‘GLenum’ was not declared in this scope

./../common/inc/GL/glut.h:579: warning: ‘glutGameModeGet’ initialized and declared ‘extern’

./../common/inc/GL/glut.h:579: error: ‘GLenum’ was not declared in this scope

src/paramgl.cpp: In function ‘void beginWinCoords()’:

src/paramgl.cpp:12: error: ‘GL_MODELVIEW’ was not declared in this scope

src/paramgl.cpp:12: error: ‘glMatrixMode’ was not declared in this scope

src/paramgl.cpp:13: error: ‘glPushMatrix’ was not declared in this scope

src/paramgl.cpp:14: error: ‘glLoadIdentity’ was not declared in this scope

src/paramgl.cpp:15: error: ‘glutGet’ cannot be used as a function

src/paramgl.cpp:15: error: ‘glTranslatef’ was not declared in this scope

src/paramgl.cpp:16: error: ‘glScalef’ was not declared in this scope

src/paramgl.cpp:18: error: ‘GL_PROJECTION’ was not declared in this scope

src/paramgl.cpp:21: error: ‘glutGet’ cannot be used as a function

src/paramgl.cpp:21: error: ‘glutGet’ cannot be used as a function

src/paramgl.cpp:21: error: ‘glOrtho’ was not declared in this scope

src/paramgl.cpp: In function ‘void endWinCoords()’:

src/paramgl.cpp:28: error: ‘GL_PROJECTION’ was not declared in this scope

src/paramgl.cpp:28: error: ‘glMatrixMode’ was not declared in this scope

src/paramgl.cpp:29: error: ‘glPopMatrix’ was not declared in this scope

src/paramgl.cpp:31: error: ‘GL_MODELVIEW’ was not declared in this scope

src/paramgl.cpp: In function ‘void glPrint(int, int, const char*, void*)’:

src/paramgl.cpp:39: error: ‘glRasterPos2f’ was not declared in this scope

src/paramgl.cpp: In function ‘void glPrintShadowed(int, int, const char*, void*, float*)’:

src/paramgl.cpp:48: error: ‘glColor3f’ was not declared in this scope

src/paramgl.cpp:51: error: ‘GLfloat’ was not declared in this scope

src/paramgl.cpp:51: error: expected primary-expression before ‘)’ token

src/paramgl.cpp:51: error: ‘glColor3fv’ was not declared in this scope

src/paramgl.cpp: At global scope:

src/paramgl.cpp:46: warning: unused parameter ‘color’

src/paramgl.cpp: In member function ‘void ParamListGL::Render(int, int, bool)’:

src/paramgl.cpp:108: error: ‘glColor3fv’ was not declared in this scope

src/paramgl.cpp:110: error: ‘glColor3fv’ was not declared in this scope

src/paramgl.cpp:122: error: ‘GL_LINE_LOOP’ was not declared in this scope

src/paramgl.cpp:122: error: ‘glBegin’ was not declared in this scope

src/paramgl.cpp:123: error: ‘glVertex2f’ was not declared in this scope

src/paramgl.cpp:127: error: ‘glEnd’ was not declared in this scope

src/paramgl.cpp:130: error: ‘glRectf’ was not declared in this scope

make[1]: *** [obj/release/paramgl.cpp_o] Error 1

make[1]: Leaving directory `/home/cleo/NVIDIA_CUDA_SDK/common'

make: *** [lib/libparamgl.so] Error 2

cleo@ubuntu:~/NVIDIA_CUDA_SDK$ cd bin

cleo@ubuntu:~/NVIDIA_CUDA_SDK/bin$ ls

cleo@ubuntu:~/NVIDIA_CUDA_SDK/bin$

maybe is that the emulator is only for windows, therefore linux users have to have a geforce card?

thank you

You seem to be missing some OpenGL things that are needed (they are installed with the driver)

Anyhow, using emulation mode can get you to run things, but emulation mode does not simulate a GPU. So any race conditions you may have, will pop up once you try to run on a real GPU. Emulation mode is also very slow, but CUDA 2.1 will have a multicore target which should be fast.

I ran into the same thing at some point - and thought “What?! why do I need sudo to run make? This is wrong!” My problem was that I had installed the SDK as root, which is wrong. It should be installed as your normal user.

The other problem you have is that you are missing some opengl stuff. try executing
sudo apt-get install build-essential libglut3-dev -y
That should install the OpenGL stuff you need, and all the dev tools in case you hadn’t already installed them.

And also, to run in emulation mode, you need to run make with an extra flag, like this:
make emu=1
The make command you executed will try making it to run on the GPU.

There is a full guide for setting up CUDA here, maybe that will help you out getting started. Good luck!

great!!!

it’s a pity that nvidia didn’t wrote a starting guide like with windows… it makes me wonder on the real support nvidia will give to linux…

Anyhow someone mentioned CUDA 2.1? when is it coming out?

Actually Linux is the best supported platform with CUDA. Sorry to say so, but making these kinds of statements in your second post on the forum will in general not get you a lot of help.

googling ‘GL/gl.h: No such file or directory’ gives you the solution immediately. There are distributions where these headers are installed by default, so it is mainly a distribution problem.

NVIDIA is in general very quiet about these things, I believe I heard a rumor that it would be well in 2008.

sorry it’s just that being a linux user i have a bad memories on the NVIDIA/ATI support of my favorite os… anyhow i didn’t mean to be offensive or arrogant, i apologize. I’m really committed to make CUDA (or GPGPU) a better platform for us all, and i’ll try using all the knowledge that a math degree brought to me.

Yeah i had past memories since Matlab has the same problem while using surf or symbolic toolbox… I was looking forward having a solution like forcing the installation of Nvidia driver to have the same libraries… In fact Nvidia usually ship a custom version of gl… And i found a very useful blog on CUDA… So this post was a nice gain definitely :D

That probably sounded more harsh than I meant. What I tried to do was prevent you from making the mistake I made. When I started with CUDA I had been reading LKML for 10+ years, so I was fearful of the evil binary driver. So when my new expensive machine crashed randomly, the first thing I did was go on this forum blaming the NVIDIA driver. After loosing a lot of time (and I think I probably acted as an ass), it turned out to be the MB/Proc…

And after meeting some people from NVIDIA working on CUDA, I can tell you there are a lot of Linux fans among them, so you can feel at home here :)

interesting… can i know which mp/proc was giving issues?

because i’m going to buy a new CUDA system and i don’t want to have your same problem :D

I had bought a Dell XPS720H2C with dual 8800GTX. So I think that is not available anymore. I hope so, because MB&Proc have been replaced twice already…

It used to be in the mid to late 90’s that ATI had excellent support for Linux and I bought only ATI cards for that reason. I am however, since about 5 years ago, using only NVIDIA cards. They are fast and in my opinion their Linux support is excellent. If you had used Linux 10 to 15 years ago (I use it since 1992), you would certainly appreciate the support that NVIDIA provides for Linux. In the mid-90s I had to write my own drivers for certain hardware to be able to use it.