[CPMD-list] Questions: CPMD make warning & run anomally(?)
Axel Kohlmeyer
axel.kohlmeyer at theochem.ruhr-uni-bochum.de
Sun Mar 20 14:30:22 CET 2005
On Sun, 20 Mar 2005, John Kofi Dogbe wrote:
dear john,
JK> Dear Axel,
JK>
JK> On Sat, 19 Mar 2005, Axel Kohlmeyer wrote:
JK> > JKD>
JK> > JKD> PROGRAM STOPS IN SUBROUTINE FILEOPEN| UNKNOWN FILE STATUS
JK> > JKD> 999
JK> >
JK> > i can assure you, that this error is totally unrelated.
JK> > please make sure, that your compilation flags do not include '-D__pgf90'.
JK> > my guess is, the do. if yes remove fileopen.f (note small .f) and
JK> > fileopen.o and type 'make'.
JK>
JK> Ok. my compilations flags do not include '-D__pgf90'. I used exactly
JK> the configuration files I got from you. What's the other side of the 'if
JK> yes'?
hmmmm. weird. please try the attached version of fileopen.F instead.
there have not been many changes to tht code recently...
if it still does not work, please send me your preprocessed fileopen.f
file, your input file and the version of the compiler you are using.
JK> Ok, thanks again and please, let me know if you or anybody else have any
JK> idea what I could do to solve the FILEOPEN hiccups!
cpmd tries to append to an existing file, but this is an extension to
fortran 77 and the syntax differs between compiler vendors, and in the
case of the PGI compiler even between pgf77 and pgf90!
have a look at the sourcecode...
axel
JK>
JK> John.
JK> --
JK> **The first is not necessarily the Leader**
JK>
JK> "If I have spoken evil, bear witness of the evil:
JK> but if well, why smitest thou me?"
JK> -- Jesus Christ (John, 18:23)
JK>
JK>
--
=======================================================================
Dr. Axel Kohlmeyer e-mail: axel.kohlmeyer at theochem.ruhr-uni-bochum.de
Lehrstuhl fuer Theoretische Chemie Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53 Fax: ++49 (0)234/32-14045
D-44780 Bochum http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.
-------------- next part --------------
C ==================================================================
SUBROUTINE FILEOPEN(IUNIT,FILEN,STATUS)
IMPLICIT NONE
C Arguments
INTEGER IUNIT
CHARACTER FILEN*(*),STATUS*(*)
INTEGER IA, IE
C ==--------------------------------------------------------------==
CALL XSTRING(FILEN, IA, IE)
IF(INDEX(STATUS,'NEW').NE.0) THEN
C New File
OPEN(UNIT=IUNIT,FILE=FILEN(IA:IE),STATUS='NEW')
ELSEIF(INDEX(STATUS,'UNKNOWN').NE.0) THEN
C Unknown status
OPEN(UNIT=IUNIT,FILE=FILEN(IA:IE),STATUS='UNKNOWN')
ELSEIF(INDEX(STATUS,'OLD').NE.0) THEN
C Old file (append).
#if defined(__IBM) || defined(__ABSOFT) || defined(__SGI) || defined(__OSX)
OPEN(UNIT=IUNIT,FILE=FILEN(IA:IE),STATUS='OLD',
$ POSITION='APPEND')
#elif defined(CRAY) || defined(__HP) || defined(__SR2201) || defined(__SR8000)
OPEN(UNIT=IUNIT,FILE=FILEN(IA:IE),STATUS='OLD',
$ POSITION='APPEND')
#elif defined(__PGI)
#if defined(__pgf90) || defined(__PATHSCALE)
OPEN(UNIT=IUNIT,FILE=FILEN(IA:IE),STATUS='OLD',
$ POSITION='APPEND')
#else
OPEN(UNIT=IUNIT,FILE=FILEN(IA:IE),STATUS='OLD',ACCESS='APPEND')
#endif
#else
OPEN(UNIT=IUNIT,FILE=FILEN(IA:IE),STATUS='OLD',ACCESS='APPEND')
#endif
ELSE
CALL STOPGM('FILEOPEN','UNKNOWN FILE STATUS')
ENDIF
C ==--------------------------------------------------------------==
RETURN
END
C ==================================================================
More information about the CPMD-list
mailing list