Relocation truncated to fit error when trying to compile

yeah I see, the error I got is,

1>x64\Release\avx.obj: catastrophic error: Variable INT_64_CHECK$ARR.0.1 too large for NTCOFF.  Bigger than 2GB.  Use heap instead

I have also did

But still got the same error. The 2147483647 is largest I can set, it is the upper bound of int32.

You parameter total is out of the bound of int32 and it is int64, so it seems does not fit.

I changed your code to below using allocatable array.

program int_64_check
  use iso_fortran_env
  implicit none


  type data
     real :: phi,x,y,area,h
  end type data

  type(data) :: maximum
  real :: check
  integer(kind=int64) :: i,j,k,n 
  integer(kind=int64) :: n1300,n2500,n18000,ntotal
  type(data), allocatable :: arr(:)
  real,parameter :: pi=3.14159
  real,allocatable :: mi(:)
  real,allocatable :: mk(:)

  n=1
  
  n1300 = 1300
  n2500 = 2500
  n18000 = 18000
  ntotal = n1300*n2500*n18000
  mi=[(i*0.01,i=1,n2500)]
  mk=[(i*(pi/180.)*0.01,i=1,n18000)]
  allocate(arr(ntotal))

  do concurrent(i=1:n1300,j=1:n2500,k=1:n18000)
     arr(n)%x=mi(i)
     arr(n)%y=mi(j)
     arr(n)%phi=mk(k)
     n=n+1
  end do

  call calculate(arr%x,arr%y,arr%phi,arr%h,arr%area)
  maximum%area=0.



contains
  
  elemental subroutine calculate(x,y,phi,h,area)
    real,intent(in) :: x,y,phi
    real,intent(out) :: h,area
    real :: b1,b2

    h=sin(phi)*x
    b1=(2*(cos(phi))+x)+y
    b2=y
    area=(1./2.)*h*(b1+b2)
  end subroutine calculate

end program int_64_check

But it shows not sufficient virtual memory, the I realize your array is indeed too big,

18000 * 2500 * 1300 * 8/1024/1024/1024=432GB or so. It is too big for my memory.

Perhaps the below link may help,