Profiling

  1. Use tools like Shark or Gperftools.

  2. Code spends most time evaluating bimolecular association. Large complexes may increase time spent breaking apart complexes.

  3. Install Gperftools:

  1. On Ubuntu:

  1. apt-get install libunwind8-dev

  2. apt-get install libtool

  3. git clone https://github.com/gperftools/gperftools.git

  4. sudo apt-get install dh-autoreconf

  5. ./autogen.sh

  6. ./configure

  7. make

  8. sudo make install

  9. sudo ldconfig

  1. Install kcachegrind or qcachegrind for output visualization:

  1. On Ubuntu:

  1. sudo apt install kcachegrind

  2. sudo apt-get install graphviz gv

  1. On macOS:

  1. brew install graphviz

  2. brew install qcachegrind –with-graphviz

  1. Include <gperftools/profiler.h> and bracket the code to profile with ProfilerStart() and ProfilerStop().

  2. Compile NERDSS with debugging symbols enabled and -lprofiler.

  3. Run the program.

  4. Convert profile.log to callgrind format: pprof –callgrind ./nerdss profile.log > profile.callgrind

  5. Visualize with qcachegrind (macOS) or kcachegrind (Ubuntu).