- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Dears
I need minor question, I have dipole.f code and need to compile but after compile I get this error:
[hamid@localhost Desktop]$ ifort dipole.f
dipole.f(25): error #6406: Conflicting attributes or multiple declaration of name. [DIPOLE]
real*8 dipole
-------------^
dipole.f(128): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(1,i)=0.d0
----------^
dipole.f(129): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(2,i)=0.d0
----------^
dipole.f(130): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(3,i)=0.d0
----------^
dipole.f(155): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(1,j)=chge(i)*(xxx(i)-cmass(1,j))+dipole(1,j)
------------^
dipole.f(155): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(1,j)=chge(i)*(xxx(i)-cmass(1,j))+dipole(1,j)
----------------------------------------------------^
dipole.f(156): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(2,j)=chge(i)*(yyy(i)-cmass(2,j))+dipole(2,j)
------------^
dipole.f(156): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(2,j)=chge(i)*(yyy(i)-cmass(2,j))+dipole(2,j)
----------------------------------------------------^
dipole.f(157): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(3,j)=chge(i)*(zzz(i)-cmass(3,j))+dipole(3,j)
------------^
dipole.f(157): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(3,j)=chge(i)*(zzz(i)-cmass(3,j))+dipole(3,j)
----------------------------------------------------^
dipole.f(164): error #6413: This global name is invalid in this context. [DIPOLE]
write(6,'(1p,10e12.4)')time,dipole
------------------------------------^
compilation aborted for dipole.f (code 1
how fix it?
I insert this line:
real*8 dipole ------> but get error again
Thanks
I need minor question, I have dipole.f code and need to compile but after compile I get this error:
[hamid@localhost Desktop]$ ifort dipole.f
dipole.f(25): error #6406: Conflicting attributes or multiple declaration of name. [DIPOLE]
real*8 dipole
-------------^
dipole.f(128): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(1,i)=0.d0
----------^
dipole.f(129): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(2,i)=0.d0
----------^
dipole.f(130): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(3,i)=0.d0
----------^
dipole.f(155): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(1,j)=chge(i)*(xxx(i)-cmass(1,j))+dipole(1,j)
------------^
dipole.f(155): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(1,j)=chge(i)*(xxx(i)-cmass(1,j))+dipole(1,j)
----------------------------------------------------^
dipole.f(156): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(2,j)=chge(i)*(yyy(i)-cmass(2,j))+dipole(2,j)
------------^
dipole.f(156): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(2,j)=chge(i)*(yyy(i)-cmass(2,j))+dipole(2,j)
----------------------------------------------------^
dipole.f(157): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(3,j)=chge(i)*(zzz(i)-cmass(3,j))+dipole(3,j)
------------^
dipole.f(157): error #6413: This global name is invalid in this context. [DIPOLE]
dipole(3,j)=chge(i)*(zzz(i)-cmass(3,j))+dipole(3,j)
----------------------------------------------------^
dipole.f(164): error #6413: This global name is invalid in this context. [DIPOLE]
write(6,'(1p,10e12.4)')time,dipole
------------------------------------^
compilation aborted for dipole.f (code 1
how fix it?
I insert this line:
real*8 dipole ------> but get error again
Thanks
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot use the same name (i.e., dipole) for both the main unit and as a variable within that unit. Changing the first line to "program main" should solve that issue
There will still be some variables that should be arrays but are implicit scalars ---like vxx, vyy, vzz, etc.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot use the same name (i.e., dipole) for both the main unit and as a variable within that unit. Changing the first line to "program main" should solve that issue
There will still be some variables that should be arrays but are implicit scalars ---like vxx, vyy, vzz, etc.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page