alexaverbuch

Repeat runs causes Memory Dump

Discussion created by alexaverbuch on Oct 2, 2009
Latest reply on Oct 6, 2009 by omkaranathan
Need to make multiple runs of Kernel program to gauge performance

Hi again,

I've now finished the app for my OpenCL school project and I'd like to run it multiple times to gain a more accurate view of it's performance.

Just to get started I tried running the entire contents of the Host main function twice, but this causes a memory dump.

I'm pretty sure I've freed all local variables, so now I'm wondering if it's caused by the runtime or Stream framework.

Is there an obvious reason why I shouldn't be able to do this?

int main(int argc, char * argv[]) { IplImage* cvRaw = cvLoadImage("raw.bmp", 1); width = cvRaw->width; height = cvRaw->height; clInitializeHost(cvRaw); // Initialize Host application clInitialize(); // Initialize OpenCL resources clRunKernels(); // Run the CL program clCleanup(); // Releases OpenCL resources clCleanupHost(); // Release host resources clInitializeHost(cvRaw); // Initialize Host application clInitialize(); // Initialize OpenCL resources clRunKernels(); // Run the CL program clCleanup(); // Releases OpenCL resources clCleanupHost(); // Release host resources return 0; }

Outcomes