interaction with gprof

Janus Weil janus@gcc.gnu.org
Mon Nov 18 15:25:00 GMT 2013


Hi Salvatore,

> Further follow up: I can confirm that taking the internal subroutines
> and making them as external ones produces a correct profile.
> Soooooo. Should I consider this a gfortran bug and open a PR?

yes, I think you should (if there isn't one already).

I vaguely remember problems with getting proper backtraces into
internal subroutines (which occurred to me a couple of times, but
never bothered me enough to take action). That's very probably
related.

Cheers,
Janus




> On Mon, Nov 18, 2013 at 2:24 PM, Salvatore Filippone
> <filippone.salvatore@gmail.com> wrote:
>> Follow up: I have found the *actual* subroutine called.
>> -----------------------------------------------
>>                 0.00   88.43     816/816         psb_d_base_inner_vect_sv_ [19]
>> [20]    30.4    0.00   88.43     816         psb_d_csr_cssv_ [20]
>>                88.43    0.00     816/816         psb_s_fix_coo_ [21]
>>                 0.00    0.00    1632/20175368
>> __psb_string_mod_MOD_psb_toupperc [107]
>>                 0.00    0.00     816/163361240
>> __psb_error_mod_MOD_psb_erractionrestore [113]
>>                 0.00    0.00     816/180409801
>> __psb_error_mod_MOD_psb_erractionsave [110]
>>                 0.00    0.00    1632/31338388
>> __psb_base_mat_mod_MOD_psb_base_get_nrows [173]
>>                 0.00    0.00     816/2425
>> __psb_base_mat_mod_MOD_psb_base_is_asb [1159]
>>                 0.00    0.00     816/2233
>> __psb_base_mat_mod_MOD_psb_base_is_triangle [1160]
>>                 0.00    0.00     816/816
>> __psb_base_mat_mod_MOD_psb_base_is_lower [1172]
>>                 0.00    0.00     816/1423
>> __psb_base_mat_mod_MOD_psb_base_is_unit [1165]
>> --------------------------------------------------
>> Now the peculiar thing is that psb_d_csr_cssv does *not* call
>> psb_s_fix_coo; rather, it calls an internal (contained) subroutine
>> (called inner_csrsv). It would seem that internal subroutines are
>> confusing the profiler; I vaguely remember seeing other instances, can
>> dig some more if needed.
>>



More information about the Fortran mailing list