Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Using OpenMPI via Mex file - symbol look up error
Replies: 2   Last Post: May 10, 2013 7:03 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
elgen

Posts: 7
Registered: 8/27/10
Using OpenMPI via Mex file - symbol look up error
Posted: May 26, 2011 10:10 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello Newsgroup Users,

I have a question related to OpenMPI with Matlab, using Matlab v.7.10
and OpenMPI v.1.4.3 on Ubuntu v.11.0.4.

I wrote a wrapper C function, in which it calls the MPI interface as the
following:

MPI_agent.c
=================================================================
void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const
mxArray*prhs[] ) {

char arg1[65];
mxGetString(prhs[0], arg1, sizeof(arg1)-1);

if (!strcmp(arg1, "MPI_Init")) {

MPI_Init(0,0);

}

else if (!strcmp(arg1, "MPI_Finalize")) {

MPI_Finalize();

}
}
=================================================================

And MPI_agent.c is compiled fine with "mex MPI_agent.c CC=mpicc".

When I run the following test code: testMPI.m

================================================================
function output = testMPI(varargin)

mpi_proxy('MPI_Init');


'Print something'

mpi_proxy('MPI_Finalize');

quit
================================================================

with the command

mpirun -np 2 matlab -nodisplay -nojvm -r testMPI

There are 2 matlab processes invoked. However, I receive the following
error:
================================================================
TestMPI$ mpirun -np 2 matlab -nodisplay -nojvm -r testMPI

< M A T L A B (R) >
Copyright 1984-2010 The MathWorks, Inc.
Version 7.10.0.499 (R2010a) 64-bit (glnxa64)
February 5, 2010


< M A T L A B (R) >
Copyright 1984-2010 The MathWorks, Inc.
Version 7.10.0.499 (R2010a) 64-bit (glnxa64)
February 5, 2010


To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.


To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.


ans =

26-May-2011


ans =

26-May-2011


/opt/matlab/r2010a/bin/glnxa64/MATLAB: symbol lookup error:
/usr/lib/openmpi/lib/openmpi/mca_paffinity_linux.so: undefined symbol:
mca_base_param_reg_int
/opt/matlab/r2010a/bin/glnxa64/MATLAB: symbol lookup error:
/usr/lib/openmpi/lib/openmpi/mca_paffinity_linux.so: undefined symbol:
mca_base_param_reg_int

================================================================

The most relevant post I have identified is

http://www.open-mpi.org/community/lists/users/2009/02/8158.php

in which the cause of the "symbol lookup error" is "Python front-end
calling dlopen() to manually open the libmpi.so library". I don't think
this would be the cause in my current situation.

Any comment/thought on how to debug this problem is welcome. Thank you
for your attention.


elgen



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.