Space Decomposition
From HPCBugBase
HPCBugBase Menu
Submit feedback
Overview
Index
- Defect types (defect patterns)
- Specific defects (individual defects that belong to a defect type)
- Instances (code examples)
- Articles (various info)
- Templates
- Show all categories
- Show all pages
Index by Languages
Contents |
[edit] Defect Type Description
This defect type is intended to cover defects associated with incorrect mappings between the problem space and the problem memory space. Rewriting of a sequential code to make it work in a parallel environment often requires change in the mapping logic for several reasons.
- In many HPC applications, each process/thread holds a part of the problem space so that they can solve a larger problem than what a single processor can handle. To do this, the memory space of each process is mapped to a different location of the problem space.
- In the message-passing model, an additional memory space is often required for messages. When the implementation uses a "ghost" technique to decrease the frequency of communications, even more memory is used. Again, these change how the memory space is mapped to the problem space.
Since the mapping logic tends to be deeply embedded in the sequential code, the process to change it is defect prone.
[edit] Entries
[edit] Advice
- Validate the memory allocation carefully when parallelizing the code
- Mapping in parallel version can be different from that in serial version
- E.g., Array origin is different in every processor
- E.g., Additional memory space for communication can complicate the mapping logic
- Validate array origin, whether buffer includes guard buffers, whether buffer refers to global space or local space, etc. These can change while parallelizing the code
- Encapsulate the mapping logic to a dedicated function
- Consider designing the code which is easy to parallelize
[edit] Symptom
- Segmentation fault (if array index is out of range)
- Incorrect or slightly incorrect output
[edit] Other Findings and Contexts
|
Pages referring to this entry: Main Page Defect Classification Scheme (Mar 06) Problem Space Decomposition (redirect page) Pages referring to this entry: Defect Classification Scheme (Jan 06) Overview of HPC Defect Patterns Modular programming in HPC applications Defect Classification Scheme (Mar 07) |
