pending optiminterp-0.3.5 release

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

pending optiminterp-0.3.5 release

Olaf Till-2
(I'd like to have the technical discussions at the mailing list, not
at the release forum.)

Alexander,

installing the new tarball segfaults for me, both with Octave-4.0 and
Octave-4.2. The segfault happens at the loading of optimiterp.oct.

Attached is the upper part of the backtrace with Octave-4.2. Compiler
warnings with -Wall were:

optimal_interpolation.F90: In function ‘mod_bessel_k1’:
optimal_interpolation.F90:151:0: warning: control reaches end of non-void function [-Wreturn-type]
         return
 ^

but I can't say if these warnings are related to the segfault.

The cause of the segfault must be that something is wrong with the
initialization of global variables. Since these seem to be defined in
Fortran code, I can't try to inspect the code to find the cause. But
the fact that the segfault didn't occur at your machine indicates that
the reason is undefined order of initialization: If the initialization
of any global variable accesses another global variable, this should
possibly be coded differently (in C this would have to be coded with
static variables in functions).

Olaf

--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

backtrace-pkg-install-octave-4.2 (11K) Download Attachment
signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pending optiminterp-0.3.5 release

Oliver Heimlich
On 14.08.2017 21:33, Olaf Till wrote:

> (I'd like to have the technical discussions at the mailing list, not
> at the release forum.)
>
> Alexander,
>
> installing the new tarball segfaults for me, both with Octave-4.0 and
> Octave-4.2. The segfault happens at the loading of optimiterp.oct.
>
> Attached is the upper part of the backtrace with Octave-4.2. Compiler
> warnings with -Wall were:
>
> optimal_interpolation.F90: In function ‘mod_bessel_k1’:
> optimal_interpolation.F90:151:0: warning: control reaches end of non-void function [-Wreturn-type]
>          return
>  ^
>
> but I can't say if these warnings are related to the segfault.
>
> The cause of the segfault must be that something is wrong with the
> initialization of global variables. Since these seem to be defined in
> Fortran code, I can't try to inspect the code to find the cause. But
> the fact that the segfault didn't occur at your machine indicates that
> the reason is undefined order of initialization: If the initialization
> of any global variable accesses another global variable, this should
> possibly be coded differently (in C this would have to be coded with
> static variables in functions).

I can't confirm this problem on my computer.  I do not see warnings
during installation.  I can load optiminterp in Octave and run the
example_optiminterp function without errors.

I am not familiar with Fortran.  Could this be a compiler problem?  I am
testing on Debian Jessie with GCC 4.9.2.

Oliver

Reply | Threaded
Open this post in threaded view
|

Re: pending optiminterp-0.3.5 release

Dmitri A. Sergatskov


On Sun, Aug 20, 2017 at 10:51 AM, Oliver Heimlich <[hidden email]> wrote:

>
> The cause of the segfault must be that something is wrong with the
> initialization of global variables. Since these seem to be defined in
> Fortran code, I can't try to inspect the code to find the cause. But
> the fact that the segfault didn't occur at your machine indicates that
> the reason is undefined order of initialization: If the initialization
> of any global variable accesses another global variable, this should
> possibly be coded differently (in C this would have to be coded with
> static variables in functions).

I can't confirm this problem on my computer.  I do not see warnings
during installation.  I can load optiminterp in Octave and run the
example_optiminterp function without errors.

I am not familiar with Fortran.  Could this be a compiler problem?  I am
testing on Debian Jessie with GCC 4.9.2.


​I do not get segfault, but running ​test_optiminterp_err resultsin:

octave:1> test_optiminterp_err
Testing 2D-optimal interpolation (analysis and error field): error: unexpected large RMS difference (analysis)
error: called from
    test_optiminterp_err at line 96 column 3
octave:1> rms
rms =  0.11872
octave:2>

 

Oliver


​Dmitri.
--

Reply | Threaded
Open this post in threaded view
|

Re: pending optiminterp-0.3.5 release

Oliver Heimlich
On 20.08.2017 18:33, Dmitri A. Sergatskov wrote:

> ​I do not get segfault, but running ​test_optiminterp_err resultsin:
>
> octave:1> test_optiminterp_err
> Testing 2D-optimal interpolation (analysis and error field): error:
> unexpected large RMS difference (analysis)
> error: called from
>     test_optiminterp_err at line 96 column 3
> octave:1> rms
> rms =  0.11872
> octave:2>

After working through all test scripts my impression is that this test
is known to produce an error (that's why it has the name “_err”).

https://github.com/Alexander-Barth/octave-optiminterp/pull/1

Oliver

Reply | Threaded
Open this post in threaded view
|

Re: pending optiminterp-0.3.5 release

Olaf Till-2
In reply to this post by Oliver Heimlich
Please keep all technical discussions triggered by releases on the
maintainers mailing list. I think it's better to have them here, for
all to see them. And we should not get locked into sourceforges
tracker. I think the release tracker should only be used for very
simple issues, ideally only to post the release and to mark it
finished.

On Sun, Aug 20, 2017 at 05:51:31PM +0200, Oliver Heimlich wrote:
> I can't confirm this problem on my computer.  I do not see warnings
> during installation.  I can load optiminterp in Octave and run the
> example_optiminterp function without errors.
>
> I am not familiar with Fortran.  Could this be a compiler problem?  I am
> testing on Debian Jessie with GCC 4.9.2.

Probably got it: optimerp.oct got linked to wrong Octave libraries (to
those in the system library directories). I've been struck by this
subtle problem before. If not cared for, it will always be triggered
if the currently used Octave is under a 'local' path but there is
another Octave installed under the standard system path. A not so
unusual situation, possibly.

The culprit in optiminterp is probably FLIBS in src/Makefile, which
contains -L directives for the standard system library directories and
is placed in the commandline of the mkoctfile call. The problem with
this is that mkoctfile places these -L directives _before_ the -L
directives for the native Octave libraries in linker calls.

The solution I had used before is to query for 'mkoctfile -p
OCT_LINK_OPTS', put the -L directives for external libraries (now in
FLIBS in the case of optiminterp) at the end of OCT_LINK_OPTS, and
call mkoctfile like:

OCT_LINK_OPTS="$(OCT_LINK_OPTS)" $(MKOCTFILE)...

This will place these -L directives _after_ those for the native
Octave libraries.

Alexander, it's an external package, do you want me to supply a patch
anyway? If so, please synchronize the OF repository of optiminterp,
I'll only rely on this repository clone.

What I'd also like to change in the same go is:

- renaming autogen.sh to bootstrap to be able to use the standard root
  Makefile  without changes

- renaming configure.in to configure.ac in bootstrap to work around a
  probable bug in some autoconf versions (and to use the now preferred
  naming scheme)

Olaf

--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pending optiminterp-0.3.5 release

Olaf Till-2
On Wed, Aug 23, 2017 at 05:10:02PM +0200, Olaf Till wrote:
> Alexander, it's an external package, do you want me to supply a patch
> anyway?

A simple patch tested here to fix this issue, and a preceding patch to
make building work at my system, are at:

https://savannah.gnu.org/patch/index.php?9443

If you want I'll commit them to the Octave Forge repository clone.

Olaf

--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pending optiminterp-0.3.5 release

Olaf Till-2
On Fri, Aug 25, 2017 at 03:48:17PM +0200, Olaf Till wrote:

> On Wed, Aug 23, 2017 at 05:10:02PM +0200, Olaf Till wrote:
> > Alexander, it's an external package, do you want me to supply a patch
> > anyway?
>
> A simple patch tested here to fix this issue, and a preceding patch to
> make building work at my system, are at:
>
> https://savannah.gnu.org/patch/index.php?9443
>
> If you want I'll commit them to the Octave Forge repository clone.
Alexander,

since you said at the tracker you have applied the patches to your
external repo, please synchronize the OF repo of optiminterp so we can
go ahead with the release.

Olaf

--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pending optiminterp-0.3.5 release

Olaf Till-2
On Fri, Sep 01, 2017 at 01:54:43PM +0200, Olaf Till wrote:

> On Fri, Aug 25, 2017 at 03:48:17PM +0200, Olaf Till wrote:
> > On Wed, Aug 23, 2017 at 05:10:02PM +0200, Olaf Till wrote:
> > > Alexander, it's an external package, do you want me to supply a patch
> > > anyway?
> >
> > A simple patch tested here to fix this issue, and a preceding patch to
> > make building work at my system, are at:
> >
> > https://savannah.gnu.org/patch/index.php?9443
> >
> > If you want I'll commit them to the Octave Forge repository clone.
>
> Alexander,
>
> since you said at the tracker you have applied the patches to your
> external repo, please synchronize the OF repo of optiminterp so we can
> go ahead with the release.
>
> Olaf
Ping...

--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

signature.asc (836 bytes) Download Attachment