[CPMD-list] CPMD compile error (etime...)
Rodolphe Vuilleumier
vuilleum at lptl.jussieu.fr
Thu Dec 13 00:21:51 UTC 2007
Dear Robel,
in the file timec.F change the following lines
#elif defined(__PRIMEQUEST) || defined(__alpha) || defined(__SUN) ||
defined(__PGI) || defined(__ABSOFT)
REAL*4 ETIME,TARRAY(2),D
EXTERNAL ETIME
C ==--------------------------------------------------------------==
D=ETIME(TARRAY)
TIMEC = DBLE(TARRAY(1))*1000.D0
to
#elif defined(__PRIMEQUEST) || defined(__alpha) || defined(__SUN) ||
defined(__PGI) || defined(__ABSOFT)
REAL*4 TARRAY(2),D
C ==--------------------------------------------------------------==
D=ETIME(TARRAY)
TIMEC = DBLE(TARRAY(1))*1000.D0
in the new gfortran (4.2) ETIME is an intrinsic and so should not be
defined as EXTERNAL.
You could prefer instead of changing the lines above add a few lines as
follows:
#elif defined(__PRIMEQUEST) || defined(__alpha) || defined(__SUN) ||
defined(__PGI) || defined(__ABSOFT)
REAL*4 ETIME,TARRAY(2),D
EXTERNAL ETIME
C ==--------------------------------------------------------------==
D=ETIME(TARRAY)
TIMEC = DBLE(TARRAY(1))*1000.D0
#elif defined(__GNU)
REAL*4 TARRAY(2),D
C ==--------------------------------------------------------------==
D=ETIME(TARRAY)
TIMEC = DBLE(TARRAY(1))*1000.D0
#elif defined(__WINNT)
....
and delete -D__PGI in the CPPFLAGS line of your Makefile.
All the best,
Rodolphe
Yirdaw, Robel Birru a écrit :
> Hello all,
>
> Trying to compile CPMD-3.11.1 on a P4 using PC-gfortran platform.
>
> First I got the following error:
> timec.o: In function `timec_':
> timec.f:(.text+0xd): undefined reference to `etime_'
> collect2: ld returned 1 exit status
> make: *** [cpmd.x] Error 1
>
> I am using a file latlas.a (for lapack/blas) I was able to download from
> http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-linux.html.
>
> After googling a bit I found a possible solution? which is to add -Vaxlib
> to the LFLAGS. After doing that I get the following error:
>
> gfortran: '-V' must come at the start of the command line
> make: *** [cpmd.x] Error 1
>
> Not sure what is going on.
> I'd appreciate some feedback.
>
> Thanks a lot.
> -Robel
>
>
> _______________________________________________
> CPMD-list mailing list
> CPMD-list at cpmd.org
> http://cpmd.org/mailman/listinfo/cpmd-list
>
More information about the CPMD-list
mailing list