[Bug fortran/37644] compiler Segmentation fault
--- Comment #5 from rlnaff at usgs dot gov 2008-11-05 16:08 --- Subject: Re: compiler Segmentation fault Compiled with gfortran 4.3.2 (bash) stoch.pts/10% export LAMHF77=/z/stoch/home/rlnaff/usr/local/bin/gfortran4.3.2 (bash) stoch.pts/10% mpif77 -c -fopenmp reorder_parent.f90 reorder_parent.f90:470: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. kargl at gcc dot gnu dot org wrote: --- Comment #3 from kargl at gcc dot gnu dot org 2008-11-05 04:10 --- Can you attach the code instead of embedded in a message? It's a PITA to strip out HTML from your code when I save it as a file. module common_parameters implicit none ! OMPI? include '/usr/include/mpif.h' ! include 'mpif.h' ! ... kv: precision of variables used in assembly integer, parameter :: kv=selected_real_kind(p=10) ! ... common numbers real(kind=kv), parameter :: n0=0.0_kv, n1=1.0_kv, n2=2.0_kv, n3=3.0_kv, n4=4.0_kv, n5=5.0_kv, n6=6.0_kv, n7=7.0_kv, n8=8.0_kv, n9=9.0_kv, n10=10.0_kv, n100=100.0_kv ! ... common fractions real(kind=kv), parameter :: f2=0.5_kv, f3=n1/n3, f4=0.25_kv, f5=0.2_kv, f6=n1/n6, f7=n1/n7, f8=0.125_kv, f9=n1/n9, f10=0.1_kv ! ... machine smallest number real(kind=kv), parameter :: machine_epsilon=epsilon(n0) real(kind=kv), parameter :: small=n100*machine_epsilon real(kind=kv), save :: MZ=tiny(n0) ! ... interim print character(len=32) :: file_name integer :: interim_print, data_print end module common_parameters ! ... File shared_common_parent.f90 ! ... ! ... Version last modified: R.L. Naff, 07/06 ! ... Purpose: Allow for the transfer of information between modules ! ... and subroutines of parent type. ! ... ! ... Utilization: use module name ! ... ! ... Modules herein: ! ... common_input_types_parent ! ... common_partition_types_parent ! ... common_MPI_types_parent ! ... module common_input_types_parent use common_parameters implicit none integer :: n_x, n_y, n_z end module common_input_types_parent module common_partition_types_parent use common_parameters implicit none integer, save :: max_part, npx, npy, npz integer, save :: ind_rot_rn, dim, no_rows integer, save :: tot_variables integer, save :: no_partitions, red_count, max_C integer, save :: red_part_count, red_node_count, black_node_count integer, save :: max_nodes_A, max_nx, max_ny, max_nz ! ... arrays integer, dimension(:), allocatable :: perm_p, inv_perm_p integer, dimension(:), allocatable :: part_end integer, dimension(:), allocatable :: perm end module common_partition_types_parent module common_reorder_types_parent use common_parameters implicit none integer, dimension(:), allocatable, target :: ii_1, ii_2, ii_3 real(kind=kv), dimension(:), allocatable, target :: C1, C2, C3, CC_1, CC_2, CC_3, coef end module common_reorder_types_parent module common_MPI_types_parent integer :: pc_intracomm, pc_intra_root end module common_MPI_types_parent module reorder_parent ! ... Version last modified: R.L. Naff, 02/07 ! ... Purpose: reorder stiffness coefficients into partitions and ! ... send coefficients to children (slaves). ! ... ! ... Subroutines herein: ! ... subroutine AC_reorder ! ... Called from subroutine MS_PCG_solve, module MS_PCG_parent ! ... Sends or BCasts to Child: coef, C1, C2, C3, ! ... CC_1, CC_2, CC_3 (surrogates for hcoef, C_x, C_y, C_z ! ... and part_con arrays). ! ... ! ... use omp_lib use common_parameters use common_input_types_parent ! ... n_x, n_y, n_z use common_partition_types_parent use common_reorder_types_parent use common_MPI_types_parent !tmp use utilities_parent !tmp use error_handler ! ... pointer arrays holding incoming coefficients real, save, pointer, dimension(:) :: Cii, Cjj, Ckk, hcoef ! ... Arrays pointed in MS_PCG_solve ! ... contains subroutine AC_reorder(i_bound, ib0_count) ! ... Based on domain partitioning, rearrange coefficients and ! ... assign to a process. ! ... ! ... Argument list ! ... integer, intent(out) :: ib0_count integer, dimension(:), intent(in) :: i_bound ! ... ! ... local variables ! ... integer :: p, i, j, k, ii, jj, kk, i_org, xyz_loc integer :: i_1, i_2, i_3, np1, np2, np3 integer :: d_1s, d_2s, d_3s, i_range=range(n1) integer :: n_1, n_2, n_3, d_1, d_2, d_3 integer :: node, row_ct, level_ct, A_nodes integer :: pn_count, ls1, ls2, ls3, e_1, e_2, e_3 integer :: ierr, error, tag_out, a_size integer :: i11, i22, i33, int_real_type integer, dimension(1:3) :: C_count integer, pointer, dimension(:) :: I_point real(kind=kv) :: C11, C22, C33, t_num real :: one=1.0, neg_one=-1.0 real(kind=kv), pointer, dimension(:) :: R_point character(len=64) :: err_loc_message
[Bug fortran/37644] compiler Segmentation fault
--- Comment #6 from rlnaff at usgs dot gov 2008-11-05 16:14 --- Subject: Re: compiler Segmentation fault I installed version 4.3.2 for this test; it was what was available at the time: (bash) stoch.pts/10% ls -l /z/stoch/home/rlnaff/usr/local/bin/gfortran4.3.2 -rwxr-xr-x 2 rlnaff users 473210 2008-09-24 13:05 /z/stoch/home/rlnaff/usr/local/bin/gfortran4.3.2* (bash) stoch.pts/10% export LAMHF77=/z/stoch/home/rlnaff/usr/local/bin/gfortran4.3.2 (bash) stoch.pts/10% mpif77 -c -fopenmp reorder_parent.f90 reorder_parent.f90:470: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. I didn't have access to 4.4.0 R. Naff burnus at gcc dot gnu dot org wrote: --- Comment #4 from burnus at gcc dot gnu dot org 2008-11-05 07:03 --- I can reproduce the ICE (seg. fault) with 4.3.x, but not with 4.4.0 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37644
[Bug fortran/37644] compiler Segmentation fault
--- Comment #2 from rlnaff at usgs dot gov 2008-09-29 13:54 --- Subject: Re: compiler Segmentation fault This was an experiment on the combined usage of Open MP and MPI, and may not be feasible. However, that the compiler would simply fail... R. Naff pinskia at gcc dot gnu dot org wrote: --- Comment #1 from pinskia at gcc dot gnu dot org 2008-09-28 19:57 --- We need the source to figure out what is going wrong here. module common_parameters implicit none ! OMPI? include '/usr/include/mpif.h' ! include 'mpif.h' ! ... kv: precision of variables used in assembly integer, parameter :: kv=selected_real_kind(p=10) ! ... common numbers real(kind=kv), parameter :: n0=0.0_kv, n1=1.0_kv, n2=2.0_kv, n3=3.0_kv, n4=4.0_kv, n5=5.0_kv, n6=6.0_kv, n7=7.0_kv, n8=8.0_kv, n9=9.0_kv, n10=10.0_kv, n100=100.0_kv ! ... common fractions real(kind=kv), parameter :: f2=0.5_kv, f3=n1/n3, f4=0.25_kv, f5=0.2_kv, f6=n1/n6, f7=n1/n7, f8=0.125_kv, f9=n1/n9, f10=0.1_kv ! ... machine smallest number real(kind=kv), parameter :: machine_epsilon=epsilon(n0) real(kind=kv), parameter :: small=n100*machine_epsilon real(kind=kv), save :: MZ=tiny(n0) ! ... interim print character(len=32) :: file_name integer :: interim_print, data_print end module common_parameters ! ... File shared_common_parent.f90 ! ... ! ... Version last modified: R.L. Naff, 07/06 ! ... Purpose: Allow for the transfer of information between modules ! ... and subroutines of parent type. ! ... ! ... Utilization: use module name ! ... ! ... Modules herein: ! ... common_input_types_parent ! ... common_partition_types_parent ! ... common_MPI_types_parent ! ... module common_input_types_parent use common_parameters implicit none integer :: n_x, n_y, n_z end module common_input_types_parent module common_partition_types_parent use common_parameters implicit none integer, save :: max_part, npx, npy, npz integer, save :: ind_rot_rn, dim, no_rows integer, save :: tot_variables integer, save :: no_partitions, red_count, max_C integer, save :: red_part_count, red_node_count, black_node_count integer, save :: max_nodes_A, max_nx, max_ny, max_nz ! ... arrays integer, dimension(:), allocatable :: perm_p, inv_perm_p integer, dimension(:), allocatable :: part_end integer, dimension(:), allocatable :: perm end module common_partition_types_parent module common_reorder_types_parent use common_parameters implicit none integer, dimension(:), allocatable, target :: ii_1, ii_2, ii_3 real(kind=kv), dimension(:), allocatable, target :: C1, C2, C3, CC_1, CC_2, CC_3, coef end module common_reorder_types_parent module common_MPI_types_parent integer :: pc_intracomm, pc_intra_root end module common_MPI_types_parent module reorder_parent ! ... Version last modified: R.L. Naff, 02/07 ! ... Purpose: reorder stiffness coefficients into partitions and ! ... send coefficients to children (slaves). ! ... ! ... Subroutines herein: ! ... subroutine AC_reorder ! ... Called from subroutine MS_PCG_solve, module MS_PCG_parent ! ... Sends or BCasts to Child: coef, C1, C2, C3, ! ... CC_1, CC_2, CC_3 (surrogates for hcoef, C_x, C_y, C_z ! ... and part_con arrays). ! ... ! ... use omp_lib use common_parameters use common_input_types_parent ! ... n_x, n_y, n_z use common_partition_types_parent use common_reorder_types_parent use common_MPI_types_parent !tmp use utilities_parent !tmp use error_handler ! ... pointer arrays holding incoming coefficients real, save, pointer, dimension(:) :: Cii, Cjj, Ckk, hcoef ! ... Arrays pointed in MS_PCG_solve ! ... contains subroutine AC_reorder(i_bound, ib0_count) ! ... Based on domain partitioning, rearrange coefficients and ! ... assign to a process. ! ... ! ... Argument list ! ... integer, intent(out) :: ib0_count integer, dimension(:), intent(in) :: i_bound ! ... ! ... local variables ! ... integer :: p, i, j, k, ii, jj, kk, i_org, xyz_loc integer :: i_1, i_2, i_3, np1, np2, np3 integer :: d_1s, d_2s, d_3s, i_range=range(n1) integer :: n_1, n_2, n_3, d_1, d_2, d_3 integer :: node, row_ct, level_ct, A_nodes integer :: pn_count, ls1, ls2, ls3, e_1, e_2, e_3 integer :: ierr, error, tag_out, a_size integer :: i11, i22, i33, int_real_type integer, dimension(1:3) :: C_count integer, pointer, dimension(:) :: I_point real(kind=kv) :: C11, C22, C33, t_num real :: one=1.0, neg_one=-1.0 real(kind=kv), pointer, dimension(:) :: R_point character(len=64) :: err_loc_message ! ! ... allocate work space error=0; t_num=n10**(-i_range/2) nullify (R_point) ! ... call rot_rn(1, n_x, n_x*n_y, e_1, e_2, e_3) ! ... call rot_rn(n_x, n_y, n_z, n_1, n_2, n_3) call rot_rn
[Bug fortran/37644] New: compiler Segmentation fault
Open MP directives in conjunction with LAM MPI calls is causing compiler to fail: (bash) niwot.pts/3% export LAMHF77=/z/stoch/home/rlnaff/usr/local/bin/gfortran4.3.2 (bash) niwot.pts/3% mpif77 -g -fopenmp -c reorder_parent.f90 reorder_parent.f90:470: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. (bash) niwot.pts/3% mpif77 -v -save-temps -g -fopenmp -c reorder_parent.f90 Using built-in specs. Target: i686-pc-linux-gnu Configured with: /z/stoch/home/rlnaff/gcc_source/gcc-4.3.2//configure --prefix=/z/stoch/home/rlnaff/usr/local --program-suffix=4.3.2 -with-local-prefix=/z/stoch/home/rlnaff/usr/local --with-gnu-as --with-gnu-ld --enable-threads --with-cpu-32=cpu --enable-languages=all --with-gmp --with-mpfr Thread model: posix gcc version 4.3.2 (GCC) COLLECT_GCC_OPTIONS='-I/usr/local/include' '-pthread' '-v' '-save-temps' '-g' '-fopenmp' '-c' '-mtune=generic' '-pthread' /a/stoch/home/rlnaff/usr/local/bin/../libexec/gcc/i686-pc-linux-gnu/4.3.2/f951 reorder_parent.f90 -quiet -dumpbase reorder_parent.f90 -mtune=generic -auxbase reorder_parent -g -version -fopenmp -I/usr/local/include -fintrinsic-modules-path /a/stoch/home/rlnaff/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/finclude -o reorder_parent.s GNU F95 (GCC) version 4.3.2 (i686-pc-linux-gnu) compiled by GNU C version 4.3.2, GMP version 4.2.2, MPFR version 2.3.1. GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129368 reorder_parent.f90:470: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. -- Summary: compiler Segmentation fault Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rlnaff at usgs dot gov GCC build triplet: see description below GCC host triplet: see description below GCC target triplet: see description below http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37644