Package: libfftw3-3
Version: 3.2.2-1
Severity: normal

Fortran programs using libfftw3-3 segfault on this machine, amd64, while 
the
same programs run correctly on a i686 machine.  Both machines are up-to-
date
testing.  I have made a short example program showing the problem:

cgm@offnode5:~/QPO/waved$ cat badfftw3.f90
!***********************************************************************
! badfftw3.f90   test program for segfault
! 
!   compile:   gfortran -lfftw3 -lm -o badfftw3 -Wall badfftw3.f90
!***********************************************************************

PROGRAM badfftw3

IMPLICIT NONE

INTEGER :: n,i
PARAMETER (n=2**7)

INTEGER, PARAMETER :: dc=kind(0.0D0)
INTEGER :: seed(3)
REAL :: R
REAL (KIND=dc) :: y(n)
COMPLEX (kind=dc) :: yfft(n),zfft(n)

INTEGER :: fplan,bplan   !forward and backward plans
INTEGER, PARAMETER :: fftw_forward=-1
INTEGER, PARAMETER :: fftw_backward=+1
INTEGER, PARAMETER :: fftw_estimate=64

CALL dfftw_plan_dft_1d(fplan,n,yfft,yfft, fftw_forward,fftw_estimate)
CALL dfftw_plan_dft_1d(bplan,n,zfft,zfft, fftw_backward,fftw_estimate)


      call itime(seed)        ! seed the RNG
      R=rand(seed(1)*seed(2)+seed(3))

   DO i=1,n
    y(i)=rand(0)
   END DO

  WRITE(*,*) 'setup'
!** find the FFT of the time series
  yfft=y
  WRITE(*,*) 'ready'
  CALL dfftw_execute(fplan)                                                     
                             
                                                                                
                             
  Write(*,*) 'fft'                                                              
                             
    zfft = yfft                                                                 
                             
  Write(*,*) 'multiplied'                                                       
                             
                                                                                
                             
    CALL dfftw_execute(bplan)                                                   
                             
    Write(*,*) 'inverted'                                                       
                             
    

!  unnecessary cleanup

CALL dfftw_destroy_plan(fplan)
CALL dfftw_destroy_plan(bplan)

END PROGRAM badfftw3

When I compile and run it:

cgm@offnode5:~/QPO/waved$ gfortran -lfftw3 -lm -o badfftw3 -Wall
badfftw3.f90
cgm@offnode5:~/QPO/waved$ ./badfftw3
 setup
 ready
Segmentation fault

On the 686 machine it runs to completion with no problems.  In other
programs, a direct fft works but there is a segfault for an inverse fft.
It seems to be definitely architecture-dependent.

Other possibly useful information:

cgm@offnode5:~/QPO/waved$ ldd badfftw3
        linux-vdso.so.1 =>  (0x00007fff67ce5000)
        libfftw3.so.3 => /usr/lib/libfftw3.so.3 (0x00007f9824be3000)
        libgfortran.so.3 => /usr/lib/libgfortran.so.3 
(0x00007f98248fc000)
        libm.so.6 => /lib/libm.so.6 (0x00007f9824679000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f9824463000)
        libc.so.6 => /lib/libc.so.6 (0x00007f9824102000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f9823ee5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f9824efb000)
cgm@offnode5:~/QPO/waved$ apt-file find /usr/lib/libfftw3.so*
libfftw3-3: /usr/lib/libfftw3.so.3
libfftw3-3: /usr/lib/libfftw3.so.3.2.4
libfftw3-dev: /usr/lib/libfftw3.so
cgm@offnode5:~/QPO/waved$ apt-cache policy libfftw3-3
libfftw3-3:
  Installed: 3.2.2-1
  Candidate: 3.2.2-1
  Version table:
 *** 3.2.2-1 0
        500 http://ftp.us.debian.org/debian/ testing/main amd64 Packages
        100 /var/lib/dpkg/status

On the 686 machine, where everything works, things are the same except 
that
the libfftw3-3 package is i386 instead of amd64.

Please let me know if additional information would be useful.

regards   cgm

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libfftw3-3 depends on:
ii  libc6                         2.11.2-11  Embedded GNU C Library: 
Shared lib

libfftw3-3 recommends no packages.

Versions of packages libfftw3-3 suggests:
ii  libfftw3-dev                  3.2.2-1    library for computing Fast 
Fourier

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to