Invalid MEX-file libesmumps.so : undefined symbo

조회 수: 2 (최근 30일)
Etienne Spieser
Etienne Spieser 2017년 9월 25일
답변: Jatin Waghela 2017년 10월 2일
Hello,
I am trying to use a mex file that allow to use the MUMPS solver with Matlab 2016b on Centos 7.3 x86_64.
I can successfully compile the mex file but it failed when I try to use it with the following error :
Invalid MEX-file
'MUMPS_5.1.1/MATLAB/dmumpsmex.mexa64':
/lib64/libesmumps.so.0: undefined symbol:
SCOTCH_errorPrint
Error in dmumps (line 40)
[inform,rinform,sol,inst,schur,redrhs,pivnul_list,sym_perm,uns_perm,icntl,cntl,colsca_out,rowsca_out,keep_out,dkeep_out]
=
dmumpsmex(id.SYM,id.JOB,id.ICNTL,id.CNTL,id.PERM_IN,id.COLSCA,id.ROWSCA,id.RHS,id.VAR_SCHUR,id.INST,id.REDRHS,id.KEEP,id.DKEEP);
Error in diagainv_example (line 11)
id = dmumps(id);
I don't understand what happens because :
1. the compilation process is OK
make ARITH=d dmumpsmex.stamp
make[1] : on entre dans le répertoire « /home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/MATLAB »
cp -f mumpsmex.c dmumpsmex.c
/usr/local/MATLAB/R2016b/bin/mex -g -largeArrayDims -g dmumpsmex.c -DMUMPS_ARITH=MUMPS_ARITH_d -I/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/include -I/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/libseq -L/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/lib -ldmumps -lmumps_common -L/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/PORD/lib -lpord -lmetis -L/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/libseq -lmpiseq -lblas -lscotch -llapack -lesmumps /usr/lib/gcc/x86_64-redhat-linux/4.8.2/libgfortran.so
Building with 'gcc'.
MEX completed successfully.
rm -f dmumpsmex.c
touch dmumpsmex.stamp
make[1] : on quitte le répertoire « /home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/MATLAB »
make ARITH=z zmumpsmex.stamp
make[1] : on entre dans le répertoire « /home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/MATLAB »
cp -f mumpsmex.c zmumpsmex.c
/usr/local/MATLAB/R2016b/bin/mex -g -largeArrayDims -g zmumpsmex.c -DMUMPS_ARITH=MUMPS_ARITH_z -I/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/include -I/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/libseq -L/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/lib -lzmumps -lmumps_common -L/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/PORD/lib -lpord -lmetis -L/home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/libseq -lmpiseq -lblas -lscotch -llapack -lesmumps /usr/lib/gcc/x86_64-redhat-linux/4.8.2/libgfortran.so
Building with 'gcc'.
MEX completed successfully.
rm -f zmumpsmex.c
touch zmumpsmex.stamp
make[1] : on quitte le répertoire « /home/espieser/02_Outils/MUMPS/MUMPS_5.1.1/MATLAB »
2. the symbol is present in the share object.
MATLAB$ objdump -TC /lib64/libesmumps.so.0.2 | grep SCOTCH_errorPrint
0000000000000000 D *UND* 0000000000000000 SCOTCH_errorPrint
Do you have any idea on how to solve this issue ?
Thanks is advance for any help !
Best regards,
Étienne

답변 (1개)

Jatin Waghela
Jatin Waghela 2017년 10월 2일
Please refer to the below documentation link which gives more information on troubleshooting MEX files.
Also, If a symbol required by a shared library is missing, MATLAB displays a message similar to the one in this case.
The below link explains the Invalid MEX File Errors and how to find the dependencies using Dependency Walker utility from the website http://www.dependencywalker.com.
Also, you may also contact the author of the MEX file and see if they are aware of such known issues.

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by