Quantitative Analysis
Parallel Processing
Numerical Analysis
C++ Multithreading
Python for Excel
Python Utilities
Services
Author

I. Introduction into GPU programming.
1. What are GPU and CUDA?
2. Selecting GPU.
3. Setting up development environment.
4. Combined use of Cuda, C++ and boost::python.
5. Debugging of boost::python binary using Visual Studio.
6. Debugging of boost::python/Cuda binary using Visual Studio.
7. Using printf in device code.
II. Exception safe dynamic memory handling in Cuda project.
III. Calculation of partial sums in parallel.
IV. Manipulation of piecewise polynomial functions in parallel.
V. Manipulation of localized piecewise polynomial functions in parallel.
Downloads. Index. Contents.

Debugging of boost::python binary using Visual Studio.


here are several ways to debug a DLL from Visual Studio. One can use Project Properties/Debugging page to setup a "Command" to run on debug request. One can use "Debug/Attach to Process" to load the DLL into a currently running process. If Visual Studio fails to load the symbols (pdb files) then one can use Debug/Modules window (right click on module name) to load symbols manually.

On my computer, however, none of it works with VS2008 for pyd extensions generated with boost::python. My modules window is blank for some reason even though the Output window show multitude of modules being loaded. I could not find a solution on the web so I stumbled on the following work-around.

Start python.exe directly. Do not start cmd.exe and then call python.exe. Do not write bat-file and start the bat-file. Do it directly. Then load your pyd-extension (possibly after navigating, possibly by using a script for it). After pyd-extension is loaded into the python.exe process, switch to Visual Studio IDE and do "Debug/Attach to process".

The simplest boost::python project (both ide and make file versions) may be found at OTSProjects/tests/hello_ext (see the Download page).

Note that one cannot combine Cuda API and some boost libraries in the same compiler scope. These have to be separated. An example of such separation is the PiecewisePoly project presented in the following sections.





Downloads. Index. Contents.


















Copyright 2007