error #5082: Syntax error, found IDENTIFIER

error #5082: Syntax error, found IDENTIFIER

Why I got this?

milenko@milenkons:~/novi30s$ ifort -c pr1.f90
pr1.f90(16): error #5082: Syntax error, found IDENTIFIER 'PAT' when expecting one of: ( <END-OF-STATEMENT> ; % [ .
call subroutine pat(iter,n,sx,sy)
program pr1
use m1
implicit none    
integer :: iter,n,sx,sy
integer,dimension(30) :: sx1,sy1,n1

open(10,file='s30.txt',status='old')
open(11,file='snr.txt',status='old')

do iter=1,30
read(10,*)n1(iter)
read(11,*)sx1(iter),sy1(iter)
n=n1(iter)
sx=sx1(iter)
sy=sy1(iter)
call subroutine pat(iter,n,sx,sy)
end do
end program

I have compiled module witout problems.

module m1

 contains
subroutine pat(iter,n,sx,sy)
integer  :: n,sx,sy
integer  :: iter,id1,id2
character(15) :: tfile="ds  .dat"
character(15) :: pfile="rs  .dat"
integer,dimension(:),allocatable :: x,y,dx,dx2,dy,dy2,nd
real,dimension(:),allocatable :: d2,d

allocate(x(n))
allocate(y(n))
allocate(dx(n))
allocate(dy(n))
allocate(dx2(n))
allocate(dy2(n))
allocate(nd(n))
allocate(d2(n))
allocate(d(n))

  id1=iter/10
  id2=iter-10*id1
  tfile(3:4)=CHAR(id1+48)//CHAR(id2+48)
  pfile(3:4)=CHAR(id1+48)//CHAR(id2+48)
  open(30, file=tfile)
  open(31, file=pfile)

   do i=1,n                                                    
      read (unit=30, fmt=*) x(i),y(i)
      dx(i)=abs(x(i)-sx)
      dx2(i)=dx(i)**2
      dy(i)=abs(y(i)-sy)
      dy2(i)=dy(i)**2
      d2(i)= dx2(i)+ dy2(i)
      d2(i)= dx2(i)+ dy2(i)
      d(i)=sqrt(d2(i))
      nd(i)=nint(d(i))
      write (unit=31, fmt=*) nd(i)
   end do

deallocate(x)
deallocate(y)
deallocate(dx)
deallocate(dy)
deallocate(dx2)
deallocate(dy2)
deallocate(nd)
deallocate(d2)
deallocate(d)

end subroutine
end module

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Remove the word "subroutine" in "call subroutine pat".

Steve - Intel Developer Support

Thnks Steve.

Leave a Comment

Please sign in to add a comment. Not a member? Join today