Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Uncommitted MPI_Datatype leaks memory heavily
From: Ilja Honkonen (ilja.honkonen_at_[hidden])
Date: 2012-05-14 02:06:57


> Get the free out of the #ifndef LEAK and your problem will be solved.
>> for (int i = 0; i< 10000000; i++) {
>> MPI_Datatype type;
>> assert(
>> MPI_Type_contiguous(
>> 10 * sizeof(double),
>> MPI_BYTE,
>> &type
>> ) == MPI_SUCCESS
>> );
>>
>> #ifndef LEAK
>> assert(MPI_Type_commit(&type) == MPI_SUCCESS);
>> assert(MPI_Type_free(&type) == MPI_SUCCESS);
>> #endif
>> }

Thanks, so it's a feature. A bit surprising though since usually local
variables are deallocated automatically.

Ilja