#181 Parallel execution of ITPP modules through OpenMP



When I execute parallel instances of my program simultaniously (through OpenMP), i encountered segmentation faults in some ITPP modules like fft, ifft, AWGN_Channel. However, when i put the above functions under #pragma omp critical flag, i dont see any segmentation fault.

I am using ITPP (4.0.6), Intel C++ compiler (version 11.0) on Intel core 2 Quad processor with latest version Ubuntu on it. I have also observed similar segmentation faults on the latest version of g++ compiler.

I implemented OpenMP to speed up the execution. However if i need to included such crucial functions under critical flag, i wont achieve much gain in execution speed. Hence it is desirable that ITPP functions are capable of being executed in parallel (Multiple simultanious instances).


  • gdb traces at the location of segmentation fault.

    • motffh

      I am doing the samilar job,and i encounteted the same problem.do you solve you problems? if itpp have used parallel tecnolog,do you speed up you program at last?
      i am looking for worward your reply.thanks very much.my mail is bjtuffh@gmil.com.

  • Hi Pradeep,

    Could you please attach a minimal test case, which we can use to reproduce your problems? Please also indicate what compiler flags need to be used for GCC.


  • Test c++ program to reproduce the segmentation fault in FFT

  • Hi Adam,

    Thank you for the response. Pls find attached a test.cpp file which can be used for reproducing the issue.

    Platform details:
    OS: Ubuntu Linux
    Processor: Intel Core 2 QUAD (Has 4 cores)
    Compiler: Intel compiler (icpc). But same fault occurs in G++.


    source /opt/intel/Compiler/11.0/074/bin/ia32/iccvars_ia32.sh //Script to set environmental variables
    icpc test.cpp -O3 -openmp -I /usr/local/include/itpp/ -L/usr/lib -lm -litpp itpp-config --libs

    (gdb) run
    Starting program: /home/pradeep/ScratchPad/a.out
    [Thread debugging using libthread_db enabled]
    Number of parallel threads = 4
    [New Thread 0xb6da96c0 (LWP 14848)]
    [New Thread 0xb6da8b90 (LWP 14851)]
    [New Thread 0xb6d97b90 (LWP 14852)]
    [New Thread 0xb6b96b90 (LWP 14853)]
    [New Thread 0xb6995b90 (LWP 14854)]
    Thread Number = Thread Number = 10

    Thread Number = 2
    Thread Number = 3

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0xb6995b90 (LWP 14854)]
    0xb763ccff in fftw_execute_dft () from /usr/lib/libfftw3.so.3
    (gdb) where

    0 0xb763ccff in fftw_execute_dft () from /usr/lib/libfftw3.so.3

    1 0xb7c772f6 in itpp::fft () from /usr/lib/libitpp.so.6

    2 0xb7c77884 in itpp::fft () from /usr/lib/libitpp.so.6

    3 0x0804a5ce in gGet_FFT ()

    4 0x080497c5 in main ()


  • Hi Pradeep,

    Sorry for not replying to this issue earlier. I no longer have time for maintaining IT++ on a regular basis.

    I can not reproduce the described issues with the trunk sources, which include rewritten RNG implementation (based on DSFMT algorithm). Therefore, could you please try to use the latest SVN trunk sources of IT++ (or Git master branch) to verify this problem? You will need some additional tools installed to build from SVN (git /svn, autoconf, automake and libtool).