Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Crashing of the program (matrix 500 x 500)

$
0
0

Good day,

In the main subroutine is declared a matrix size of 500 times 500. This matrix is transferred to the subroutine Set_null. In the subroutine Set_null I want another matrix (matrix_work) of the same size (a_matrix), but the program crashes. I have simplified the example to a minimum so that the problem still existed (see figures).

If you make the same thing, but for matrix 300 by 300 everything is OK (MAX_SIZE = 300).
If you use matrix_work allocatable everything is OK.

Intel Fortran Compiler 11.1.067.

Best regards
Lukas Weis

 
 !*******************************************************************************

	  ! Experiment6 - Padani.

	  !*******************************************************************************

	  subroutine Experiment6    

	    implicit none

	    integer(4), parameter ::                  MAX_SIZE = 500

	    real(8), dimension(MAX_SIZE, MAX_SIZE)::  a_matrix

	 
      call Set_null(a_matrix(1:MAX_SIZE, 1:MAX_SIZE))
    

	    return

	  contains

	    

	    !*******************************************************************************

	    ! Nulovani matice.

	    !*******************************************************************************

	    pure subroutine Set_null(matrix)

	      implicit none

	      real(8), intent(inout), dimension(:,:) ::                        matrix

	      real(8), dimension(size(matrix, dim=1), size(matrix, dim=2)) ::  matrix_work

	      

	      matrix = 0.d0

	      matrix_work = 0.d0

	      

	      return

	    end subroutine

	    

	  end subroutine Experiment6

Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>