Portability and correctness both are important goals when developing code. Non-standard code may not be portable, and its execution may be unpredictable.
Using diagnostic options when you compile your code can help you find potential problems. Since the compiler is going to analyze your code anyway, it pays to take advantage of the diagnostic options to learn as much as you can from the analysis. Please note that some compilers disable the default optimization when you switch on certain debugging flags.
Because of differences in compilers, it also is good practice to compile your code with each compiler that is available on the system, note any diagnostic messages you get, and revise your code accordingly.
The following options can be helpful as you compile code to run in the HPC environment that CISL manages.
CrayThe following compiler flags may be helpful for debugging your code:
Also see Cray C/C++ debug options. Intel
Also see Intel C++ diagnostic options. GNU
Also see GCC diagnostic warning options. NVIDIA HPC SDKThe following compiler flags may be helpful for debugging your code using NVIDIA HPC SDK.
Also see NVIDIA HPC SDK documentation. |