Bug 228020

Summary: PLDT prefs for MPI(etc) include path - allow to be dynamically added when encountered
Product: [Tools] PTP Reporter: Beth Tibbitts <beth>
Component: PLDTAssignee: Beth Tibbitts <beth>
Status: RESOLVED FIXED QA Contact: Craig E Rasmussen <crasmussen>
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: All   
OS: All   
Whiteboard:

Description Beth Tibbitts CLA 2008-04-21 10:36:33 EDT
Change the usage of the MPI (etc) paths in PLDT preferences.
If one MPI path is in the preferences, but another path is used by the program,
ask the user if this path should be added when it is encountered.

Assumption: any mpi.h include file, being used by the program, is probably to 
be considered valid.  

This would essentially make it unnecessary for the user to set the PLDT prefs first,
because the first encounter of an mpi.h file in use by an analyzed program would
allow it to be added - much simpler!
Comment 1 Beth Tibbitts CLA 2008-05-02 10:35:39 EDT
fix for this will include prompting for preferences during new project wizard, if they don't exist.

For C: If one MPI path is in the preferences, but another path is used by the program,
ask the user if this path should be added when it is encountered.   
Not done for C++, because it would end up asking for every API encountered
(this comment is from MPIPreferencePage.java)
 * Note that "Prompt to include MPI APIs found in other locations" is only applicable
 * to C code, not C++: because C++ MPI APIs are not as easily recognizable - when
 * discovered via CDT AST, they sometimes do not have the "MPI" prefix.
 * C++ MPI APIs include e.g. MPI_Bcast, MPI::Init, and Get_size (coded as "MPI::COMM_WORLD.Get_size()")
 * thus we don't cull by excluding all APIs for C++ code that don't start with a prefix.
 * That said, since we do this, we end up looking at all variables and functions including
 * those found only in user code, e.g. argc and argv.  If we asked the user about all of these,
 * it would be annoying and too slow.
 * <p>This should probably be re-evaluated in the future.
 * An alternative might be a "don't ask me again during this run" checkbox
 * on the popup asking to add the API, that appears during execution.
 * That would remove the annoying part; but performance may still suffer from this extra test?
 * <p>Crude workaround: Run MPI analysis at least once on plain C code, to assure it's finding the
 * header files in the same place that are specified here in the preferences.
Comment 2 Beth Tibbitts CLA 2008-05-20 09:08:20 EDT
done. if an MPI api is encountered that is not in the mpi include path as specified in PLDT preferences, the user is queried to add it, with an option to "don't ask again"