help-octave
[Top][All Lists]
Advanced

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

RE: Problem with FFT and Intel compiler in "test fft2 verbose" or make c


From: RUSS BRENNAN
Subject: RE: Problem with FFT and Intel compiler in "test fft2 verbose" or make check
Date: Tue, 7 Sep 2010 10:14:24 -0500

Thanks for the tip.  I couldn't figure out how to get the test to run using your method of including valgrind but I was able to run an octave session in valgrind by using "./run-octave -valgrind", which works pretty well. 

Doing some digging led me to realize that there are "interfaces" for the fftw3 routines that can be compiled, and are included with the intel compiler.  The function call that seems to be seg faulting is available in libmkl_intel.so, and I think that might be the function that is being called.  It is also available when the interfaces are built in libfftw3xf_intel.a and libfftw3xc_intel.a.  Is there a way to tell exactly which is being called?  It doesnt seem to make sense for intel to include this method in their prebuild library and then also provide it in the optionally built interfaces.

Furthermore, the libraries mkl_gf and mkl_def seem to define some of the same functions as mkl_intel.  I'm afraid it may be time for me to actually RTFM....

The following is a snippet of the seg fault valgrind output:

31084== Invalid read of size 8
==31084==    at 0x7F37D47: __intel_sse2_strlen (in /opt/intel/Compiler/11.1/073/lib/ia32/libirc.so)
==31084==    by 0x462C56A: octave_base_stream::printf(std::string const&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x462F9AC: octave_stream::printf(std::string const&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x462FB11: octave_stream::printf(octave_value const&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x43C62F9: Fsprintf(octave_value_list const&, int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x487963A: octave_builtin::do_multi_index_op(int, octave_value_list const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x4879215: octave_builtin::subsref(std::string const&, std::list<octave_value_list, std::allocator<octave_value_list> > const&, int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x4879B8B: octave_builtin::subsref(std::string const&, std::list<octave_value_list, std::allocator<octave_value_list> > const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x4817376: octave_value::subsref(std::string const&, std::list<octave_value_list, std::allocator<octave_value_list> > const&, int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x496EDB4: tree_index_expression::rvalue(int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x496EF00: tree_index_expression::rvalue1(int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x495480D: tree_argument_list::convert_to_const_vector(octave_value const*) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==  Address 0x8D887D0 is 8 bytes inside a block of size 10 alloc'd
==31084==    at 0x4004BBE: operator new[](unsigned) (vg_replace_malloc.c:197)
==31084==    by 0x56CABAE: strsave(char const*) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/liboctave/liboctave.so)
==31084==    by 0x46360BA: printf_format_elt::printf_format_elt(char const*, int, int, int, std::string const&, char, char) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x46234EB: printf_format_list::add_elt_to_list(int, std::string const&, int, int, char, char, int&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x46230EA: printf_format_list::printf_format_list(std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x462C4B6: octave_base_stream::printf(std::string const&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x462F9AC: octave_stream::printf(std::string const&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x462FB11: octave_stream::printf(octave_value const&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x43C62F9: Fsprintf(octave_value_list const&, int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x487963A: octave_builtin::do_multi_index_op(int, octave_value_list const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x4879215: octave_builtin::subsref(std::string const&, std::list<octave_value_list, std::allocator<octave_value_list> > const&, int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x4879B8B: octave_builtin::subsref(std::string const&, std::list<octave_value_list, std::allocator<octave_value_list> > const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==
==31084== Invalid read of size 4
==31084==    at 0x6595058: fftw_plan_many_dft_r2c (in /opt/intel/Compiler/11.1/073/mkl/lib/32/libmkl_intel.so)
==31084==  Address 0x4 is not stack'd, malloc'd or (recently) free'd
panic: Segmentation fault -- stopping myself...
==31084==
==31084== Invalid read of size 8
==31084==    at 0x4741092: octave_vformat(std::ostream&, char const*, char*) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x43AFE45: verror(bool, std::ostream&, char const*, char const*, char const*, char*) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x43B069F: vmessage(char const*, char const*, char*) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x43B06DE: message(char const*, char const*, ...) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x45C2E2F: dump_octave_core() (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x46F9DD8: my_friendly_exit(char const*, int, bool) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x46F9F35: generic_sig_handler(int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x559C97: (within /lib/tls/libpthread-2.3.4.so)
==31084==  Address 0x8B48CD0 is 8 bytes before a block of size 893 alloc'd
==31084==    at 0x4004BBE: operator new[](unsigned) (vg_replace_malloc.c:197)
==31084==    by 0x47412C8: octave_vsnprintf(char const*, char*) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x474104E: octave_vformat(std::ostream&, char const*, char*) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x4741007: octave_format(std::ostream&, char const*, ...) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x4638CE0: int do_printf_conv<char const*>(std::ostream&, char const*, int, int, int, char const*, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x462B43D: octave_base_stream::do_printf(printf_format_list&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x462C56A: octave_base_stream::printf(std::string const&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x462F9AC: octave_stream::printf(std::string const&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x462FB11: octave_stream::printf(octave_value const&, octave_value_list const&, std::string const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x43C62F9: Fsprintf(octave_value_list const&, int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x487963A: octave_builtin::do_multi_index_op(int, octave_value_list const&) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x4879215: octave_builtin::subsref(std::string const&, std::list<octave_value_list, std::allocator<octave_value_list> > const&, int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
  not in syscall (0xB0044ADC - 0xB0044B31)

valgrind: m_syswrap/syswrap-main.c:606 (vgPlain_client_syscall): Assertion 'sci->status.what == SsIdle' failed.
==31084==    at 0xB000E029: report_and_quit (m_libcassert.c:122)
==31084==    by 0xB000E1C2: vgPlain_assert_fail (m_libcassert.c:185)
==31084==    by 0xB003AEA6: vgPlain_client_syscall (syswrap-main.c:606)
==31084==    by 0xB002C826: handle_syscall (scheduler.c:623)
==31084==    by 0xB002CAED: vgPlain_scheduler (scheduler.c:726)
==31084==    by 0xB0014568: final_tidyup (m_main.c:2716)
==31084==    by 0xB00141C9: shutdown_actions_NORETURN (m_main.c:2578)
==31084==    by 0xB003C2D5: run_a_thread_NORETURN (syswrap-linux.c:139)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==31084==    at 0x339986: munmap (in /lib/tls/libc-2.3.4.so)
==31084==    by 0x37C3B6: _nl_locale_subfreeres (in /lib/tls/libc-2.3.4.so)
==31084==    by 0x37C0D7: free_mem (in /lib/tls/libc-2.3.4.so)
==31084==    by 0x37C811: __libc_freeres (in /lib/tls/libc-2.3.4.so)
==31084==    by 0x4001336: _vgw_freeres (vg_preloaded.c:62)
==31084==    by 0x559AF3: raise (in /lib/tls/libpthread-2.3.4.so)
==31084==    by 0x46F9E2C: my_friendly_exit(char const*, int, bool) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)
==31084==    by 0x46F9F35: generic_sig_handler(int) (in /home/adminuser/sources/OctaveDeps/octave-3.2.3/src/liboctinterp.so)


> Date: Mon, 6 Sep 2010 16:08:50 +0100
> Subject: Re: Problem with FFT and Intel compiler in "test fft2 verbose" or make check
> From: address@hidden
> To: address@hidden
> CC: address@hidden
>
> On Mon, Sep 6, 2010 at 12:56 PM, RUSS BRENNAN <address@hidden> wrote:
> > I have tried using fftw 3.2.2 as well as the MKL fft routines but I get the
> > same error with both when compiling with the intel compiler.  The fft2 test
> > fails with a segmentation fault. I am thinking that it probably has
> > something to do with intel providing it's own fft routines, and the compiler
> > getting confused about which one to call... but that wouldn't explain why I
> > get the seg fault when trying to use the MKL libraries.
> >
> > Has anyone seen this before, and if not how should I go about debugging
> > this?  Is there an easy way to run octave in valgrind?
> >
> > TIA,
> >
> > Russell
>
> I can't help with most of your question. I do frequently use valgrind
> to test my oct files. write a short m-file script that will use the
> code you want to test. then
>
> valgrind octave -q testscript.m
>
> (possibly -qf, if required)
>
> Andy

reply via email to

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