My Personal Info


Technical Tips

  • Emacs outline mode
    1. enter outline mode: M-x outline-mode
    2. hide the body of all entries: C-c C-t
    3. reveals all hidden material: C-c C-a
  • run a program on a specific CPU core: schedtool -a 0x1 -e Program ( 0x1 means CPU0, 0x2 means CPU1, 0x4 means CPU2)
  • build llvm gold plugin
    1. download binutils source code package, llvm source code package, and llvm-gcc frondend executable package
    2. build gold from binutils source code package with configure options --enable-gold --enable-plugins, and use to replace ld in the bin directory
    3. build llvm from llvm source code package with a configure option --with-binutils-include=/path/to/binutils/src/include
    4. unzip llvm-gcc frondend executable package
    5. copy /path/to/llvm/install/lib/ to /path/to/llvm-gcc-frontend/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/
    6. add all executable directories to PATH
    7. add /path/to/llvm/install/lib to LD_LIBRARY_PATH and export it
    8. call llvm-gcc -O4 -c to generate bit-code objective files, and call llvm-gcc -use-gold-plugin to do link-time optimizations and generate the final executable

  • cache info is in /sys/devices/system/cpu/cpu0/cache/index0. "cpu+(a number)" is for a specific physical thread. "index+(a number)" is for a specific cache like L1 data/inst cache or L2 unified cache.
  • the sizeof() information
N-bit machine void* char int unsigned int long unsigned long long long unsigned long long float double long double
32 4 1 4 4 4 4 8 8 4 8 12
64 8 1 4 4 8 8 8 8 4 8 16

  • how to (re)start ssh server: sudo /etc/init.d/ssh restart
  • how to output a single LLVM bitcode file:
    llvm-gcc -O4 -c xxx1.c -o xxx1.bc
    llvm-link xxx1.bc xxx2.bc ... -o yyy.bc
    opt -std-link-opts yyy.bc -o zzz.bc
  • run matlab without gui: matlab -nodesktop, then input run SCRIPT in the matlab console.
  • run SPEC CPU2006 workloads: source cshrc; runspec 462.libquantum -D -i test -n 1
  • redirect stdout and stderr to different files in C shell: (prog > output) >& errors
  • llvm build debug version: do configure with --disable-optimized or do make with ENABLE_OPTIMIZED=0
  • llvm control flow graph generation: llvm-as < XXX.ll | opt -analyze -view-cfg; dot -Tps2 >; ps2pdf
  • use etags to do tagging recursively: find . -name "*.[chCH]" -print | etags -
  • use screen command: screen (create a screen); ctrl+a d (detach the screen); screen -r (get a screen back); screen -list (show all available screens)
  • check disk usage: du -h --max-depth=1 .
  • set SMTP server for Thunderbird: Edit -> Account Settings -> Outgoing Server (SMTP), set Server Name to, select use name and password, input your gmail address, do NOT use secure authentication, set Connection security to SSL/TL
  • GPU Computing in URCS
  • How to create an Eclipse project with existing code
  • Mercurial: The Definitive Guide
  • C++ Programming Style Guidelines
  • MPI Tutorial
  • Linux Shell Scripting Tutorial
  • JikesRVM
Edit | Attach | Watch | Print version | History: r29 < r28 < r27 < r26 < r25 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r28 - 2011-05-05 - XiaomingGu
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback