bugGNU Octave - Bugs: bug #51963, [octave forge] (statistics) test...

 
 

bug #51963: [octave forge] (statistics) test normpdf fails after __opengl_info__ using fltk on Intel graphics on Windows

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Fri 08 Sep 2017 09:22:45 AM UTC  
 
Category:  Octave Forge Package Severity:  2 - Minor
Priority:  3 - Low Item Group:  Inaccurate Result
Status:  None Assigned to:  None
Originator Name:  Avinoam Open/Closed:  Open
Release:  dev Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Tue 22 Jan 2019 10:58:24 PM UTC, comment #7: 

Reassigning to the statistics package, since normpdf has been moved from Octave to the package.

The most likely solution here seems to be to increase the test tolerance to accommodate Windows systems.

Mike Miller <mtmiller>
Project Administrator
Sat 09 Sep 2017 04:58:01 PM UTC, comment #6: 

OK, thanks.  I'll let JWE consider what the power operator (^) translates to in terms of library verses low-level CPU instructions.  If I had to guess, I'd say that Intel graphics plus Intel CPU means that the designers of the former knew a bit more under the hood and altered some math unit configuration that affected the last bit of a math operation, e.g., co-processor or something.  The solution will probably boil down to allowing a bit of tolerance in this test.

Dan Sebald <sebald>
Sat 09 Sep 2017 03:06:19 PM UTC, comment #5: 

The problem is here:

y1 = (2 * pi)^(- 1/2);
graphics_toolkit ("fltk");
__opengl_info__ ();
y4 = (2 * pi)^(- 1/2);
y1 - y4
ans =   5.5511e-017

This is 64 bit windows binary

Avinoam Kalma <avinoam>
Project Member
Sat 09 Sep 2017 03:05:27 AM UTC, comment #4: 

It this for 32 or 64 bit windows binary?

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 09 Sep 2017 01:37:59 AM UTC, comment #3: 

OK, so it's not sqrt() or exp() that is changing.

I think I see the difference in formulas.  It's in stdnormal_pdf.m where the PDF values are computed.  In that routine, the formula is

pdf = (2 * pi)^(- 1/2) * exp (- x .^ 2 / 2);

while in the test in normpdf.m the formula for the comparison is

y = 1/sqrt(2*pi)*exp (-(x-1).^2/2);

So, my guess would be something with division then.  But let's try them all again.  What result do you see for this:

[exit and relaunch Octave...]
y1 = (2 * pi)^(- 1/2);
y2 = 1/sqrt(2*pi);
y3 = exp(-1/2);
graphics_toolkit ("fltk");
__opengl_info__ ();
y4 = (2 * pi)^(- 1/2);
y5 = 1/sqrt(2*pi);
y6 = exp(-1/2);
y1 - y4
y2 - y5
y3 - y6
%

Dan Sebald <sebald>
Fri 08 Sep 2017 10:12:57 PM UTC, comment #2: 

Checking the script from comment #1

>> y1 - y2

ans =

   0   0   0   0

Avinoam Kalma <avinoam>
Project Member
Fri 08 Sep 2017 06:11:26 PM UTC, comment #1: 

Your example error looks to be of the tolerance variety, i.e., the answer is correct but it is numerical precision that differs:

Abs err 5.5511e-017 exceeds tol 0

Rik might have more insight as to why a tolerance of 0 works here.  I assume that if one follows the normpdf function all the way through it will come back to the

y = 1/sqrt(2*pi)*exp (-(x-1).^2/2)

formula.  However, it's odd that after you launch Intel graphics driver support, then the tolerance fails.  Could it be that the Intel driver is taking over some of the numerical library routines for exponentiation?  I.e., that somehow the above expression for y as an Octave command is using the numerical library yet when the above expression is evaluated via normpdf it is using some Intel library?

Could you try something like:

x = [-Inf 1 2 Inf];
y1 = 1/sqrt(2*pi)*exp (-(x-1).^2/2);
graphics_toolkit ("fltk");
__opengl_info__ ();
y2 = 1/sqrt(2*pi)*exp (-(x-1).^2/2);
y1 - y2

to narrow down if maybe it is the sqrt() or exp() routine that changes?  Or any other sequence you can think of that might be useful.

It sure is odd that only FLTK causes this whereas Qt toolkit works.

Dan Sebald <sebald>
Fri 08 Sep 2017 09:22:45 AM UTC, original submission:  

>> test normpdf
PASSES 18 out of 18 tests
>> graphics_toolkit ("qt");
>> test normpdf
PASSES 18 out of 18 tests
>> __opengl_info__ ();
   version: 3.1.0 - Build 9.17.10.4459
    vendor: Intel
  renderer: Intel(R) HD Graphics
extensions:
  GL_EXT_blend_minmax
  GL_EXT_blend_subtract
  GL_EXT_blend_color
  GL_EXT_abgr
  GL_EXT_texture3D
  GL_EXT_clip_volume_hint
  GL_EXT_compiled_vertex_array
  GL_SGIS_texture_edge_clamp
  GL_SGIS_generate_mipmap
  GL_EXT_draw_range_elements
  GL_SGIS_texture_lod
  GL_EXT_rescale_normal
  GL_EXT_packed_pixels
  GL_EXT_texture_edge_clamp
  GL_EXT_separate_specular_color
  GL_ARB_multitexture
  GL_EXT_texture_env_combine
  GL_EXT_bgra
  GL_EXT_blend_func_separate
  GL_EXT_secondary_color
  GL_EXT_fog_coord
  GL_EXT_texture_env_add
  GL_ARB_texture_cube_map
  GL_ARB_transpose_matrix
  GL_ARB_texture_env_add
  GL_IBM_texture_mirrored_repeat
  GL_EXT_multi_draw_arrays
  GL_NV_blend_square
  GL_ARB_texture_compression
  GL_3DFX_texture_compression_FXT1
  GL_EXT_texture_filter_anisotropic
  GL_ARB_texture_border_clamp
  GL_ARB_point_parameters
  GL_ARB_texture_env_combine
  GL_ARB_texture_env_dot3
  GL_ARB_texture_env_crossbar
  GL_EXT_texture_compression_s3tc
  GL_ARB_shadow
  GL_ARB_window_pos
  GL_EXT_shadow_funcs
  GL_EXT_stencil_wrap
  GL_ARB_vertex_program
  GL_EXT_texture_rectangle
  GL_ARB_fragment_program
  GL_EXT_stencil_two_side
  GL_ATI_separate_stencil
  GL_ARB_vertex_buffer_object
  GL_EXT_texture_lod_bias
  GL_ARB_occlusion_query
  GL_ARB_fragment_shader
  GL_ARB_shader_objects
  GL_ARB_shading_language_100
  GL_ARB_texture_non_power_of_two
  GL_ARB_vertex_shader
  GL_NV_texgen_reflection
  GL_ARB_point_sprite
  GL_ARB_fragment_program_shadow
  GL_EXT_blend_equation_separate
  GL_ARB_depth_texture
  GL_ARB_texture_rectangle
  GL_ARB_draw_buffers
  GL_ARB_color_buffer_float
  GL_ARB_half_float_pixel
  GL_ARB_texture_float
  GL_ARB_pixel_buffer_object
  GL_EXT_framebuffer_object
  GL_ARB_draw_instanced
  GL_ARB_half_float_vertex
  GL_ARB_occlusion_query2
  GL_EXT_draw_buffers2
  GL_WIN_swap_hint
  GL_EXT_texture_sRGB
  GL_ARB_multisample
  GL_EXT_packed_float
  GL_EXT_texture_shared_exponent
  GL_ARB_texture_rg
  GL_ARB_texture_compression_rgtc
  GL_NV_conditional_render
  GL_EXT_texture_swizzle
  GL_ARB_sync
  GL_ARB_framebuffer_sRGB
  GL_EXT_packed_depth_stencil
  GL_ARB_depth_buffer_float
  GL_EXT_transform_feedback
  GL_EXT_framebuffer_blit
  GL_EXT_framebuffer_multisample
  GL_ARB_framebuffer_object
  GL_EXT_texture_array
  GL_EXT_texture_integer
  GL_ARB_map_buffer_range
  GL_EXT_texture_snorm
  GL_INTEL_performance_queries
  GL_ARB_copy_buffer
  GL_ARB_sampler_objects
  GL_NV_primitive_restart
  GL_ARB_seamless_cube_map
  GL_ARB_uniform_buffer_object
  GL_ARB_depth_clamp
  GL_ARB_vertex_array_bgra
  GL_ARB_shader_bit_encoding
  GL_ARB_draw_buffers_blend
  GL_ARB_texture_query_lod
  GL_ARB_explicit_attrib_location
  GL_ARB_draw_elements_base_vertex
  GL_ARB_instanced_arrays
  GL_ARB_fragment_coord_conventions
  GL_EXT_gpu_program_parameters
  GL_ARB_texture_buffer_object_rgb32
  GL_ARB_compatibility
  GL_ARB_texture_rgb10_a2ui
  GL_ARB_vertex_type_2_10_10_10_rev
  GL_ARB_timer_query
  GL_INTEL_map_texture
  GL_ARB_vertex_array_object
  GL_ARB_provoking_vertex
>> graphics_toolkit ("fltk");
>> test normpdf
PASSES 18 out of 18 tests
>> __opengl_info__ ();
   version: 3.1.0 - Build 9.17.10.4459
    vendor: Intel
  renderer: Intel(R) HD Graphics
extensions:
  GL_EXT_blend_minmax
  GL_EXT_blend_subtract
  GL_EXT_blend_color
  GL_EXT_abgr
  GL_EXT_texture3D
  GL_EXT_clip_volume_hint
  GL_EXT_compiled_vertex_array
  GL_SGIS_texture_edge_clamp
  GL_SGIS_generate_mipmap
  GL_EXT_draw_range_elements
  GL_SGIS_texture_lod
  GL_EXT_rescale_normal
  GL_EXT_packed_pixels
  GL_EXT_texture_edge_clamp
  GL_EXT_separate_specular_color
  GL_ARB_multitexture
  GL_EXT_texture_env_combine
  GL_EXT_bgra
  GL_EXT_blend_func_separate
  GL_EXT_secondary_color
  GL_EXT_fog_coord
  GL_EXT_texture_env_add
  GL_ARB_texture_cube_map
  GL_ARB_transpose_matrix
  GL_ARB_texture_env_add
  GL_IBM_texture_mirrored_repeat
  GL_EXT_multi_draw_arrays
  GL_NV_blend_square
  GL_ARB_texture_compression
  GL_3DFX_texture_compression_FXT1
  GL_EXT_texture_filter_anisotropic
  GL_ARB_texture_border_clamp
  GL_ARB_point_parameters
  GL_ARB_texture_env_combine
  GL_ARB_texture_env_dot3
  GL_ARB_texture_env_crossbar
  GL_EXT_texture_compression_s3tc
  GL_ARB_shadow
  GL_ARB_window_pos
  GL_EXT_shadow_funcs
  GL_EXT_stencil_wrap
  GL_ARB_vertex_program
  GL_EXT_texture_rectangle
  GL_ARB_fragment_program
  GL_EXT_stencil_two_side
  GL_ATI_separate_stencil
  GL_ARB_vertex_buffer_object
  GL_EXT_texture_lod_bias
  GL_ARB_occlusion_query
  GL_ARB_fragment_shader
  GL_ARB_shader_objects
  GL_ARB_shading_language_100
  GL_ARB_texture_non_power_of_two
  GL_ARB_vertex_shader
  GL_NV_texgen_reflection
  GL_ARB_point_sprite
  GL_ARB_fragment_program_shadow
  GL_EXT_blend_equation_separate
  GL_ARB_depth_texture
  GL_ARB_texture_rectangle
  GL_ARB_draw_buffers
  GL_ARB_color_buffer_float
  GL_ARB_half_float_pixel
  GL_ARB_texture_float
  GL_ARB_pixel_buffer_object
  GL_EXT_framebuffer_object
  GL_ARB_draw_instanced
  GL_ARB_half_float_vertex
  GL_ARB_occlusion_query2
  GL_EXT_draw_buffers2
  GL_WIN_swap_hint
  GL_EXT_texture_sRGB
  GL_ARB_multisample
  GL_EXT_packed_float
  GL_EXT_texture_shared_exponent
  GL_ARB_texture_rg
  GL_ARB_texture_compression_rgtc
  GL_NV_conditional_render
  GL_EXT_texture_swizzle
  GL_ARB_sync
  GL_ARB_framebuffer_sRGB
  GL_EXT_packed_depth_stencil
  GL_ARB_depth_buffer_float
  GL_EXT_transform_feedback
  GL_EXT_framebuffer_blit
  GL_EXT_framebuffer_multisample
  GL_ARB_framebuffer_object
  GL_EXT_texture_array
  GL_EXT_texture_integer
  GL_ARB_map_buffer_range
  GL_EXT_texture_snorm
  GL_INTEL_performance_queries
  GL_ARB_copy_buffer
  GL_ARB_sampler_objects
  GL_NV_primitive_restart
  GL_ARB_seamless_cube_map
  GL_ARB_uniform_buffer_object
  GL_ARB_depth_clamp
  GL_ARB_vertex_array_bgra
  GL_ARB_shader_bit_encoding
  GL_ARB_draw_buffers_blend
  GL_ARB_texture_query_lod
  GL_ARB_explicit_attrib_location
  GL_ARB_draw_elements_base_vertex
  GL_ARB_instanced_arrays
  GL_ARB_fragment_coord_conventions
  GL_EXT_gpu_program_parameters
  GL_ARB_texture_buffer_object_rgb32
  GL_ARB_compatibility
  GL_ARB_texture_rgb10_a2ui
  GL_ARB_vertex_type_2_10_10_10_rev
  GL_ARB_timer_query
  GL_INTEL_map_texture
  GL_ARB_vertex_array_object
  GL_ARB_provoking_vertex
>> test normpdf
***** assert (normpdf (x, ones (1,4), ones (1,4)), y)
!!!!! test failed
ASSERT errors for:  assert (normpdf (x, ones (1, 4), ones (1, 4)),y)

  Location  |  Observed  |  Expected  |  Reason
    (2)        0.39894      0.39894      Abs err 5.5511e-017 exceeds tol 0
    (3)        0.24197      0.24197      Abs err 2.7756e-017 exceeds tol 0
shared variables   scalar structure containing the fields:

    x =

      -Inf     1     2   Inf

    y =

       0.00000   0.39894   0.24197   0.00000

I see this failure in Machine with Intel Graphics card, but not on another machine with another card.

Avinoam Kalma <avinoam>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by sebald (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by avinoam (Submitted the item)
  • -email is unavailable- added by avinoam
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-22 mtmiller CategoryPlotting with OpenGL => Octave Forge Package
        Summarytest normpdf fails after _opengl_info_ using fltk on Intel graphics on Windows => [octave forge] (statistics) test normpdf fails after __opengl_info__ using fltk on Intel graphics on Windows
    2017-09-08 avinoam Releaseother => dev
    2017-09-08 mtmiller Severity3 - Normal => 2 - Minor
        Priority5 - Normal => 3 - Low
        Item GroupRegression => Inaccurate Result
        Summary[Windows] test normpdf fails after test _opengl_info_ using fltk => test normpdf fails after __opengl_info__ using fltk on Intel graphics on Windows
    2017-09-08 avinoam Carbon-Copy- => Added a.kalma@gmail.com

    Back to the top


    Powered by Savane 3.6