Home My Page Projects MPTK: The Matching Pursuit ToolKit
Summary Activity Forums Tracker Lists Docs News SCM Files

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: one step further [ Reply ]
By: Rémi Gribonval on 2008-02-14 11:07
I was a bit puzzled by this bit until I discussed with Sandrine Anthoine who seems to have discovered the solution: Mat2MPTK uses a system call to call the MPTK command line utilities (mpd in this case). However, or some reason the system call (smthing like
system('<command line>')
with the appropriate command line)
does not set the environment variable LD_LIBRARY_PATH, which is necessary for MPTK to find the needed libraries (fftw ...).

Can you try if the following works :
a) find the value of the LD_LIBRARY_PATH
by typing printenv LD_LIBRARY_PATH in a terminal.

b) create a matlab file mysystem.m :
function mysystem (string)
mystring = ['setenv LD_LIBRARY_PATH <toto>;' string]
%(or export LD_LIBRARY_PATH=<toto>, depending on your shell)
where <toto> should be replaced by the string obtained in a)

c) replace each occurence of system(...) by mysystem(...) in the code of Mat2MPTK

Let me know if this works.

Best regards,



one step further [ Reply ]
By: Clothilde Melot on 2008-02-08 15:33
Dear Remi

Thank you very much for your help.
Changing the dictionary was helping a lot since now the dictionary seems to be taken into account.
The point is that now I get a segmentation fault.
Can you help once again ?
thank you once again !!!
with best

mptk DEBUG -- MP_Msg_Server_c -- Entering the messaging server constructor.
mptk DEBUG -- MP_Msg_Server_c -- Exiting the messaging server constructor.
mptk DEBUG -- mpd - switch -D : optarg is [/home/melot/matlab/Matching_pursuit/default.xml].
mptk DEBUG -- mpd - Read dictionary file name [/home/melot/matlab/Matching_pursuit/default.xml].
mptk DEBUG -- mpd - switch -n : optarg is [1000].
mptk DEBUG -- mpd - Read numIter [1000].
mptk DEBUG -- mpd - switch -E : optarg is [tempdecay.txt].
mptk DEBUG -- mpd - Read decay file name [tempdecay.txt].
mptk DEBUG -- mpd - switch -R : optarg is [100].
mptk DEBUG -- mpd - Read report hit [100].
mptk DEBUG -- mpd - When exiting getopt, optind is [5].
mptk DEBUG -- mpd - (argc is [8].)
mptk DEBUG -- mpd - Read sound file name [tempin.wav].
mptk DEBUG -- mpd - Read book file name [tempbook.bin].
mptk DEBUG -- mpd - Read residual file name [tempres.wav].
mptk DEBUG -- MPTK_Env_c::environment() - Load successfully the following Block type:
mptk DEBUG -- MPTK_Env_c::environment() - harmonic block.
mptk DEBUG -- MPTK_Env_c::environment() - chirp block.
mptk DEBUG -- MPTK_Env_c::environment() - mclt block.
mptk DEBUG -- MPTK_Env_c::environment() - gabor block.
mptk DEBUG -- MPTK_Env_c::environment() - mdst block.
mptk DEBUG -- MPTK_Env_c::environment() - constant block.
mptk DEBUG -- MPTK_Env_c::environment() - anywavehilbert block.
mptk DEBUG -- MPTK_Env_c::environment() - dirac block.
mptk DEBUG -- MPTK_Env_c::environment() - nyquist block.
mptk DEBUG -- MPTK_Env_c::environment() - mdct block.
mptk DEBUG -- MPTK_Env_c::environment() - anywave block.
mptk ERROR -- MP_FFT_Interface_c::init_fft_library_config() - fftw wisdom file with path /usr/local/MPTK-0.5.4/bin/default_fftw_wisdom_file doesn't exist .
mptk DEBUG -- MPTK_Env_c::environment() - No fftw Plan well formed was found.
mptk INFO -- mpd - ------------------------------------
mptk INFO -- mpd - ------------------------------------
mptk INFO -- mpd - The command line was:
/usr/local/MPTK-0.5.4/bin/mpd -D/home/melot/matlab/Matching_pursuit/default.xml -n1000 -Etempdecay.txt -R100 tempin.wav tempbook.bin tempres.wav
mptk INFO -- mpd - End command line.
mptk INFO -- mpd - Loading the dictionary...
mptk INFO -- mpd - (In the following, spurious output of dictionary pieces would be a symptom of parsing errors.)
mptk DEBUG -- MP_Dict_c::MP_Dict_c() - Constructing dict...
mptk DEBUG -- MP_Dict_c::MP_Dict_c() - Done.
mptk DEBUG -- MP_Gabor_Block_c::MP_Gabor_Block_c() - Constructing a Gabor block...
mptk DEBUG -- MP_Gabor_Block_c::MP_Gabor_Block_c() - Done.
Segmentation fault
/usr/local/MPTK-0.5.4/bin/mpd tempin.wav tempbook.bin -D/home/melot/matlab/Matching_pursuit/default.xml -n1000 -Etempdecay.txt -R100 tempres.wav: Segmentation fault
??? Error using ==> bookread
Can't open file [tempbook.bin]

Error in ==> mpd at 35
varargout{1} = bookread('tempbook.bin');

Error in ==> Mat2MPTKdemo at 2
[B, res, dec]=mpd(y, Fs, 'n', 1000, 'R', 100);%will run mpd with the 'default.xml' dictionary file.