mpiSynqNetAnalyze
Declaration
MPI_DECL1 MPIResult MPIDECL2 mpiSynqNetAnalyze(const MPISynqNetDiagnosticsInfo * sqDiag, const MPISynqnetDiagnosticsInfo * prevSqDiag, MPISynqNetAnalysisResult * result);
Required Header: stdmpi.h
Change History: Added in 04.00.
Description
mpiSynqNetAnalyze analyzes sqDiag data and returns diagString with analysis result in the form of strings. diagString is a pointer to character array of size 1k bytes.
prevSqDiag can be NULL or the pointer to MPISynqnetDiagnosticsInfo structure. If NULL is passed, mpiSynqNetAnalyze(…) would analyze only the sqDiag data. If valid prevSqDiag data is passed then the difference between sqDiag and prevSqDiag is analyzed. diagString does not have the repetitive information for every call made to mpiSynqNetAnalyze(…). diagString can be used for logging or warning/error dialogs.
sqDiag | A pointer to the SynqNet diagnostic data. |
---|---|
prevSqDiag | Previous Synqnet diagnostic data. |
result | Analysis result generated from the current diagnostic data. |
Sample Code
/* Following function demonstrates the using mpiSynqNetAnalyze(). Following logger function reads the diagnostic data using mpiSynqNetDiagnostics(…), and diagnostic data is passed to mpiSynqnetAnalyze() for analysis. The analysis result is logged into the file. */ long logNetworkDiagnostics( MPISynqNet synqnet, FILE * logFile) { MPISynqNetDiagnostics curDiag; /* Holds the current diag data */ Static MPISynqNetDiagnostics prevDiag; /* holds previous diag data */ MPISynqNetAnalysisResult result; /* holds the analysis result string */
returnValue= mpiSynqNetDiagnostics(synqnet, &curDiag);
returnValue= mpiSynqnetAnalyze(&curDiag,&prevDiag,&result);
prevDiag=curDiag; /* preserve the current Diag data */
fprintf(logfile, “%s \n”, result.diagstring); /* logs the analysis result */
return returnValue; }