Window 32 and 64 bit installations. how to go around?

I am working on a 32/64 bit windows app that I am extending to use CUDA. My development environment is visual studio 2009
Since most 32 bit window applications work fine under windows 64,
I do not have a native 32 bit OS in my system, I only have Vista 64 in one system and XP 64 in the other.
The biggest problem I am having is that the installer for the CUDA SDK 32 bit libraries can not coexist with the installation for 64 bit.
This make it very complicated to have one project file for both 32 and 64 bit since one of the target will not find the dependencies libraries.

If anyone had a similar problem, can you please tell me how you when about solving it?
I you do not then maybe someone form video can tell me how to install both 32/64 bit SDKs in the same system.
If this is not possible at this time,
May I suggest that for eth next version of CUDA SDKS,
the Installer for the 32 bit system be independent of the Installer for the 64 bit system, and the way we will not have to decide between one of the two.

Please repend if you know how to go around this problem.
Julio

Hi Julio,

Since Nvidia doesn’t help here, maybe we can do this together. I’m having a similar problem:

http://forums.nvidia.com/index.php?showtopic=91006

Question: so you tried the 32 bit SDK (v2.1) on Vista x64 and it worked? Did you have the x64 driver (181.22?) on your machine and the 32-bit version of the toolkit?

I’m CONTEMPLATING the following (assume the x64 driver must be on a 64 bit machine):

  1. Make a backup copy of the installed 64-bit toolkit folder (eg, named C:\CUDA64)

  2. Do the same with the folder that contains the SDK (eg named “Nvidia Corporation 64”)

  3. Uninstall both toolkit and SDK, install the 32 bit version of SDK and toolkit.

  4. Now you should have everything set up for win32

  5. To switch to 64bit develoment envoronment, rename C:\CUDA to C:\CUDA32, “Nvidia Corporation” to “Nvidia Corporation 32”, and C:\CUDA64 to C:\CUDA, “Nvidia Corporation 64” to “Nvidia Corporation” and reboot. The env vars should now point to the 64 bit files. To switch back, “reactivate” the 64 bit files in the same way, then reboot.

The concern I have is this procedure potentially messing up the registry, resulting in an unstable system? What do you think?

I meant To switch back, “reactivate” the 32 bit files in the same way, then reboot.

the other option may be the CUDA Wizard? :wacko:

wow, it sounds a little contrived, but I gets I have no other choice.
My only concern is with newer updates of the SDK.
I will try this weekend, and see if it works.

I do not understand why Nvidia do not address this issue since it seems so simple to make two independent installers.
I believe that more than 99.999% of the people using windows64 still developed for 32 bit, and this is a real nuance.
I guess this is when we say never look on the mouse of a gifted horse.

CUDA wizard what is that, and how can that help since this is a installation problems, how a wizard can make a project to use and SDK that is not installed. Have you tried?

I actually just tried this myself:

  1. Make a backup copy of the installed 64-bit toolkit folder (eg, named C:\CUDA64)

  2. Do the same with the folder that contains the SDK (eg named “Nvidia Corporation 64”)

  3. Uninstall the 64 bit SDK, then the 64 bit toolkit with the unistallers (All Programs>Nvidia Corporation>…), install the 32 bit version of toolkit then the SDK.

  4. Now you should have everything set up for win32

Tested the precompiled 32 bit SDK examples, everything works great (maybe the Mandelbrot is a bit slower in 32bit).

HOWEVER, sorry to report, but compiling the 32 bit examples (even the template) failed with

LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’

so I switched back to x64

  1. To switch to 64bit develoment envoronment, rename C:\CUDA to C:\CUDA32, “Nvidia Corporation” to “Nvidia Corporation 32”, and C:\CUDA64 to C:\CUDA, “Nvidia Corporation 64” to “Nvidia Corporation” and reboot. The env vars should now point to the 64 bit files. To switch back, “reactivate” the 64 bit files in the same way, then reboot.

Voila, compiling the 64 bit sample works again. At least you should have both 32 and 64 bit toolkits and SDK on your system at this point.

I also tried the 32bit CUDA VS wizard 2.0 ( http://forums.nvidia.com/index.php?showtopic=80572&st=60 ) which is supposed to set VS2005 up to create CUDA projects, that worked but didn’t compile either (at least not in 64 bit mode, I’ll try switching to 32 bit mode but I doubt it…)

So at this point it confirms what I thought, compiling 32 bit targets on a x64 machine doesn’t work. Maybe VS2005 is missing the 32 bit compiler or something, my install has for sure the MS cross-compiler. Yeah, I can’t understand either why Nvidia is not integrating this better with Visual Studio. A lot of people are looking for this to work better.

Guess what… switching to 32 bit mode did do the trick in conjunction with the 32bit CUDA VS wizard 2.0, only caveat is that cutil32.dll needs to be put in the same directory as the compiled console application, see http://forums.nvidia.com/index.php?showtop…60&start=60. So at this point the wizard for 64 bit should work also (feel free to try and let me know).

So, let’s see what we have now:

  1. Both 32 and 64 bit SDK and toolkit on the same x64 Vista machine

  2. can compile 64 bit CUDA apps (tried with 64 bit SDK template, likely the Wizard will work also TBD)

  3. can compile 32 bit CUDA apps with the Wizard (but not 32 bit SDK template)

  4. Problem solved (the quick and dirty way)!

I’ll use a script/.bat to do the “switch” between 32 and 64 bit CUDA dev environment (btw, the 64 bit CUDA toolkit folder is larger, 55MB vs 51MB for the 32 bit if you get mixed up) and post a clean writeup of the dual-target setup procedure later…