Defects and Recommendations for Parallelism
Static code analysis tools are designed to aid software developers to build better quality software in less time, by promoting best practices and detecting defects early in the software development life cycle. A defect can lead to a minor malfunction or cause serious security and safety issues. Thus, identifying, mitigating and resolving defects is an essential part of the software development process.
Parallelware Analyzer and Parallelware Trainer report code defects that constitute errors and issues recommendations to adopt best practices that prevent errors related parallelism.
Defects
📄 PWD001: Invalid OpenMP multithreading datascoping
📄 PWD002: Unprotected multithreading reduction operation
📄 PWD003: Missing array range in data copy to the GPU
📄 PWD004: Out-of-memory-bounds array access
📄 PWD005: Array range copied to or from the GPU does not cover the used range
📄 PWD006: Missing deep copy of non-contiguous data to the GPU
📄 PWD007: Unprotected multithreading recurrence
📄 PWD008: Unprotected multithreading recurrence due to out-of-dimension-bounds array access
Recommendations
📄 PWR001: Declare global variables as function parameters
📄 PWR002: Declare scalar variables in the smallest possible scope
📄 PWR003: Explicitly declare pure functions
📄 PWR004: Declare OpenMP scoping for all variables
📄 PWR005: Disable default OpenMP scoping
📄 PWR006: Avoid privatization of read-only variables
📄 PWR007: Disable implicit declaration of variables
📄 PWR008: Declare the intent for each procedure parameter
📄 PWR009: Use OpenMP teams to offload work to GPU
📄 PWR010: Avoid column-major array access in C/C++
📄 PWR011: Outline loop to increase compiler and tooling code coverage
📄 PWR012: Pass only required fields from derived data types as parameters
📄 PWR013: Avoid copying unused variables to the GPU
📄 PWR014: Out-of-dimension-bounds array access
📄 PWR015: Avoid copying unnecessary array elements to or from the GPU
📄 PWR016: Use separate arrays instead of an Array-of-Structs