Skip to content

Instantly share code, notes, and snippets.

@andersx
Last active June 22, 2019 06:26
Show Gist options
  • Save andersx/6e63e605654267249d820b42535e747b to your computer and use it in GitHub Desktop.
Save andersx/6e63e605654267249d820b42535e747b to your computer and use it in GitHub Desktop.
ifort bug example
! ifort run_me.f90 -o run_me
! gfortran run_me.f90 -o run_me
program run_me
implicit none
double precision, allocatable, dimension(:,:) :: M
integer :: icol, irow
! This will work with ifort and gfortran
irow = 512
icol = 512
allocate(M(irow,icol))
M(:,:) = 1.0d0
write (*,*) "M", shape(M)
write (*,*) shape(matmul(transpose(M), M))
deallocate(M)
! This will fail with ifort but not gfortran
irow = 768
icol = 768
allocate(M(irow,icol))
M(:,:) = 1.0d0
write (*,*) "M", shape(M)
write (*,*) shape(matmul(transpose(M), M))
deallocate(M)
end program run_me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment