In vftr_finalize, the routine vftr_print_global_stacklist is called when vftr_profile_wanted is set for the given rank. In the default setup, this is the case only for rank 0. When VFTR_LOGFILE_ALL_RANKS is set, it is true for all ranks.
However, the array vftr_gStackinfo, which contains the global stack info and is used in vftr_print_global_stacklist is only allocated for rank 0 (see vftr_stacks.c, around line 120). Consequently, Vftrace crashes during finalization. Since this happens almost at the very end, the damage is minimal. Yet, the final write of the vfd files happens afterwards. Here, e.g. the total number of stacks, initially set to zero, is set. Not doing so means that all VFD files are basically useless because the stacks and samples cannot be found.
To solve the issue, vftr_gStackinfo needs to be communicated to all other ranks.
In
vftr_finalize
, the routinevftr_print_global_stacklist
is called whenvftr_profile_wanted
is set for the given rank. In the default setup, this is the case only for rank 0. WhenVFTR_LOGFILE_ALL_RANKS
is set, it is true for all ranks.However, the array
vftr_gStackinfo
, which contains the global stack info and is used invftr_print_global_stacklist
is only allocated for rank 0 (seevftr_stacks.c
, around line 120). Consequently, Vftrace crashes during finalization. Since this happens almost at the very end, the damage is minimal. Yet, the final write of the vfd files happens afterwards. Here, e.g. the total number of stacks, initially set to zero, is set. Not doing so means that all VFD files are basically useless because the stacks and samples cannot be found.To solve the issue,
vftr_gStackinfo
needs to be communicated to all other ranks.