Siyuan's Blog

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

Fixing a strange GRUB related filesystem error

I’m running a dual-boot desktop system with Fedora 28 and Windows 10. Today a strange error happened to my GRUB2 installation. This post documents how I fixed the error. Here is what happened: I was installing the Logitech software for my mouse in Windows because I need it to tune a new mousepad. After installation completed, it asked me to reboot the system. I did that and when the system boots up again, the normal GRUB boot menu didn’t appear.

Mixing C and C++ code

C and C++ are two closely related programming languages. Therefore, it may not come as a surprise to you that you can actually mix C and C++ code in a single program. However, this doesn’t come automatically when you write your code the normal way. In this blog post, I will describe what makes it possible to mix the two languages and how to achieve that in code. C and C++ linkage When you compile a source file, the function names are mangled.

Linux shared folder management done right

If you’ve ever collaborated with someone on a Linux machine or worked as a system administrator on a multi-user Linux system, chances are you’ve set up shared folders for groups of people to share data. It’s quite easy on Linux. Well, kind of. I mean, you can simply create a group, add relevant users in, and set the shared folder’s owner and permission correctly. However, this approach has a problem: new files and directories created inside a shared folder doesn’t inherit the owner and permission of the shared folder itself.

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.