LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Lei_at_[hidden]
Date: 2005-08-05 13:07:44


Thanks! This sounds like a simple solution.

I tried it and got some errors:

/home/packages/LAM-MPI/intel/bin/mpicc -f ../mexopts_linux.sh -V5 -v
-D_LINUX_ -I/usr/local/matlab/extern/include -DMATLAB View.o Viewx.o
BuildCavityLists.o BuildCombinedLists.o BuildRadMatrixIndexVectors.o
ComputeElementGeometryProperties.o CreateParticipatingInternalChbdys.o
DetermineViewUpdateMode.o GenerateRadList.o
InitRadMatrixCavityPartition.o InternalChbdysInternalGridPtrLookup.o
ReorderInternalChbdys.o SetAllUpdateFlags.o UpdateInternalChbdys.o
Vfact.o View3d.o ../db_/imdb.a ../DataSet/DataSet.a
../EnumDefinitions/EnumDefinitions.a ../dbx_/imdbx.a ../shared/utils.a

    mex: -pthread not a valid option.

    Usage:
      MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
          [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]

    or (to build an Ada S-function):
      MEX [-v] [-g] -ada <sfcn>.ads

    Use the -help option for more information, or consult the MATLAB
External Interfaces Guide.

/home/packages/LAM-MPI/intel/bin/mpicc: No such file or directory
gmake: *** [View] Error 1
~

If I setenv LAMCC mex

I get:

losangeles[24]% mpicc

    mex: -pthread not a valid option.

    Usage:
      MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
          [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]

    or (to build an Ada S-function):
      MEX [-v] [-g] -ada <sfcn>.ads

    Use the -help option for more information, or consult the MATLAB
External Interfaces Guide.

mpicc: No such file or directory
losangeles[25]%

But if I setenv LAMCC gcc
I get:

losangeles[27]% mpicc
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../crt1.o: In function
`_start':
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../crt1.o(.text+0x18):
undefined reference to `main'
collect2: ld returned 1 exit status
mpicc: No such file or directory
losangeles[28]%

Yes, mex is a script provided by Matlab. But I am not able to
modify it yet. Any further suggestions on how to solve it problem?

Thanks a lot,

-Lei

Jeff Squyres wrote:

>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).
>
>
>