[CPMD-list] compiler
Juerg Hutter
hutter at pci.unizh.ch
Tue Aug 20 14:51:14 CEST 2002
Hi
there is no way to compile CPMD with g77. g77 is missing
an essential extension to F77 (POINTER).
You need one of the commercial compilers on Linux
(ABSOFT, PGI, INTEL, LAHEY).
We do not support the Lahey compiler at the moment.
However, I downloaded the trial version of the
compiler and was able to get a working executable
with little effort.
The Makefile options were
FFLAGS =
LFLAGS = -lfj9i6 -lblas -llapack -lf2c
CFLAGS =
CPP = /lib/cpp -P -C -traditional
CPPFLAGS = -D__Linux -D__PGI -DLAPACK -DFFT_DEFAULT
CC = gcc -O2 -Wall
FC = lf95 -c
LD = lf95
I had to change the file csize.F (see attachment)
This can certainly be optimized by choosing the
correct compiler flags.
Juerg
----------------------------------------------------------
Juerg Hutter Phone : ++41 1 635 4491
Physical Chemistry Institute FAX : ++41 1 635 6838
University of Zurich E-mail: hutter at pci.unizh.ch
Winterthurerstrasse 190
CH-8057 Zurich, Switzerland
----------------------------------------------------------
On 2002 xxx 2020, ÐÜÓñÃ÷ wrote:
>
> Dear All,
> I dont know whether I can compile the cpmd without portland Group fortran compiler or not.
> In fact, I can not compile the project using the g77 of redhat 7.3 on my pc P4 1.6G.
> Last time, I asked some question about Lahey Linux Fortran compiler, but till now, I can
> not settle the question. I can not find the functions which I should modify. Anybody can help me.
> I scan the past list archives, there is another person use the lf95, and I met the same
> problems as him.
> thanks
> yours xiong
> _______________________________________________
> CPMD-list mailing list
> CPMD-list at cpmd.org
> http://www.cpmd.org/mailman/listinfo/cpmd-list
>
-------------- next part --------------
C ==================================================================
SUBROUTINE CSIZE(C2,NSTATE,GEMAX,CNORM)
C ==--------------------------------------------------------------==
IMPLICIT NONE
INCLUDE 'system.h'
INCLUDE 'elct.inc'
INCLUDE 'kpts.inc'
INCLUDE 'spin.inc'
C Arguments
INTEGER NSTATE
COMPLEX*16 C2(NGWK,NSTATE)
REAL*8 GEMAX,CNORM
C Variables
DIMENSION F(NSTATE)
COMPLEX*16 ZGIVE
REAL*8 DDOT,DOTP,GU,GD
INTEGER NOCC,I,IABS,NOU,NOD,
& IZAMAX
C ==--------------------------------------------------------------==
IF(TLSD) THEN
NOU=0
DO I=1,NSUP
IF(F(I).GT.1.D-5) NOU=NOU+1
ENDDO
IABS=IZAMAX(NOU*NGWK,C2,1)
GEMAX=CDABS(ZGIVE(C2(1,1),IABS))
IF(NOU.EQ.0) GU=0.0D+00 ! cmb
NOD=0
DO I=NSUP+1,NSTATE
IF(F(I).GT.1.D-5) NOD=NOD+1
ENDDO
IABS=IZAMAX(NOD*NGWK,C2(1,NSUP+1),1)
GEMAX=MAX(CDABS(ZGIVE(C2(1,NSUP+1),IABS)),GEMAX)
IF(NOD.EQ.0) GD=0.0D+00 ! cmb
NOCC=NOD+NOU
CNORM=0.0D0
IF(TKPNT) THEN
DO I=1,NOU
CNORM=CNORM+DDOT(2*NGWK,C2(1,I),C2(1,I))
ENDDO
DO I=NSUP+1,NSUP+NOD
CNORM=CNORM+DDOT(2*NGWK,C2(1,I),C2(1,I))
ENDDO
ELSE
DO I=1,NOU
CNORM=CNORM+DOTP(NGW,C2(1,I),C2(1,I))
ENDDO
DO I=NSUP+1,NSUP+NOD
CNORM=CNORM+DOTP(NGW,C2(1,I),C2(1,I))
ENDDO
ENDIF
ELSE
NOCC=0
DO I=1,NSTATE
IF(F(I).GT.1.D-5) NOCC=NOCC+1
ENDDO
IABS=IZAMAX(NOCC*NGWK,C2,1)
GEMAX=CDABS(ZGIVE(C2(1,1),IABS))
CNORM=0.0D0
IF(TKPNT) THEN
DO I=1,NOCC
CNORM=CNORM+DDOT(2*NGWK,C2(1,I),C2(1,I))
ENDDO
ELSE
DO I=1,NOCC
CNORM=CNORM+DOTP(NGW,C2(1,I),C2(1,I))
ENDDO
ENDIF
ENDIF
#ifdef PARALLEL
CALL GLOSUM(1,CNORM)
CALL GLOMAX(1,GEMAX)
#endif
CNORM=DSQRT(CNORM/(NOCC*NGWKS))
C ==--------------------------------------------------------------==
RETURN
END
C ==================================================================
More information about the CPMD-list
mailing list