We recently discovered that the thread leak has nothing to do with .NET. The same leak occurs even if we run OpenMP code inside a Win32 thread. So, here is the new example. Suggestions\ide as, please?
Code:
#include <windows.h>
#include <stdio.h>
#include <omp.h>
int calculateArithmeticalProgressionSumOMP( int a1, int d, int n )
{
int sum = 0;
omp_set_num_threads(3);
Here is the source code of my C++/ME app. When I run it I can use "Windows Task Manager" to see that thread HANDLEs are leaking.
Code:
#include "stdafx.h"
#include <omp.h>
public __gc class TestClass
{
public:
void ThreadProc()
{
int sum = 0;
#pragma omp parallel for reduction(+:sum)
for ( int i = 0; i < 10000; i++ )
Leave a comment: