SX-Aurora / Vftrace

GNU General Public License v3.0
10 stars 2 forks source link

Global stacklist is only available on rank 0 #16

Closed MeisterEule closed 4 years ago

MeisterEule commented 4 years ago

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.

SpinTensor commented 4 years ago

If VFTR_LOGFILE_ALL_RANKS is set to "yes" the global stack info is now distributed to all ranks. Therefore, this issue will be closed.