Soramichi's blog

Some seek...

Recent Posts

Dataflow Analysis to Semi-Automatically Find Chainer Bugs

published on
Preface As a system software researcher working for an (you know, one of many) “artificial intelligence research center”, I use Chainer to explore what kind of system characteristics/supports the real AI applications need. Chainer is really good for this purpose because the framework itself is really simple so it is easy to hack as you wish. Although the framework is intensively maintained, I sometimes happen to find bugs, especially when I use it in a bit different usage than normally done. Read More...

Debian 9 uses Kernel 4.9 that Supports PEBS Better

published on
Preface In the previous post I installed Debian 8 (jessie) into Thinkpad X260, but I actually changed my mind and re-installed Debian 9 (stretch), because it supports the wifi equipped in Thinkpad X260. A good thing is Debian 9 is already freezed so I can expect there’re only a few critical bugs remained (well there’re actually one to two hundreds of them as of today, but it’s relatively a small number given that it has over 40K packages). Read More...

A newbees' guide for CPU architecture names

published on
The aim of this post This post aims to be a help for computer newbees, or those who are working in the application layer but somehow have to buy a new server and install Linux on it, but are confused by those complex naming of CPU architectures (i386, x86, IA64, …). Note that this post shows which CPU “instruction set” architectures are compatible/different, but it does not step into how each “micro” architectures are different (e.g. Read More...

Installing Debian GNU/Linux 8 (Jessie) into Thinkpad x260

published on
Installing Debian GNU/Linux 8 (Jessie) into Thinkpad x260 I got a thinkpad x260 and installed Debian GNU/Linux 8 (which I also use for my desktop and servers). Here are some tips for someone (or no one?) who wants to do the same. Debian 8 with MATE in Thinkpad X260 Base Installation I basically followed normal operations. The point is to shrink C: using Windows tools and never let the Debian installer modify existing partitions. Read More...

Psuedo Type Checking in C using Struct

published on
Requirement Let the C compiler recognize two types different, even when the two are actually equivalent in terms of the size and contents. Idea Wrap each type in a struct to add type information, as a compiler recognizes two structs (even with the same size) as different. Do not actually define dummy structs, but use pointers to them to: avoid meaningless coding expect that the types are stored in registers for speedup Example typedef struct A1* a1; typedef struct A2* a2; void f(a1 p){ } void g(a2 p){ } a1 make_a1(int n){ return (a1)(unsigned long)n; } a2 make_a2(int n){ return (a2)(unsigned long)n; } main(){ a1 p1 = make_a1(0); a2 p2 = make_a2(1); f(p1); g(p2); } The code above compiles with no relevant warnings. Read More...

Let Intel Pin follow child processes

published on
Intel Pin is a very successful tool for dynamic bynary instrumentation and is used widely for program analysis (especially for analysing malicious behaviours when the source code is not available). One feature of it is FOLLOW_CHILD_PROCESS_CALLBACK, which allows a user to choose whether the instrumentation is enabled or not for each child prosess of the target program. What the documentation says is that the callback is called everytime the target program does exec (in Linux) and the callback may return true/false in accordance to whether the exec’ed child process has to be instrumented. Read More...

LaTeX and PDF Tips

published on
LaTeX and PDF Tips From the access logs it’s obvious that the latex and pdf tips page (in Japanese) is one of the most popular contents besides my profile and seems like it’s somewhat highly page-ranked by google, so I put here an English translation. Equalize the Column Heights of the Last Page flushend.sty is the most convienient way to equalize the heights of the last page of a 2-column pdf. Read More...

Linking external libraries to an apache module

published on
This is a straight translation from my qiita post in Japanese You may want to link external libraries (like libmysqlclient) when you create an Apache module. The Problem So the Makefile generated by apxs includes some stub, which is like this: # additional defines, includes and libraries #DEFS=-Dmy_define=my_value #INCLUDES=-Imy/include/dir #LIBS=-Lmy/lib/dir -lmylib Cool, so I can add -lmysqlclient to LIBS, right? But the building command executed by make does not include -lmysqlclient, event after I add it. Read More...

Citations per Article in ACM Digital Library

published on
The avarge citations per article in ACM digital library. Microsoft Research: 34.20 source Google: 27.13 source Argonne National Lab: 17.25 source Harvard: 17.07 source National University of Singapore: 11.00 source Tsinghua University: 7.63 source University of Tokyo: 7.32 source AIST: 4.75 source Note: the numbers may be biased due to the difference of main research area of each institution and many other factors, so comparing small differences like by several points can be irrelevant.

The number of European papers in SOSP and OSDI

published on
I attended The European Conference on Computer Systems (EuroSys), held at ICL in London. Presentations themselves were of course very interesting, but another thing I was interested in was the General Assembly to discuss how to improve the conference. Many points were discussed actively, but the most impressive one for me was like this (the quotes are not as-is, rather they are the output after filtered by my brain neural network): “The percentage of papers from european universites is decreasing in EuroSys. Read More...

Pin processes to specific cores in multiprocessing.Pool

published on
Pinning processes to specific cpu cores (a.k.a. cpu affinity) is important both for performance analysis and improvement. However in Python, especially when you use high-level interfaces, it is tricky to do it because Python does not support cpu affinity directly. This post explains how to pin processes to specific cpu cores when you use multiprocessing.Pool. Note: this post is only for Linux, but not for OSX. I didn’t even try it on a Mac as I don’t have one, but I doubt it works because this kind of low-level OS interfaces differ much in Linux and OSX. Read More...


chainer (1) computer (9) conference (2) cpu (1) debian (2) hack (5) latex (1) linux-kernel (1) python (1)