Saturday, May 30, 2009

Climate Model on a Mac #15: Watch those dynamic libraries!

I recently upgraded my PGI compiler to version 8, and I had tons of trouble getting the climate model to compile and run. In this case, I decided to switch from mpich 1.2.7 to OpenMPI, on the hopes it would be better for the system and easier to set up.

However, nothing linked properly. If the software compiled, then it would have tons of MPI related errors. As a rule, I install all the libraries needed to run the model in the /opt directory, since it's easier to have more than one version of various libraries (different versions, different compilers, 32 vs 64 bit, etc), so I didn't think there could be a conflict in the libraries.

As it turned out, however, one of the MPI solutions still was getting installed in the /usr directory. On a mac, this can be a big problem because the macos goes for dynamic libraries in the usual places before loading anything in /opt. Hence, I was compiling for OpenMPI, but the OS was loading either mpich, OpenMPI without fortran support, or 32 bit instead of 64. The results of which are not pleasant.

The upshot to solving this problem is that I might be able to get the GCC/g95 solution to run the model instead of the Portland compilers. I'm happy with the portland compilers, but they're expensive to keep current. So, it's time to give it another go!

Wednesday, May 27, 2009

My first iPhone app: rejected by the app store! Annoying, but...

I spent part of my morning fuming because my iPhone app was rejected. What made it worse was that it was rejected for false reasons. What made me a little more crazy was that there was no clear way to email whomever rejected the app a nastygram!

After I calmed down, I realized my reaction was in part because of all the other questionable rejections from the App Store. Moreover, I pondered how on earth they made the assumptions they made...

They rejected the app because when the app attempts to get data from the network, and the network is not active, there is no warning about the lack of connect. The annoying thing about this is that the application DOESN'T GET DATA OVER THE NETWORK! It doesn't use the network internally at all. All of the data is stored within the app.

Of course, after I calmed down, the obvious question arose, "why did they think that the data came over the network?" Looking at the screen shots they sent me suggested that what really happened is that they set some sort of search criteria (it's a database app) that resulted in no records being selected. Looking at what the screen showed when no records are selected was a little vague and could be interpreted that the data came over the network - it should have been clear that there were no records selected. Okay, my bad. I also decided to add alerts where a user should know there were no selected data, and when flipping a switch might cause such a selection problem.

Grr, now I have to wait another week to see if they let me in.

Monday, May 18, 2009

Cocoa in CBS' Numbers

In the final episode of Numbers on CBS, Apple's Cocoa language appears on screen. Amita is kidnapped and forced to hack into a bank. On occassion, her code appears on screen and it's clearly Objective-C! Aside from the standard Objective-C notation, [object method], there are clear Apple Cocoa classes and methods, such as NSArray and addSubview. Not only that, but the code is available online!

See Safari Books Online!

So, it's not only Cocoa, but it's iPhone code!

I'm used to Apple hardware spotting on TV, but this is my first Cocoa spotting.

Update: As it turns out, the link above will get you to the right section, but does not display the source code. If you do a search on "// recover switchview" you'll then find the source code.

Friday, May 01, 2009

Doh! My first hard drive failure in my Drobo!

It had to happen sooner or later. One of my hard drives in my Drobo failed yesterday.






As a rule, failures like these happen when there's a deadline looming. The deadline in this case is a talk my wife is giving tomorrow. Much of the imagery and data she needs are on the Drobo. The promise of the Drobo is that it should still be accessable even though a drive is out or during the rebuilding process. However, in this case, something about the rebuilding and the OS screwed up. Not only did the drobo become unavailable, the Finder on the OS locked up. As you can see from the screenshot above, the Drobo Dashboard is still working so I'm not messing with a reboot or anything until that completes. The OS itself seems quite functional under the Finder - it's just the Finder is locked up and cannot be forced quit. This is probably something related to how I set up my system rather than a failure of the Drobo or its software, but we'll see. Anyway, if there's anything else wrong with the rebuild, I'll post it here.

One thing I didn't see anywhere is how to figure out how the drive has failed. I need to look into this.

This all brings me back to the issue of adding drives in a cost-effective manner. Now that I have a dead drive, I have a choice to make. 1) Leave the bay empty, 2) Replace the drive with the smaller drive I removed earlier, or 3) buy a new drive.

Option 1 is a tolerable solution. Even with the loss of the drive, I would have a fully protected system with almost a half-terabyte free. The only issue is that there's not enough space for a rebuild should another drive fail; the data would be protected until such an event, but no rebuilding would be possible until a new drive is added.

Option 2 is tolerable as well. I can reinsert the 320 gig drive into the drobo and it would bump me back up to about 2 tb of useable space. However, at this point, the 320 might be better use as a backup drive that I store elsewhere. It's not large, but it would be good as a backup drive.

Option 3 is my preferred option, but will probably have to wait. At this point, if I'm going to add a new drive, I'd prefer the largest drive that I can afford, at least 1.5 TB. Although only 1 TB would be usable, rather than the full 1.5, it will allow some room to grow when the drobo fills up without having to buy at least 2 drives at a time. Maybe a WD green 1.5 TB drive....

Sunday, April 19, 2009

My Drobo: A few months in...

Well, I've had my drobo for a while now. I really have no complaints on the hardware; it works as expected and works well. I do have issues, however.

My first issue is my own behavior. I sometimes fail to RTFM. In this case, it was the part of the manual on formatting. I simply formatted the drobo from Disk Utilities. If I had RTFM, I would have learned that the standard format was for 2 TB volumes - if you stick more available space in the system, you'd get multiple volumes. The drobo can be formatted to anticipate a volume of 16 TB, which would have made more sense to me. The drawback to this format is slower boot times, but I'm okay with that. In any case, it's simply a matter of reformatting the drobo and start over. Unfortunately, I have the older USB 2.0 drobo and offloading the data took at least a day (and some struggling to find the disk space). Now, the drobo is reformatted and I've started the process of moving all the data back! ugh! take my advice, if you get a drobo, RTFM.

The second issue I'm having is planning my capacity. Now, Data Robotics provides a nice tool to help you plan your space, called the Drobolator. My current drobo has 2 1 TB drives, 1 500 GB drive, and 1 320 GB drive. That gives me about 1.6 TB of usable disk space. However, I wanted to add space to the system so I started trying to figure out the most cost-effective approach. It's not so easy. In a pure cost-per-gig view, I should buy 1.5 TB seagates. However, if I bought only one, the cost per gig went up considerably because the drobo would only 1 TB of space, rather than 1.5 TB. This is because size of the largest drive has to be eliminated from the total capacity for data protection should it fail (e.g. if you have 3 1 TB and 1 1.5 TB and the system was full, you'd be protected even if the largest drive failed since the system would use only 3 TB of the 4.5 TB). Based on the fact a 1.5 won't get me anywhere, I went with a WD green 1 TB drive (cost $10 more than a similarly sized seagate, but supposedly uses less power). Now this set up leaves me with 1 500 gig drive. This drive, when it comes time to replace it, makes more sense to swap with a 1.5 TB+ drive. At this point, the costs go way up (depending on how long you wait). Any drive I swap into the drobo now must be the largest capacity of all the existing drives, not just equal to the largest. If I swapped the 500 gig for a 1 TB, I'd get an additional 500 gigs of capacity. If 3 total TB available is enough, that's not a problem. But what happens if I need another 500 gig later? If all 4 drives are 1 TB, I'd have to replace a minimum of two drives: the first would become the largest drive defining the space for protection, and the second would then provide the available new storage. Try that on the drobolator, 4 1 TB drives and swap one with a 1.5 or 2 TB drive. At current prices, then, to add 5oo GB to a drobo of 4 1 TB drives would cost about $260, a shift from 11 GB/$1.00 to 1.9 GB/$1.00. That doesn't include of the cost of pulling out the 2 1 TB drives.

I have to wonder whether at this point it's better just to buy a second drobo and use the working drives you pulled out of the old drobo when you upgraded. Maybe, maybe not. I do tend to use hard drives for backups that I keep in undisclosed locations. If they are full, then I don't have any drives available. Of course, I could use a drobo for that purpose instead of simple drives. I'll have to consider my options if and when my drobo starts running out of space again.

Friday, April 10, 2009

Quick Review: Kindle on iPod Touch

The Kindle application (Amazon) for the iPod touch brings the printed word to the iPod. Amazon has a great store for buying electronic books at making them available for the iPod. The question I had was: would I even consider reading a book on an iPod (or an actual Kindle for that matter)?

Once I installed the app, I took the plunge by stocking up on free books. Many public domain and some more current titles are available for free. And of those books, I wanted to read a book with and author and subject that was unfamiliar to me for something new. So, I tried "Persuader" by Lee Child. It has positive reviews on amazon (and apparently a very positive review by Newt Gingrich).

Of course the real question here is not whether the book is good, but did I read it? The answer is "Yes". Reading is surprisingly easy. The iPod Touch's Kindle interface was easy to use and ledgible. The number of words on a given page wasn' t large, so there's a lot of "flipping", but that's okay. I didn't have to fumble with a booklight. I didn't have remember where I put the book. I didn't have to make space to bring it with me. If I had a spare moment, I could pull it out and read a little. In many cases, a real book is a more satisfying experience (you can even get real book autographed), but there are also other considerations. For example, what to do with a book when you're done? I admit I'm a packrat when it comes to books, which is one of the reasons I don't read as much - I have to do SOMETHING with the book when I'm done. The Kindle experience allows you to delete you copy and allow you to download it again some other time if you want. So, the kindle approach will make its way into my life.

Now, the question becomes, will I ever BUY a kindle book?

Sunday, March 22, 2009

First hands-on experience with the iPod Touch

Well, I finally pulled the trigger on getting the ipod touch to start software development. I wanted to get it before starting development work so I could begin to understand how the interface, and system limitations, work.

I have to say that, initialially at least, I'm a little happier with the iPod that I expected. I never really had any hands-on experience with the iPod touch or iPhone, so I really didn't know what to expect in terms of user experience. The exception is that I'm a long-time mac user/developer.

I found that the interface is easier to use than I anticipated. So much easier, in fact, my two-year-old figured out how to use it only watching me for a few minutes (yes, I'm aware that the iPod and a 2-year old might not mix well). The keyboard was easier to use than I expected as well. I heard a number of complaints, and yes, I do make frequent errors (I have big fingers), but I'm surprisingly quick after only a day.

Some issues really cropped up in the UIs of some apps. For example, a free car simulator placed the steering control right next to the home button, and I kept kicking myself out of the game!

The most disturbing thing for me is the quality of the graphics of the system. The problem is that the graphics are surprisingly good - it's simply amazing that this thing fits in my hand. Of course, as a developer who doesn't have good design skills, this is a worry - the system sets up high expectations that I might not be able to reach on my own.

This software model for the App Store is also simply amazing. My neices all have Nintendo DS systems - about $130 retail (far cheaper than my iPod). The DS, which is probably safer to use for younger kids, is limited by the cartridge approach (yuk - I had to deal with that on my Intellivision back in the 80's). The App Store model provides tons of free apps (both useful and entertaining) you simply wouldn't get with the DS approach. Not to mention the difficultly around christmas time to find the desired cartridge that's been discontinued. Add to that the power (admittedly limited) of the internet on the iPod, the DS looks pale in comparison, at least from my adult eyes.

I just worry that I'm jumping in too late. Sure, I can expand out to Android and Palm Pre when it comes out, or maybe into the windows mobile marketplace. However, given that many of the niches are already filled, and my searching the app store suggests that small targeted apps might have trouble being seen, gives me a little concern.


The only thing to do is get on the diving board and take the plunge - right after I get my current programming work done!!