Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

illegal associations

Status
Not open for further replies.

Wizumwalt

Programmer
Jul 12, 2005
10
Hey all,

I'm pretty new to Fortran and trying to make this application use another compiler and I'm getting the following error below.

---

module pot_complex
^
"src/pt_g_run.f90", Line = 1, Column = 10: ERROR: The compiler h
as detected errors in module "POT_COMPLEX". No module information file will be created for this module.

call ep_project(elem,rm,rmp,sing,nearest, &
^
"src/pt_g_run.f90", Line = 1348, Column = 45: ERROR: Illegal ass
ociation of a scalar actual argument with array dummy argument "NEAREST".

--- code snip

subroutine ep_project(elem,rm,rmp,sing,nearest, &
position,proj,ratio)
...
integer :: nearest(1)


Any help much appreciated in understanding what this means. It works w/ an other compiler.

Will
 
Try a simple program with your new compiler first. Something like
Code:
program main
   print *, 'Hey it works!!!'
   stop
end program
If that builds, add a module
Code:
module notice
contains
subroutine pod
   print *,'subs work too'
   return
end subroutine pod
program main
use notice
   call pod (10)
   stop
end program main
If that works, put an _ in the module name, say not_ice. If that works, check the carriage control characters at the end of line in the first line of your original program. If you're using Unix, ":se li" in vi will show the characters. They should be same on all lines. If it doesn't work, remove the _ in your module name. Let us know how far you get. It may also fix the second problem.
 
It seems you pass a scalar (not array) 5th argument to ep_project in line 1348, but the subroutine waits an array here.
May be I'm wrong, but you have a very unambiguous diagnostic message...

 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top