victortxa
victortxa

Reputation: 99

Internal compiler error (gfc_omp_clause_default_ctor) in gfortran, with OpenMP and FFTW

I am trying to compile a code in which there is a nested loop where I use OpenMp for the first loop. The program is very similar to the one in this issue, including the use of FFTW. The error is:

 DO indiceY=1+2*window,ny-2*window
 ^
 internal compiler error: in gfc_omp_clause_default_ctor, at fortran/trans-openmp.c:481
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.

The code piece in which the problem is appointed:

call dfftw_init_threads(iret)
!nthreads = omp_get_num_thread()
call dfftw_plan_with_nthreads(nthreads)
!***********************************
CALL dfftw_plan_dft_3d(plan, filter_window, filter_window, filter_window, OUTPUT_FFTW, OUTPUT_FFTW, FFTW_FORWARD, FFTW_ESTIMATE)
!$OMP PARALLEL DO DEFAULT(SHARED) SHARED(matrix_in, window, filter_window, plan, nx, ny, nz) &
!$OMP PRIVATE(indiceX, indiceY, indiceZ, OUTPUT_FFTW, matrix_out)
DO indiceZ=1+2*window,nz-2*window
    DO indiceY=1+2*window,ny-2*window
        DO indiceX=1+2*window,nx-2*window
            OUTPUT_FFTW = ABS(matrix_in(indiceX-2*window:indiceX, indiceY-window:indiceY+window,& 
                                                                 indiceZ-window:indiceZ+window) - &
                              matrix_in(indiceX:indiceX+2*window, indiceY-window:indiceY+window,&
                                                                 indiceZ-window:indiceZ+window) )
            CALL dfftw_execute_dft(plan, OUTPUT_FFTW, OUTPUT_FFTW)
            matrix_outX(indiceX, indiceY, indiceZ) = SUM(ABS(OUTPUT_FFTW))
        END DO
    END DO
END DO
!$OMP END PARALLEL DO
CALL dfftw_destroy_plan(plan)
!***********************************
CALL dfftw_cleanup_threads()

Firstly, I suspected that it was a problem with memory (RAM) space, but I reduced the size of the 3D matrix in the calculation and the problem persisted. I have already looked if this is a reported bug (and really a bug but it doesn't appear to be).

I also suspected it was a problem with the gfortran version, so I installed gfortran-5, but the error persisted (internal compiler error: in gfc_omp_clause_default_ctor, at fortran/trans-openmp.c:481 I am using a 64 bit Ubuntu 14.04 (3.13.0-119-generic).

Upvotes: 0

Views: 158

Answers (0)

Related Questions