On Aug 3, 2005, at 9:52 PM, Lei_at_ICS wrote:
> I compiled View3d.c using mpicc -c View3d.c,
> I then compiled View.c and linked the entire thing
> using mex. When it executes, I got an error:
> ??? Invalid MEX-file '/home/pan/IMOS/delivery/View.mexglx':
> /home/pan/IMOS/delivery/View.mexglx: undefined symbol: MPI_Init.
>
> This is obvious, because I did not link with the MPI libraries.
>
> So my question is: How do I modify mex to work with MPI,
> or how do I modify mpicc to work with mex? Is there another
> option?
Is mex another wrapper compiler, similar to mpicc?
If so, what you might want to do is set mpicc's underlying compiler to
be mex, and then link your application with mpicc (i.e., layer the
wrapper compilers).
You can do this by setting the environment variable LAMCC to "mex" (or
whatever the executable name is that you use to compile/link Mex
applications).
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|