Last active
June 22, 2019 06:26
-
-
Save andersx/6e63e605654267249d820b42535e747b to your computer and use it in GitHub Desktop.
ifort bug example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! 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