Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] cannot call member function 'virtual void MPI::MPI::Datatype::Commit()' without an object
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2012-01-25 11:40:53

On Jan 25, 2012, at 5:03 AM, Victor Pomponiu wrote:

> I cannot call MPI::Datatype::Commit() and MPI::Datatype::Get_size() functions from my program. The error that I receive is the some for both of them:
> "cannot call member function 'virtual void MPI::Datatype::Commit()' without an object
> or
> "cannot call member function 'virtual void MPI::Datatype::Get_size()' without an object
> If I'm providing an input parameter to them I will receive this error:
> e.g.,
> >MPI::Datatype::Commit(MPIVecDataBlock)
> 'no matching function for call to ‘MPI::Datatype::Commit(MPI::Datatype&)’

IIRC, these are member functions. So you'd call my_datatype.Commit() and my_datatype.Get_size().

> However, MPI::Datatype::Creat_struct(....) can be found.

This is a static function that is just in the MPI namespace -- it is not a member function on an object instance.

Jeff Squyres
For corporate legal information go to: