Welcome to my personal blog. If you're looking for my academic profile page, click the UCD in the upper right corner. Or maybe you're looking for my open source development blog?

Goodbye 2014, Hello 2015

31 Dec 2014 / Filed under Diary

As I sit here sinking into sleepiness on the last hour of the last night of 2014, I thought I’d spend a bit of time to reflect.

I was very fortunate to have had safe trips to three countries this year. It was hectic at times, and I want to thank my friends who put up with me – you know who you are. I think I’m actually a frustrating person to be around sometimes, especially when things are hectic, but it’s great to have friends who understand and can help pull me out of that.

I think I’ve gained some real perspective in this year. I think part of it has to do with moving into Nina’s geometry lab. Having a cube to come to and work regularly with others gave me some much needed regularity in my daily routine.

Actually, the regularity of weekday workdays isn’t enough, and I always felt disconnected when work ends at the end of the day or the big context swap happens during the weekend. I think the big change for me seems to be a sense of awareness of time that I got from traveling. Somewhere, someone is working. I’m about to go to sleep, but in Europe, the day is just beginning. Once I wake up, my friends in east Asia will be winding down for bed.

It might sound stupidly obvious, but I feel more aware that time is continuous. Because of this, I feel like I’m mentally in a much more wakeful state, and I’m much more deliberate with how I spend my time. I’m waking up pretty early on a regular basis, probably somewhere around 6. I’m happy about this because I can really divide the day into three evenly weighted chunks delimited by meals where I can get things done.

It’s probably too late to get to sleep before the fireworks go off, but I should go. Maybe sleep with white noise playing through the earphones. I want to see the sunrise tomorrow. I’ll post part 2 of this blog with my resolutions. For now, enjoy these photos highlighting my 2014. Thanks for the memories.

PBS server setup

14 Oct 2014 / Filed under Guides

In the IDeA Lab, I’ve worked with the cluster they maintain there for batch processing of hundreds of MR images. They make use of PBS, where you can add your batch scripts to a queue and have it be assigned to run on a node when available. We now have PBS set up in my lab as well, and here’s a summary for Debian-flavored setups.

Setup

  1. Setup NFS. Ubuntu wiki [1] is a good starting point - we take the first 4 steps from their MPI guide.

    1. Set up hostnames in /etc/hosts.
    2. Install the packages.

       sudo apt-get install nfs-server nfs-client    
      
    3. Set up the mount on master.
    4. Set up the mount on nodes.
  2. Setup TORQUE server - the ArchLinux guide [2] is very up-to-date can be followed directly.

Troubleshooting

It took a while to figure out that the TORQUE software that is packaged with Ubuntu 14.04 is version 2.4 or so, which is much further behind the latest offering by the people at Adaptive Computing who put out the software. So monitoring the logs in /var/spool/torque/server_logs/ and tooling around with the server_priv/nodes configuration, I found that the gpus attribute wasn’t supported and had to remove it in order for the nodes to be created.

Usage

  1. Put code and input data on the NFS share.
  2. Write a bash script to call code with input data as command-line arguments.
  3. Enqueue the script with different arguments.
  4. The nodes run and spit out results on the NFS share.

The thing about running scripts with PBS is that it runs and captures stdout/stderr to the home directory on the node that the job is dispatched to by default. This can be changed by setting some PBS metadata in the script, like so:

#!/bin/bash
# This means redirect stdout here instead -- this is on an NFS share
#PBS -o /mirror/logs/o${PBS_JOBID}.out
...

You’ll also notice there’s a PBS_* variable – that’s another thing with PBS scripts: you have access to some special environment variables [3].

Conclusion

So NFS does funny things if UID/GID are inconsistent across your nodes, but there was a mention on Ubuntu Wiki that you can set it up so that this isn’t an issue. I actually manually reset UID/GID to make NFS work before I realized this, but I will report back on this when I get this ID mapping to work.

Our lab setup is mostly uniform with Ubuntu 14.04 installs except for a stray box that runs Linux Mint. This was tricky because compiling dependency libraries and putting them on NFS required using the oldest common gcc version (4.6). I still don’t know how to make CMake pull in all dependent libraries on installation as it does when you create a distributable bundle on OS X, but at least it works if you stick all your libraries on the NFS to begin with.

The next step for my research is to pile on the data on the NFS and set it running. I still have to set up a few things on the nodes and maybe create an alternate queue that assigns fewer nodes because one of the command-line utilities runs for tens of minutes on average, takes up a lot of memory, and can potentially run off and crash, so it would be rude to use up everyone’s cores during the day with that nonsense.

  1. https://help.ubuntu.com/community/MpichCluster
  2. https://wiki.archlinux.org/index.php/TORQUE
  3. https://wiki.hpcc.msu.edu/display/hpccdocs/Advanced+Scripting+Using+PBS+Environment+Variables

Blog organization

11 Oct 2014 / Filed under Diary

To avoid making this redundant with the GitHub Pages blog that I have on alextsui05.github.io, I’ve decided to use GitHub Pages for reporting on my plans and progress on open source projects. The blogs are similar in that they are outlets for me to write about things that I learn and want to talk about. The blogs will be different in that the focus of the GitHub Pages blog will be strictly related to my open source projects and open source involvement.

Hacked on the Shiori theme, which is what you see as of this post. Added some pagination. I wish it was easier in Jekyll to swap themes. Maybe it will get easier when I learn more.

Hello World

10 Oct 2014 / Filed under diary

Hello, I’m going to try to publish my own blog rather than use a hosted Wordpress.

I’ll be back soon.

← Older

Newer →

Alex Tsui

Alex Tsui

Computer science grad student at UC Davis, writes C++, enjoys learning languages, and occasionally video games.