octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need test run on Mac


From: c.
Subject: Re: need test run on Mac
Date: Fri, 28 Feb 2014 18:06:27 +0100

On 28 Feb 2014, at 16:38, John W. Eaton <address@hidden> wrote:

> On 02/28/2014 10:10 AM, John W. Eaton wrote:
>> On 02/27/2014 10:25 PM, Dmitri A. Sergatskov wrote:
>> 
>>> I usually compile against the reference blas and then use LD_PRELOAD
>>> trick to overload shared library symbols.
>> 
>> If you use LD_PRELOAD, then I would expect it to fail with any BLAS
>> because the default XERBLA will be loaded before Octave has a chance
>> to load its own version of that function.
>> 
>> Here is what I see on my system:
>> 
>>   $ ldd /usr/bin/octave | grep blas
>>           libblas.so.3 => /usr/lib/libblas.so.3 (0x00007fd78ceb5000)
>>   coredump:2901> LD_PRELOAD=/usr/lib/libblas.so.3 /usr/bin/octave -qf
>>   octave:1> foo
>>    ** On entry to barf   parameter number -7 had an illegal value
>> 
>>   $
>> 
>> I.e., Octave exits immediately because that's what the default XERBLA
>> does.
>> 
>> Hmm, is there some way we can prevent this from happening and still
>> have Octave link correctly?  Currently, xerbla is in liboctave.  I'll
>> see what happens if we link it directly with the main Octave
>> executable instead of putting it in a separate shared library.
> 
> Could you please try the attached change and see whether it fixes the problem 
> for you?
> 
> Thanks,
> 
> jwe

Hi, 

I built 3.8.1-rc4 with and without the diff.

Without the diff I get:

>> y = zeros(1,25);
>> u = ones(1,25);
>> tsam = 0.1;
>> data = iddata(y,u,tsam);
warning: iddata: more outputs than samples - matrice 'y' should probably be 
transposed
warning: iddata: more inputs than samples - matrice 'u' should probably be 
transposed
>> n4sid(data,1);
 ** On entry to IB01AD parameter number  7 had an illegal value
panic: Illegal instruction: 4 -- stopping myself...
Illegal instruction: 4


which is still a crash, but different to what I was getting with 3.8.0.

After applying the patch, I get:

>> pkg install -forge control
For information about changes from previous versions of the control package, 
run 'news control'.
>> y = zeros(1,25);
>> u = ones(1,25);
>> tsam = 0.1;
>> data = iddata(y,u,tsam);
warning: iddata: more outputs than samples - matrice 'y' should probably be 
transposed
warning: iddata: more inputs than samples - matrice 'u' should probably be 
transposed
>> n4sid(data,1);
 ** On entry to IB01AD parameter number  7 had an illegal value
panic: Illegal instruction: 4 -- stopping myself...
Illegal instruction: 4

which looks exactly the same to me.

I also checked that the build command used by Octave 3.8.0 without the diff and 
by 3.8.1-rc4 with the patch
are indeed different:

3.8.0 (no patch applied):

$ mkoctfile foo.cc bar.f -verbose
/opt/local/bin/gfortran-mp-4.7 -c -fPIC -pipe -Os -m64 bar.f -o bar.o
/opt/local/bin/g++-mp-4.7 -c -fPIC -I/opt/local/include/octave-3.8.0/octave/.. 
-I/opt/local/include/octave-3.8.0/octave -I/opt/local/include -pipe -Os -m64 
-D_THREAD_SAFE -pthread foo.cc -o foo.o
/opt/local/bin/g++-mp-4.7 -bundle -bundle_loader /opt/local/bin/octave-3.8.0 -o 
foo.oct bar.o foo.o -L/opt/local/lib/octave/3.8.0 -L/opt/local/lib -loctinterp 
-loctave

3.8.1-rc4 (patch applied):

$ /opt/octave/3.8.1/bin/mkoctfile foo.cc bar.f -verbose
/opt/local/bin/gfortran-mp-4.7 -c -fPIC -pipe -O2 -m64     bar.f -o bar.o
/opt/local/bin/g++-mp-4.7 -c -D_THREAD_SAFE -I/opt/local/include -fPIC 
-I/opt/octave/3.8.1/include/octave-3.8.1-rc4/octave/.. 
-I/opt/octave/3.8.1/include/octave-3.8.1-rc4/octave -I/opt/octave/3.8.1/include 
 -pipe -O2 -m64 -D_THREAD_SAFE -pthread    foo.cc -o foo.o
/opt/local/bin/g++-mp-4.7 -bundle -bundle_loader 
/opt/octave/3.8.1/bin/octave-3.8.1-rc4  -o foo.oct  bar.o foo.o   
-L/opt/octave/3.8.1/lib/octave/3.8.1-rc4 -L/opt/octave/3.8.1/lib -loctinterp 
-loctave -L/opt/local/lib -m64                    -L/opt/local/lib -lfreetype  
-lhdf5 -lz -lfftw3_threads -lfftw3 -lfftw3f_threads -lfftw3f -L/opt/local/lib 
-lfontconfig -lfreetype  -Wl,-framework -Wl,OpenGL  -Wl,-framework -Wl,Carbon 
-lgl2ps   -llapack -latlas -lgfortran              -lcurl -lcholmod -lumfpack 
-lsuitesparseconfig -lamd -lcamd -lcolamd -lccolamd -lcxsparse -larpack 
-lqrupdate -lfftw3_threads -lfftw3 -lfftw3f_threads -lfftw3f -llapack -latlas 
-lgfortran -lcblas -lf77blas -latlas -lgfortran -lreadline -lncurses  
-L/opt/local/lib -lpcre -ldl  -L/opt/local/lib 
-L/opt/local/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3 
-L/opt/local/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/../../.. -lgfortran 
-lquadmath -lm -lm

c.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]