Siyuan's Blog

Read(); Think(); Try(); Repeat();

Vertex-centric graph processing: the what and why

Vertex-centric graph processing is a new programming abstraction/model for writing graph algorithms. I got to know vertex-centric graph processing because my final year project is centered around this topic. I find it to be an interesting idea that enables large-scale graph processing with ease. In this post, I would like to talk about what vertex-centric graph processing is and why it is useful. What is vertex-centric graph processing? Vertex-centric graph processing, as the name suggests, is a new programming abstraction for processing graphs that is centered around the vertices.

NVIDIA GPU ID enumeration in Linux

I’ve been working on a server with 3 NVIDIA GPUs for my internship work. A few months ago, I noticed that the GPU IDs are different in different situations for the same GPU. Therefore, I decided to take a look at how the IDs are enumerated. What is the issue exactly? There are potentially two different GPU ID orders that we can get from nvidia-smi and the CUDA library. Below demonstrates two different ID enumeration schemes observed on the server.

I/O buffering mechanisms in C/C++

Today I was fixing a bug for the logger in a project that I’m currently working on. The bug is that when the process is killed or it crashed, the logger sometimes doesn’t write all the logs into the log file with the fprintf function call. I knew this is an I/O buffer problem, but I didn’t know too much about how to control it and what are the I/O buffering modes besides flushing the buffer every time.

Migrating to a new Mac

I recently bought a new MacBook Pro 13-inch (2017, w/o TouchBar) to replace my aging MacBook Air 13-inch (mid-2013). My old machine only has 4GB memory and 128GB SSD, and it’s slowing things down sometimes. When I was setting up my new Mac, I decided to have a fresh install of macOS. This allows me to think about what should be migrated from an old Mac to a new Mac.

Linux-like key binding in iTerm 2

I work regularly on both Linux and Mac. When I work in terminal on Linux, I use the Alt key very often. Alt is the prefix of many terminal shortcuts and I also use the Alt key in tmux to switch between panes within a window. This key, however, behaves differently on Mac. In this post, I will describe how to have Linux-like key binding in iTerm 2 for the Alt key.