使用OpenMP和FFTW的gfortran中的内部编译器错误(gfc_omp_clause_default_ctor)

时间:2017-05-24 00:14:32

标签: fortran openmp gfortran internal-compiler-error

我正在尝试编译一个代码,其中有一个嵌套循环,我在第一个循环中使用OpenMp。该程序与此issue中的程序非常相似,包括使用FFTW。错误是:

 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.

指定问题的代码段:

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()

首先,我怀疑它是内存(RAM)空间的问题,但我在计算中减小了3D矩阵的大小并且问题仍然存在。我已经看过这是否是一个报告的错误(实际上是一个错误,但似乎没有)。

我还怀疑这是gfortran版本的问题,所以我安装了gfortran-5,但错误仍然存​​在(internal compiler error: in gfc_omp_clause_default_ctor, at fortran/trans-openmp.c:481 我使用的是64位Ubuntu 14.04(3.13.0-119-generic)。

0 个答案:

没有答案