mpich icon indicating copy to clipboard operation
mpich copied to clipboard

Add support to print out pvar values in MPI_Finalize

Open mpichbot opened this issue 9 years ago • 4 comments

Originally by jczhang on 2013-12-05 17:33:44 -0600


As MPIU_INSTR_Finalize does in the old instrumentation code instr.c

static int MPIU_INSTR_Finalize( void *p )
{
    int rc;
    struct MPIU_INSTR_Generic_t *gPtr = instrHead;
    /* FIXME: This should at least issue the writes in process order */
    /* Allow whether output is generated to be controlled */
    if (!MPL_env2bool( "MPICH_INSTR_AT_FINALIZE", &rc )) 
    rc = 0;

    if (rc) {
    MPIU_INSTR_Printf( stdout );
    }

    /* Free any memory allocated for the descriptions */
    while (gPtr) {
    if (gPtr->desc) {
        MPIU_Free( (char *)gPtr->desc );
        gPtr->desc = 0;
    }
    gPtr = gPtr->next;
    }

    return 0;
}

mpichbot avatar Oct 14 '16 18:10 mpichbot

I have no clue what this is about. Searching MPIU_INSTR_ digs up this page: https://github.com/pmodels/mpich/blob/main/doc/wiki/design/Internal_Instrumentation.md

hzhou avatar Jul 18 '22 21:07 hzhou

I have no clue what this is about. Searching MPIU_INSTR_ digs up this page: https://github.com/pmodels/mpich/blob/main/doc/wiki/design/Internal_Instrumentation.md

It looks like the old instrumentation code was removed in https://github.com/pmodels/mpich/commit/606f9b687230dcd3537e538e6983f8e7b573cd76. My best guess for this issue is that the author wanted a way to print out any active PVARs at finalize with an environment variable. Should be fairly straightforward.

raffenet avatar Jul 19 '22 15:07 raffenet

I have no clue what this is about. Searching MPIU_INSTR_ digs up this page: https://github.com/pmodels/mpich/blob/main/doc/wiki/design/Internal_Instrumentation.md

It looks like the old instrumentation code was removed in 606f9b6. My best guess for this issue is that the author wanted a way to print out any active PVARs at finalize with an environment variable. Should be fairly straightforward.

That makes sense. MPIR_CVAR_DEBUG_SUMMARY can be the variable.

hzhou avatar Jul 19 '22 16:07 hzhou

I have no clue what this is about. Searching MPIU_INSTR_ digs up this page: https://github.com/pmodels/mpich/blob/main/doc/wiki/design/Internal_Instrumentation.md

It looks like the old instrumentation code was removed in 606f9b6. My best guess for this issue is that the author wanted a way to print out any active PVARs at finalize with an environment variable. Should be fairly straightforward.

That makes sense. MPIR_CVAR_DEBUG_SUMMARY can be the variable.

Just nitpicking this is for PVARs, not CVARs. Maybe we should just add both.

raffenet avatar Jul 19 '22 16:07 raffenet