From: clangis@chat.carleton.ca (Christian Langis)
Newsgroups: comp.parallel
Subject: QUESTION
Date: 19 Sep 1998 16:31:05 GMT
Organization: Carleton U.
Approved: bigrigg@cs.cmu.edu
Message-Id: <6u0m89$cpk$1@encore.ece.cmu.edu>
Originator: bigrigg@ece.cmu.edu


(answer by Email please)

Hi there. 
	I am new to MPI. I have to use it in order to conduct my
experimentations (part of my current master thesis in comp. sci.). In
fact I am currently expanding someone's previous work (extend it to
parallelism).  

The software I was given is in C++. It runs on its homemade C++
objects.  

I was just reading a MPI book (edited in 96) that stated that MPI is
compatible with Fortran90 and ANSI C. 

Now, the problem is what happens when I have to send arrays of C++
objects from processor to processor? AS in the book, MPI supports only
standard typed arrays like 
MPI_CHAR
MPI_SHORT
MPI_INT
MPI_LONG
MPI_UNSIGNED_CHAR
MPI_UNSIGNED_SHORT
MPI_UNSIGNED_INT
MPI_UNSIGNED_LONG
MPI_FLOAT
MPI_DOUBLE
MPI_LONG_DOUBLE
MPI_BYTE
MPI_PACKED

So I have only 2 options I can think about:
1-either I send the whole array as a memory dump with MPI_BYTE
2-or make my own translation C functions that would 'marshall' the
objects as a simple number of integers at the sender, and vice-versa
at the receiver. 

#1 is not really portable since both communicants may have different
internal data representations.
#2 is reliable but it's like using an aircraft carrier to intercept
boat-people... (Ho should I be more politically correct?) Furthermore
it goes against the object oriented philosophy to reduce an object to
a fixed size integer array. 

Have you ever had the same problem? How did you solve it? Is there a
more flexible version of MPI to accomodate this situation?

thanks

--
Articles to bigrigg+parallel@cs.cmu.edu (Admin: bigrigg@cs.cmu.edu)
Archive: http://www.hensa.ac.uk/parallel/internet/usenet/comp.parallel

