Monday, November 30, 2009

Cuda 2.2 / Visual Studio 32-bit to 64-bit suckiness.

I have been working with nVidia’s Cuda SDK to speed up execution of my Monte Carlo photon transport simulations.

However, after the switch to 64-bit Win7, I’ve discovered that the 32-bit programs that I compiled previously don’t run in Win7 64-bit, even though WoW is supposed to let you run 32-bit programs in the 64-bit OS.

To make matters worse, I can’t get the 64-bit version of the Cuda 2.2 Toolkit and SDK to recompile the programs in 64-bit in Visual Studio 2008 (64-bit).

This is going to take some time to sort out. Grrr…

Visual Studio 2008 and nVidia CUDA.

I had to search for this again to configure Visual Studio 2008 to play nicely with CUDA.

For those who aren’t familiar with CUDA, it is a framework from nVidia that allows you to write programs in C to harness the extreme parallel processing processing power in modern GPUs for computation.

Anyway, this blog has some nice tips on how to get syntax highlighting, building and Intellisense in Visual Studio 2008 to work with CUDA source files.

http://www.bv2.co.uk/?p=730

Saturday, November 28, 2009

Print to OneNote 2007 / Win7 64-bit workaround with SnagIt.

Running a 64-bit OS means that all my technical computing programs have access to much more memory than previously in a 32-bit OS. And Windows finally can see all 4GB of RAM in my laptop.

But Microsoft requires all the device drivers to be 64-bit as well, which unfortunately broke the ever-so-useful “Print to OneNote” feature that came with Office 2007.

One solution is from OneNote guru David Rasmussen who has developed an open source workaround called XPS2OneNote:

http://xps2onenote.codeplex.com/

However, for some reason this failed to work on my computer.

I’ve discovered that SnagIt, another little program that I bought some time ago, also has a virtual printer that you can send output to from any program.

Then you can easily route these printouts into OneNote by using the SnagIt / OneNote output accessory which is available here:

http://www.techsmith.com/snagit/accessories/onenote.asp

Although it is not free, SnagIt also allows you to perform some cool graphical edits and annotation before sending the content on its way to OneNote. Info on SnagIt can be found here:

http://www.techsmith.com/

Friday, November 27, 2009

DRM sucks and only punishes people who play by the rules.

I have been rebuilding and reinstalling programs on my computer the last two days and I’ve run into digital rights management problems twice already!

The two programs that complained are Adobe Creative Suite 3 Standard and Mindjet MindManager 7.

In both cases, reinstalling the program and trying to activate it resulted in errors indicating that I had tried to install the programs too many times.

In the case of CS3, you get two activations so that you can install it on two different computers,  but in my case I guess that it counted both Vista (my original OS) and Win7 32-bit (the upgraded OS that died). I rebuilt my system with Win7 64-bit which set the counter over the limit.

You can deactivate one copy before moving it to another computer, but that is hard to do when your OS fails before you can deactivate CS3. And now I can’t even install the second copy because it has counted the same computer THREE times.

MindManager is even more limiting with only one activation available. And I couldn’t find any way to deactivate it from the menus within the program.

Anyway, in both cases I was able to call customer support, explain the situation and then activate the programs on my rebuilt computer.

Still, it feels wrong that I had to pay a lot of money to have the privilege of running into these DRM problems, while someone who “found” torrents of these programs wouldn’t have to deal with the DRM at all.

What happens when these programs become abandonware in this age of planned obsolesce?

Will these companies still stand by their part of the license agreement to provide you with working software when these products aren’t supported anymore?

Programmers need to make a living and be paid, which is why I buy software, but DRM is not the solution.

Upgrading Comsol 3.5a from a non-administrator Win7 account.

I ran into a problem installing the Comsol 3.5a hotfix to my installation of Comsol Multiphysics.

Basically, the symptoms are the following:

I followed the online instructions for installing the hotfix:

  • Download the update35a2_win64.jar file
  • Move it in to the COMSOL35a\updates directory
  • Run Programs > COMSOL 3.5a > Tools > Install COMSOL Update from the start menu using “Run as Administrator”.

I then ran Comsol to check the version number. But to my frustration it always displayed version 3.5.0.603 instead of the updated 3.5.0.608.

However, Comsol running from an admin account would display the correct version number 3.5.0.608.

I tried copying Users\<username>\.comsol\ver35a\preferences.ini from the admin account to the standard account, but it kept getting replaced with the old version of the file upon launching Comsol in the standard account.

The solution I found was the following:

  • Temporarily give my non-admin standard account admin privileges by going to Control Panel > User Accounts and Family Safety > User Accounts > Change your account type
  • Run the update install tool using “Run as Administrator” and choosing the now-admin “standard” account
  • This is very important - run Comsol once using “Run as Administrator” and choosing the now-admin “standard” account
  • Close Comsol and take away admin privileges from the “standard” account

Running the update program from an admin account is pretty standard, but I think the key is then to run the program once using admin privileges.

I guess the update program only stages the changes so that the next run of Comsol can execute the changes. Or something like that.

This fix works for me. Good luck!

Wednesday, November 25, 2009

Computer crashes and whatnot.

Some of you may recall some months ago when my Vista computer was struck dead by the dreaded "Black Screen of Death" (KSOD to you technically inclined). If you Google around the Internet, you'll see that KSOD seems to be a relatively common failure, thought to be caused by a number of different issues but all of which result in a catatonic, non-functioning computer.

Like most things in life, it felt worse while it was happening than reflecting on it now, and in the end, I was able to fix it and even got my system into a better state than it was previously, being forced to stop my normal hectic life in order to recover, tidy up and get rid of dunnage in my computer.

Unfortunately, KSOD struck again this past weekend, and even the otherwise wonderful Windows 7 was not immune. It happened after what I thought was a rather innocent "chkdsk /f" to fix errors on my hard drive but resulted in it deleting perfectly good permissions in the NTFS file system access control list and leaving me with a dead computer.

Only this time, I don't have a good backup... more on this later. Ironically, I ran the disk checker in an attempt to fix my backup problem.

So once again, I am forced to stop the busy planning, running around, doing and yes, procrastinating in order to put back my computer into a working state.

Taking a step back to reflect on the situation, however, I can make two related observations. The first is how much of all the things I consider to be important in my life resides in that little digital homestead that is my computer. And the second is how much of my own identity and happiness I've permitted to be tied up to these material things.

Anyway, my new hard drive should be arriving by post anytime now and then I can start the lengthy process of reinstalling and reconfiguring Win7 and all my applications. Luckily, since KSOD results in a non-booting computer but doesn't actually delete data, ultimately I will not have lost much except for a lot of time and perhaps some pride.

It's also a good opportunity for me to install the 64-bit version of Win7, which I chose not to do previously coming from a 32-bit Vista system because I would have to reinstall all my programs. I guess I have time to do that now.

So anyway, some notes for people who have encountered KSOD and are frantically searching the Internet for solutions...

On KSOD causes and solutions:
A lot can be found on Google with the search terms "KSOD fix chkdsk". There seem to be a number of different causes including corruption of RPC server permissions, registry permissions, Event Log permissions and chkdsk-related permission corruption. This is a good page that describes a number of them with possible solutions:

http://social.technet.microsoft.com/forums/en-US/itprovistadesktopui/thread/193b7008-ce4b-4d03-acc3-b8d7ffe610d5/

Both times in my case (Vista and Win7), I believe that the KSOD was caused by chkdsk going haywire. In the Vista case, my computer had blue screened and crashed, and after restarting the system, Vista ran the mandatory chkdsk because "Windows wasn't shut down properly". In the Win7 case, I started "chkdsk /f" myself. Both resulted in chkdsk "Replacing invalid security id with default security id for file " and corrupting the ACL. Both cases ended up with KSOD upon reboot.

Microsoft has a hotfix for similar symptoms in Windows Server 2003, but not for Vista or Win7:

http://support.microsoft.com/kb/831374

I don't know if this is the same issue, but it doesn't specifically mention Vista or Win7 and probably isn't compatible.

Althought the resetting file permissions post near the end of the KSOD thread on social.technet.microsoft.com matched my symptoms and seemed promising, it didn't work for me and I couldn't get past the KSOD.

Also, because the file permissions are messed up, I still couldn't get access to the files after putting the hard drive in a USB enclosure and connecting it to a Vista system. I got arond this by booting into UBCD4Win/BartPE, which runs a modified XP system and doesn't enforce ACL. I suppose you could get Vista to read the hard drive by turning off UAC or trying to Take Ownership of the files, although I didn't try this myself.

On hard drives:
I ended up buying two drives - a 1TB Seagate FreeAgent Desk external USB hard drive, and a 500GB Western Digital Scorpio Blue laptop hard drive.

The FreeAgent drive is fantastic. It seems reliable so far and the industrial design is beautiful. I love how the white LED pulses through the perforated metal cover when the drive is in use. Stunning! And the power adapter is small and comes with both exchangable UK and EU plugs.

I bought the WD Scorpio Blue hard drive because it was available quickly and seems to be the default workhorse model that most people buy - dependable and robust.

Originally, I wanted to get a drive with a shock sensor built in, like the Seagate Momentus 5400.6 (ST9500325ASG), the Momentus 7200.4 (ST9500420ASG) or the WD Scorpio Black (WD3200BJKT). Seagate drives with the G-Force sensor end in "ASG" and WD drives with the freefall sensor end in "BJKT".

Long story short - nobody seemed to have any of the sensor-enabled drives in stock except the 7200.4, but a quick Google of "Seagate 7200.4 click problem" reveal that this drive might have a serious design fault.

On Backup solutions:
I have used both Aronis TrueImage and Rebit backup solutions.

While Acronis offers more features and capabilities, I never could discipline myself to make regular backups often enough to matter. Also, only the 2010 version supports Win7, although if you search the Acronis forums, it appears that Win7 users are having problems with restoring backup archives.

Rebit is meant to turn a USB hard drive into a backup appliance that you plug in to your computer and forget about it, like Time Machine for OS X. However, I never could get it to work right, although the second copy I bought for a friend works brilliantly for them. One suggested solution by Rebit to troubleshoot the system is to perform a chkdsk /f on the host drive...

Anyway, this post is much longer thatn I wanted, but I hope my experiences help those of you who found this page by searching for KSOD. In the end, none of the "quick" solutions worked for me and I am reinstalling my system and working on having better backups.

Good luck! Your data probably is fine and with a little peserverance, you'll be back up and running in no time. Take care.

Friday, November 20, 2009

Turn on the Bluetooth Radio before upgrading to Windows 7.

Recently, I upgraded my Dell laptop to Windows 7 and I have been quite pleased with the new OS. Microsoft has made numerous performance and usability tweaks that make the overall Windows experience much nicer and more streamlined in general.

One problem I’ve had with the upgrade though is that Bluetooth support broke.

I forgot to turn on the Bluetooth radio before uninstalling the driver and upgrading to Win7, and Windows did not properly detect the hardware and install support for it.

However, I discovered that in order to turn on the radio, I needed a driver to talk to the hardware. But the original Vista driver refused to install under Win7.

So I was stuck up the proverbial creek without a paddle.

Fortunately, after a little searching with Google, I found this little Dell utility to switch on the BT radio, and although it didn’t specifically mention compatibility with my specific laptop model or with Win7, it worked fine for me.

Dell Support – R159805.exe: http://tinyurl.com/2ybqo6

After running the utility, Windows 7 immediately detected the hardware and rushed off to find and install the Microsoft Bluetooth drivers. After a reboot, everything works perfectly now, better than it did before with the original Dell / Widcomm Vista drivers, I might add.

So if you are having problems with Windows 7 detecting your Dell Wireless 355 Bluetooth 2.0 + EDR hardware, try this little utility and see if it helps.