f



C++ objects containing vectors

Hi,

I was trying to send c++ objects which contain vector. But it is
giving memory fault. Can anyone help?
My code is as follows. Thanks in advance.

regards,
Uzzal.

class CVerIns
{
public:
	CVerIns(): m_lLocalID(-1), m_lProcessorID(-1){ }
	virtual ~CVerIns(){ }

public:
	long	m_lLocalID;
	long	m_lProcessorID;
};
typedef std::vector <CVerIns> VerInsVector;
//////////////////////////////////////////////////////////////////////////
class CRSVertex
{
public:
	CRSVertex(){ }
	virtual ~CRSVertex(){ reset();}
	void reset();

public:
	long			m_lLabel;
	bool			m_isOrg;
	CVerIns			m_insMatPartOrOwner;
	VerInsVector	m_vecGhostVerIns;
};
typedef std::vector <CRSVertex> RSVertexVector;


/////
MPI_Isend(&lVCount, 1, MPI_LONG, lProc, 0, MPI_COMM_WORLD, &rsend
[lS]);
lS++;
MPI_Isend(&m_vecRSVertex[0], sizeof(CRSVertex) * lVCount, MPI_CHAR,
lProc, 1, MPI_COMM_WORLD, &rsend[lS]);
MPI_Recv(&lVCount, 1, MPI_LONG, 0, 0, MPI_COMM_WORLD, &stat);
MPI_Recv(&m_vecRSVertex[0], sizeof(CRSVertex) * lVCount, MPI_CHAR, 0,
1, MPI_COMM_WORLD, &stat);
0
uzzal
5/25/2009 8:15:26 AM
comp.parallel.mpi 1533 articles. 0 followers. kisitanggang (69) is leader. Post Follow

0 Replies
226 Views

Similar Articles

[PageSpeed] 10

Reply: