To trace multithreaded applications, just link and run as described above. Additional threads will be registered automatically as soon as they call Intel® Trace Collector through MPI wrapper functions or the API. Within each process every thread will have a unique number starting with zero for the master thread.
With the VT_registerthread() API function the application developer can control how threads are enumerated. VT_registernamed() also supports recording a thread name. VT_getthrank() can be used to obtain the thread number that was assigned to a thread.