title: How to force single threaded execution?
body: <p>I want to execute a program only in a single thread. Naturally, this program uses the OpenMP library to run multi-threaded, but for some debugging purpose, I want to have multi-threading disabled.</p>
  
  <p>Is there an option in <code>gdb</code> or maybe on <code>ld.so</code>-level to dynamically link only to a dummy OpenMP-library that gives reasonable behaviour to omp calls (e.g. <code>omp_get_num_threads</code> will always return <code>1</code>) but doesn't start more than one thread?</p>