Saturday, April 20, 2013

Linux Migration Discovers Windows Bugs

Okay, they were my bugs, but Windows lets me get away from them, and Linux won't. If you've examined my code, you know that I have organized it pretty much per Racket convention, with a directory named "Private" trying to hide some of the messy details. Private, with a capital "P".
When I first tried to run my old code on my new Linux setup, I suddenly got file not found errors when clearly, the files could be found. But Racket was looking in "private", with a small "p".
At first, I attributed this to some weird Windows/Linux file system quirk, invoked when I cut and pasted my "Source" directory tree from my old Windows drive to my new Linux drive, and Windows two-tiered file name system was mapped onto Linux' straightforward one.
It was not a Windows/Linux quirk, but a Racket implementation choice and my hidden typo.
Under the hood running in Windows, Racket uses the short file names, the old xxxxxxxx.yyy format, which is case insensitive. I had a nested require statement that used "private" instead of "Private", and the error had been quietly ignored under Windows, but of course not in Linux.
The nested part was especially vexing, because I had required the same file in the module I was working on, without the typo. Thus the error seemed mysterious, and Racket's long, long, long error trace hid the nested attempts to require the same file.
I found the issue in Linux by using the grep command, and what a joy it is to have the Linux tools at my fingertips again (yes, Windows implementations exist, but I always found them a royal pain).
Anyway, since making the migration early this week, things are progressing nicely now that I'm not banging my head against the OS every 20 minutes with another BSOD. The code at GitHub is current, and even runnable! Errors in calculated velocities are on the order of 8% of free stream, and lift coefficients are within 0.1 of the correct ones (which sounds large, but that's only about a 1 degree error in angle of attack; I'm hoping that Cl vs Cm and Cl vs Cd will look pretty good).
Next, pitching moments.

No comments:

Post a Comment