Debugging SST

Using Debugging Tools

SST utilizes a bootstrapping approach to configure the environment prior to execution. The following approaches may aid in the use of debugging tools.

GDB/LLDB

Setting a breakpoint on main will break in the bootstrap executable rather than in sst-core. It may be helpful to use SST::Simulation_impl::run as a breakpoint. At this breakpoint core symbols will be visible and conveniences like autocompletion should be available within the debugger.

Valgrind

If you are using Valgrind for debugging then the tool must be configured to follow child processes. An example command is shown below.

valgrind --trace-children=yes <path to SST>/bin/sst mysstmodel.py

Debug Output

Dynamic Loading

Installing multiple verions of libraries and executables commonly leads to runtime errors if search paths are misconfigured. Setting the SST_CORE_DL_VERBOSE variable can be helpful to diagnose dynamic linking problems.

[user1@localhost tests]$ SST_CORE_DL_VERBOSE=1 sst testStdMem.py 
SST-DL: Searching: /home/user1/install/sst-core/lib/sst
SST-DL: Attempting to load /home/user1/install/sst-core/lib/sst/libmemHierarchy.so
SST-DL: Loading failed, error: /home/user1/install/sst-core/lib/sst/libmemHierarchy.so: cannot open shared object file: No such file or directory
SST-DL: Searching: /home/user1/install/sst-core/lib/sstcore
SST-DL: Attempting to load /home/user1/install/sst-core/lib/sstcore/libmemHierarchy.so
SST-DL: Loading failed, error: /home/user1/install/sst-core/lib/sstcore/libmemHierarchy.so: cannot open shared object file: No such file or directory
SST-DL: Searching: /home/user1/install/sst-elements/lib/sst-elements-library
SST-DL: Attempting to load /home/user1/install/sst-elements/lib/sst-elements-library/libmemHierarchy.so
SST-DL: Load was successful.