This Open Inventor example was working fine. When I installed the new release of Cg1.2.1 and updated the Linux Driver for a GeForce FX5900 Ultra, this simple application didn't work out. Here you can check cg source code which was running well for Cg1.0(2002) and Cg1.1 (2003). I spent a couple of days trying to understand what was happening:

Hardware configuration:
- 2 Intel(R) Xeon(TM) CPU 1.7GMHz
- GeForce FX5900 Ultra
- RedHat 9.0
- Cg1.2.1 and Linux Display Driver 1.0-5336 (release date: January 26, 2004)

The strange thing was that all NVSDK's examples were working except for my little applicacion written on Open Inventor. Then I started to debug the application (gdb waveSimulator)
(gdb) run
Starting program: /a/fs/u3/users/blanco/workCSIT/nvidia/NVSDK/DEMOS/OpenGL/src/myDemos/wave.07_testing/waveSimulator
[New Thread 16384 (LWP 27213)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 27213)]
0x40746918 in cgGetString () from /usr/lib/libCg.so
(gdb) where
#0 0x40746918 in cgGetString () from /usr/lib/libCg.so
#1 0x40747909 in cgGetString () from /usr/lib/libCg.so
#2 0x4072e61f in cgiResourceToStr () from /usr/lib/libCg.so
#3 0x407327a7 in cgiSetProfileOptions () from /usr/lib/libCg.so
#4 0x40734e7c in cgCreateProgramFromFile () from /usr/lib/libCg.so
#5 0x0805c4aa in cgInitialize (argc=1, argv=0xbffff164) at waveSimulator.cxx:373
#6 0x0805cb5c in main (argc=1, argv=0xbffff164) at waveSimulator.cxx:504
#7 0x40abca07 in __libc_start_main () from /lib/i686/libc.so.6

WOW ... CgGetString from cgCreateProgramFromFile ... that is weird I tested it on another machine:

Hardware configuration:
- 1 Intel(R) CPU 2.4GMHz
- GeForce FX5900 Ultra
- RedHat 9.0
- Cg1.1.1 and Linux Display Driver 1.0-5336 (release date: January 26, 2004)

On this machine it was perfect (still with some warnings). Then, there was something wrong with the Cg1.2.1, to tell you the true, for some moments I believed that new release of Cg1.2.1 was not dealing well with multiple CPUs.

For some reason I started to clean up my code and when I checked the Cg code for this application, I realized that it was written in old version of Cg1.0. ... ta tam ... the application started to work very well on the dual CPUs.

Conclutions

- Update your Cg source code. Check here the new version.

- As you have seen, the first line: #pragma bind appin.Position = ATTR0 was wrong in my Cg source code and generated a error C5040: type of parameter "Position" incompatible with bind directive.

- Why didn't the cgc compiler (v1.2.1) complain at the execution time? However, if you compile the Cg source code on the shell command the error shows up.

- For some reason, the new Cg1.2.1 released can not handle this error on execution time. Is it a bug?