Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

illegal associations

illegal associations

illegal associations

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, &
integer :: nearest(1)

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


RE: illegal associations

Try a simple program with your new compiler first.  Something like


program main
   print *, 'Hey it works!!!'
end program
If that builds, add a module


module notice
subroutine pod
   print *,'subs work too'
end subroutine pod
program main
use notice
   call pod (10)
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.

RE: illegal associations

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...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close