Profiling¶
Use tools like Shark or Gperftools.
Code spends most time evaluating bimolecular association. Large complexes may increase time spent breaking apart complexes.
Install Gperftools:
On Ubuntu:
apt-get install libunwind8-dev
apt-get install libtool
git clone https://github.com/gperftools/gperftools.git
sudo apt-get install dh-autoreconf
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
Install kcachegrind or qcachegrind for output visualization:
On Ubuntu:
sudo apt install kcachegrind
sudo apt-get install graphviz gv
On macOS:
brew install graphviz
brew install qcachegrind –with-graphviz
Include <gperftools/profiler.h> and bracket the code to profile with ProfilerStart() and ProfilerStop().
Compile NERDSS with debugging symbols enabled and -lprofiler.
Run the program.
Convert profile.log to callgrind format: pprof –callgrind ./nerdss profile.log > profile.callgrind
Visualize with qcachegrind (macOS) or kcachegrind (Ubuntu).