Compilation problem when multipole_mode.f90 is included

Bader charge density analysis

Moderator: moderators

Post Reply
swarup
Posts: 2
Joined: Sat Feb 05, 2011 11:51 am

Compilation problem when multipole_mode.f90 is included

Post by swarup »

Dear Sir
To calculate the dipole moment in each bader's volume, I uncommented the line "IF (opts%dipole_flag) CALL multipole()" in main.f90. Then I tried to compile the source code including the multipole_mode.f90 in the Makefile. I used ifort compiler for this. I could compile the code if I don't modify anything but with the above mentioned modification, it is giving the following error message.

gfortran -O2 -c multipole_mod.f90
multipole_mod.f90:32.22:

SUBROUTINE multipole()
1
Error: MODULE attribute of 'multipole' conflicts with PROCEDURE attribute at (1)
multipole_mod.f90:34.32:

REAL(q2),DIMENSION(3,3) :: B
1
Error: Unexpected data declaration statement in CONTAINS section at (1)
multipole_mod.f90:35.45:

REAL(q2),DIMENSION(3) :: dv,v,ringf,shift
1
Error: Unexpected data declaration statement in CONTAINS section at (1)
multipole_mod.f90:36.42:

INTEGER :: i,atom,nx,ny,nz,tenths_done
1
Error: Unexpected data declaration statement in CONTAINS section at (1)
multipole_mod.f90:37.33:

INTEGER :: cr,count_max,t1,t2
1
Error: Unexpected data declaration statement in CONTAINS section at (1)
multipole_mod.f90:38.26:

TYPE(ions_obj) :: ions
1
Error: Unexpected data declaration statement in CONTAINS section at (1)
multipole_mod.f90:40.38:

CALL SYSTEM_CLOCK(t1,cr,count_max)
1
Error: Unexpected CALL statement in CONTAINS section at (1)
multipole_mod.f90:42.52:

WRITE(*,'(/,2x,A)') 'CALCULATING DIPOLE MOMENTS'
1
Error: Unexpected WRITE statement in CONTAINS section at (1)
multipole_mod.f90:43.63:

WRITE(*,'(2x,A)') ' 0 10 25 50 75 100'
1
Error: Unexpected WRITE statement in CONTAINS section at (1)
multipole_mod.f90:44.43:

WRITE(*,'(2x,A,$)') 'PERCENT DONE: **'
1
Error: Unexpected WRITE statement in CONTAINS section at (1)
multipole_mod.f90:46.19:

ALLOCATE(dipole(ndim,3))
1
Error: Syntax error in ALLOCATE statement at (1)
multipole_mod.f90:47.12:

dipole=0
1
Error: Unexpected assignment statement in CONTAINS section at (1)
multipole_mod.f90:48.16:

shift=0.5_q2
1
Error: Unexpected assignment statement in CONTAINS section at (1)
multipole_mod.f90:49.26:

IF (vasp) shift=1.0_q2
1
Error: Unexpected simple IF statement in CONTAINS section at (1)
multipole_mod.f90:50.4:

ringf(1)=1.0_q2/REAL(nxf,q2)
1
Error: Unclassifiable statement at (1)
multipole_mod.f90:51.4:

ringf(2)=1.0_q2/REAL(nyf,q2)
1
Error: Unclassifiable statement at (1)
multipole_mod.f90:52.4:

ringf(3)=1.0_q2/REAL(nzf,q2)
1
Error: Unclassifiable statement at (1)
multipole_mod.f90:53.17:

tenths_done=0
1
Error: Unexpected assignment statement in CONTAINS section at (1)
multipole_mod.f90:54.15:

DO nx=1,nxf
1
Error: Unexpected DO statement in CONTAINS section at (1)
multipole_mod.f90:55.41:

IF ((nx*10/nxf) > tenths_done) THEN
1
Error: Unexpected block IF statement in CONTAINS section at (1)
multipole_mod.f90:56.31:

tenths_done=(nx*10/nxf)
1
Error: Unexpected assignment statement in CONTAINS section at (1)
multipole_mod.f90:57.29:

WRITE(*,'(A,$)') '**'
1
Error: Unexpected WRITE statement in CONTAINS section at (1)
multipole_mod.f90:58.9:

END IF
1
Error: Expecting END MODULE statement at (1)
multipole_mod.f90:59.17:

DO ny=1,nyf
1
Error: Unexpected DO statement in CONTAINS section at (1)
multipole_mod.f90:60.19:

DO nz=1,nzf
1
Error: Unexpected DO statement in CONTAINS section at (1)
Fatal Error: Error count reached limit of 25.
make: *** [multipole_mod.o] Error 1

As you can see that I could not compile the multipole_mod.f90 subroutine.
Kindly help me in compiling the code.

Best
Swarup
graeme
Site Admin
Posts: 2256
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: Compilation problem when multipole_mode.f90 is included

Post by graeme »

The multiple code has not been hooked up an tested in a long time. At this point,
we do not support the calculation of multiples in the Bader volumes.
swarup
Posts: 2
Joined: Sat Feb 05, 2011 11:51 am

Re: Compilation problem when multipole_mode.f90 is included

Post by swarup »

[quote="graeme"]The multiple code has not been hooked up an tested in a long time. At this point,
we do not support the calculation of multiples in the Bader volumes.[/quote]

Thanks for your reply. Is there any alternative way to calculate the dipole moment at each site now? If it is there, please let me know.
Post Reply