2012-11-05

Private Ruby gems

I have been remiss in updating this blog. Here's a quick tip about Ruby:

To install Ruby gems to your home directory rather than to the system-wide gems directory, a couple of environment variables need to by set/modified:

    export GEM_HOME=$HOME/gems
    export PATH=$GEM_HOME/bin:$PATH
 
Since our site's conversion from cfengine to Puppet, I have been wanting a sort of testing framework other than just putting things out on a test server and running a test Puppet agent against it. I found a good blog post by Patrick Debois describing a few testing methods for Puppet.

2012-07-01

Part of the Internet taken down by a leap second

As a graduate student working for LIGO (the Laser Interferometer Gravitational wave Observatory), one of my responsibilities was maintaining date-time code, including accounting for leap seconds, and calculating dates and time thousands of years in the past.

What is a leap second? Well, the Earth's rotation rate is slowing down. So, as time goes on the length of the day is longer. This rate is very slow. Every few years, the added length must be taken into account, much like the leap day takes into account that the orbital period of the Earth around the Sun is not exactly 365 days. When a leap second must be inserted is not predictable. The International Earth Rotation and Reference Systems Service is tasked with making observations of the Earth, and producing a twice-yearly report on whether a leap second is due to be added. This comes out by email, and on their website. The report gives a 6-month or so lead time before the leap second is inserted, at midnight on Jan 1 and on Jul 1.

So, apparently, a leap second was inserted last night: all standard atomic clocks around the world paused for a second. This caused all sorts of havoc with computers and networking devices, causing lots of sites to go down. Notably, Google was prepared.

(via Gizmodo and Wired)

2012-06-12

Disabling diagnostic remarks in Intel Compilers

So, I was just trying to compile R, a statistical analysis package, on RedHat EL 4 using Intel Compilers 11.1 + MKL 10.1. Unfortunately, the configure step kept barfing on a diagnostic message produced by the "-ipo" (interprocedural optimization) flag. The configure script was interpreting it as an error message when testing for certain features.

The online help for icc (the "-help" flag) does not show how to turn off IPO diagnostics. This Intel forum post gives the answer:

-diag-disable ipo
I will have more to say about compiling R with Intel and linking to the MKL later on.

2012-06-06

Fink setup for Xcode

And now, for something a little different.

I haven’t used fink and fink packages much, lately, since I now have a work-issue laptop with Linux. I just tried to install octave with fink, and it complained:
Can't resolve dependency "xcode (>= 3.1.2)" for package "gcc47-4.7.0-1001" (no matching packages/versions found)
Even after re-running fink configure, the error persisted. And I did have the latest Xcode installed from the Mac App Store. Turns out, one needs to do:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

That tells fink where Xcode resides.

I have used a Mac since grad school, when Apple introduced Mac OS X, and gave free development tools. So, I used fink to install all the open source software I needed for analysis, after being rendered unable to work several times when my Internet connection went down and my copy of Matlab could not talk to the license server. I even used it for analysis and writing papers in my postdoc.

2012-05-22

Laptop hibernate in Ubuntu 12.04 LTS Precise Pangolin

Having switched back to Ubuntu Unity/GNOME from KDE on my laptop, I discovered that the option to hibernate (i.e. suspend to disk) was disabled.
This is due to a bug in policykit-desktop-privileges. To reënable, here are instructions. You have to create (use sudo) a local policykit authority file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla and add the following stanza:
[Re-enable hibernate by default]
Identity=unix.user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
 You will probably have to log off and then back on again for it to take effect.

UPDATE: In addition, for "suspend" (i.e. suspend to RAM), you will need the apmd package. The upower and pm-utils packages are also required, but those should have been installed by default.

2012-05-21

NVIDIA Nsight Eclipse Edition

One of the new products announced along with CUDA 5 at the recent GPU Technology Conference was NVIDIA Nsight Eclipse Edition, which runs on Linux and Mac OS X. Previously, the only IDE available was Nsight Visual Studio which ran only on Windows.

I attended the demo talk for Nsight Eclipse, and it seemed a well thought out product. It gives access to all running threads on all cores, optimization suggestions, debugging interface, etc. Plus the usual Eclipse features like refactoring, build, version control. Watch the video:


Nsight Eclipse Edition is distributed as a pre-built binary, i.e. you can't just point Eclipse to a new software source. And, you have to be in the registered developer program to get access to the download.

Once you install the CUDA Toolkit, say in CUDAHOME=/usr/local/cuda, the nsight executable is in ${CUDAHOME}/libnsight.

2012-05-03

Amazon cloud computing for HPC

ArsTechnica has a nice article about the suitability of the Amazon cloud for High Performance Computing. I had linked to two previous stories about HPC clusters built on Amazon EC2. In short, Amazon EC2 tends to be better suited to embarrassingly parallel code where there is not much inter-node communication. This leaves out applications like finite-element simulations and molecular dynamics simulations. They mention R Systems which specialize in renting out Infiniband-connected clusters: Infiniband offers low latency, high speed connections.