Friday, July 30, 2010

Getting the code out - from Academic to Open Source

I am at the IGARSS conference in Waikiki , Hawaii. It has been a busy few days. All done with my presentations today, 2 posters side-by-side are rather easy to handle. The last presentation I attended today was from Eric Pottier on PolsarPro - a very brave attempt to get academic research in polarimetric SAR processing to the non-specialist user community. He mentioned that new routines and improvements get incorporated into the platform every week, so I naturally asked about the release schedule and possible version control access. This is where the academic heritage showed up, the project in-spite of its research brilliance does not have a hard working software engineer to smooth the getting it out there process. Collation of the work from the various developers and building the final release is done manually it seems.

The folks at Rennes 1 should take a leaf out of the OTB (or even RAT) book and make collaboration easier. In the recent release the simulator that I frequently use is broken and I can't report a bug or track the changes that broke it - version control please.

PS: I created a version control for myself , only for PolSARProSim.

Wednesday, July 28, 2010

Writing Thesis - The easy way and the hard way

I wrote my PhD proposal, some 40 pages with nearly 70 references in OpenOffice. Outline numbering and Bibus based referencing worked out quite well for me. There were some tricky times with equations and such but I managed to keep it all together in the end.

Now I am facing a much larger task of writing a few hundred pages. So I started at the obvious point, adding pages to my proposal. Ideally the proposal should form the first chapter regarding background, before I delve into my core research. After 15 pages or so my outline numbering began to fall apart and I decied to look elsewhere for a more reliable solution.

So far Miktex with WinEdt has been doing the job remarkably well. The bibiliography comes in from Bibus as a management tool in bibtex format. Terms can be managed using the glossary tools - which I haven't managed to persuade into action so far. Google docs can be repurposed to be an online sandbox for the thesis with LatexLabs. Python code listings can be included using this trick. Overall all the pieces are in place to write it , now just need the words and pictures.

Sunday, July 11, 2010

Compiling OTB with CUDA - on Windows 7

I discussed some OTB-CUDA experiments that had been done with Emmanuel. The experiments tell the age old story of bandwidth pay-off versus speed. If your problem is too simple the performance gain from CUDA is not going to be much, they did one of the first tests with specifically Remote Sensing type computations of various complexity. Amdahl's law is fairly intuitive and even embarassingly parallel problems that we encounter in raster processing can not break the curse of sequential segments.

In GPGPU computing one of the core tweaks is in the kernel size and computational complexity. You don't want to be performing CPU to GPU transfers all the time for the GPU to perform a very simple operation no matter however fast, on the other hand GPU's are rather constrained in the complexity of operations they can carry out and will always need assitance from the CPU in loading data from the disk etc.

The OTB GPGPU experiment had not been extensively tested on Windows, so I decided to compile it with latest offering from Microsoft - MSVC Express 2010. As penalty for being on the bleeding edge Nvidia CUDA and OpenCL don't work on 2010, so I had to time warp back to 2008. Even then the OTB-CUDA code needs some porting due to missing timing code, may be the sample here will provide some inspiration.

Monday, July 5, 2010

Alternative power from an Alternator - figuring out wiring

I had a minor mishap with my car, a broken tail light - some angry kid smashed a bin onto it. So I went to the wreckers and picked up a tail light. They had lots of alternators on the shelf, so I got one for the power generation gym project ( stationary excercise bikes hooked up to produce electricity, instead of consuming). A pilot has already been done in HongKong along these lines.

The trick with alternators as opposed to permanent magnet brushless motor I used in the past is that the field windings for the alternator need to be excited with a battery before it can produce enough power to be self exciting. This switchover can be done in theory using an Arduino to monitor the voltage levels, or something smarter to send the produced voltage out to the net.

Also exciting  was LAM-MPI based processing once I figured out how to give separate hostnames to machines booting from the same NFS root image. Here is a script that makes use of the /etc/hosts file in the NFS root to assign separate hostnames to slave nodes.

ipaddr=$(/sbin/ifconfig eth0|grep 192.168|sed "s/.*addr://"|sed "s/\sBcast.*//")
host_name=$(cat /etc/hosts|grep $ipaddr|sed "s/[0-9\.]* //")
sudo hostname $host_name


Here is another option for automatic hostnames. Ideally it should be run after the system completes booting or as part of the ssh profile to change the hostname, so that when LAM-MPI starts the lock-files etc do not conflict. More alternate naming the better.

PS: Here is a very useful link for newer alternators

Friday, July 2, 2010

Taking Fiji Head On - Snorkelling and Playing Chicken

All the islands of Fiji have a collective population just below 1 million, this makes for a rather scenic and empty country in spite of its small size.

Day 1 was more like night 1, we arrived exhausted at 4pm. Had dinner on the beach at First landing resort in Vuda point. Next door is a Marina owned by a famous surfer. The Fijian apparently first arrived here and they have built something akin to a foot with sand to mark this.

Day2 was Sunday and everything seems to be closed. We borrowed a car and went off to play chicken ... Er for a drive down the Queen's Highway towards Suva. The highway goes all around the island, but is unfinished in some of the north-east. Fiji seems like sugarcane island from the highway. We strolled around the relatively new Intercontinental in Natadola, rode around in horses and dashed off to Sigatoka. Making a run to Suva seemed pointless at the end of the day, with deteriorating light and people tailgating and overtaking at 110km/h inspite of national speed limit being 80km/h. Finally dinner was at the steak house in Denarau, while checking out the boats which take people out on cruises to the smaller islands.

Day3 we hopped onto a refurbished english tall ship with Captain Cook Cruises. We were back after a remarkable day of snorkelling, shouting at a snake (possibly tiger snake) and the first Kava ceremony for the tour. Dinner again at a Fijian restaurant at Denarau.

Day4 was another trip back to Sigatoka and a bumpy ride upriver to Cannibal caves. We rafted across a very shallow river, silted up and prone to flooding. Water comes upto the waist if you walk in it. We were guided by a member of the Fijian cricket team into a limestone cave featuring a natural cannibal oven.

Day5 went past before we noticed, most of it was spent in the pool and the aeroplane. That's what happens when you plan holidays 1 day before hopping on a flight.