|
Prev: a cute program
Next: It Hurts When I Do This
From: beet on 18 Apr 2008 10:34 Hi all, I am compiling a fortran program. The g77 gave me some errors or warnings like following... ---------------------------------------------------------------------- pvar.for:317: DEALLOCATE(IA,RA) ^ Invalid declaration of or reference to symbol `deallocate' at (^) [initially seen at (^)] pvar.for:317: DEALLOCATE(IA,RA) ^ Invalid form for assignment statement at (^) pvar.for: In subroutine `pvar': pvar.for:97: warning: CALL PVAR(NF,NA,NB,NC,X,IA,RA,RA,RA,IA,RA,RA,RA,IA,RA,RA,RA, 1 pvar.for:419: (continued): SUBROUTINE PVAR(NF,NA,NB,NC,X,IX,XL,XU,CF,IC,CL,CU,CG,ICA,CFD,CR, 2 Argument #7 (named `xl') of `pvar' is one type at (2) but is some other type at (1) [info -f g77 M GLOBALS] pvar.for:97: warning: CALL PVAR(NF,NA,NB,NC,X,IA,RA,RA,RA,IA,RA,RA,RA,IA,RA,RA,RA, 1 ------------------------------------------------------------------------ Errors for almost all arguments. I have checked the arguments; they are all match. This code was copied from internet. Completely a newbie in Fortran. Thanks... ------------------------some part of relevent code---------------- DOUBLE PRECISION RA(:) .... ALLOCATABLE RA IF (NA.LE.0) NA = NF + 3 ALLOCATE (RA(NF*(NF+13)/2+2*NA*(NF+2))) NC = 0 .... 311 CALL PVAR(NF,NA,NB,NC,X,IX,XL,XU,CF,IC,CL,CU,CG,IA,RA(LCFD), 312 + RA(LCR),RA(LCZ),RA(LAF),RA(LAX),RA(LAG),RA(LG),RA(LGN), 313 + RA(LH),RA(LS),RA(LSN),RA(LXO),RA(LGO),RA(LGP),RA(LGS), 314 + RPAR(1),RPAR(2),RPAR(3),RPAR(4),RPAR(5),RPAR(6),GMAX, 315 + F,IPAR(1),IPAR(2),IPAR(3),IPAR(4),IPAR(5),IPRNT,ITERM) .... 419 SUBROUTINE PVAR(NF,NA,NB,NC,X,IX,XL,XU,CF,IC,CL,CU,CG,ICA,CFD,CR, 420 + CZ,AF,AX,AG,G,GN,H,S,SN,XO,GO,GP,GS,XMAX,TOLX, 421 + TOLF,TOLB,TOLG,ETA,GMAX,F,MIT,MFV,MEX,MTESX, 422 + MTESF,IPRNT,ITERM) ---------------------------------end of code------------------------------------------------------------ Thanks very much. Beet
From: Tim Prince on 18 Apr 2008 10:41 beet wrote: > I am compiling a fortran program. The g77 gave me some errors or > warnings like following... > ---------------------------------------------------------------------- > pvar.for:317: > DEALLOCATE(IA,RA) > ^ > Invalid declaration of or reference to symbol `deallocate' at (^) , > g77 doesn't support much f90. It hasn't been maintained for several years. Try a current compiler, such as gfortran http://gcc.gnu.org/wiki/GFortran g95, or a commercial compiler.
From: Gordon Sande on 18 Apr 2008 10:43 On 2008-04-18 11:34:08 -0300, beet <whhggg(a)gmail.com> said: > Hi all, > > I am compiling a fortran program. The g77 gave me some errors or > warnings like following... > ---------------------------------------------------------------------- > pvar.for:317: > DEALLOCATE(IA,RA) > ^ > Invalid declaration of or reference to symbol `deallocate' at (^) > [initially seen at (^)] DEALLOCATE is a Fortran 90 statement. g77 is a Fortran 77 compiler. Your first step is figure out which standard you want to follow. Fortran 95 is the "current pragmatic" standard. F95 is a minor fixup/revision/update on F90 so F90 only compilers would be rather rare. Currently supported ones would claim to be F95 in practice. Fortran 2003 is the current official standard but there are no F03 compilers on offer. g77 is no longer supported so you may not really want to be using it in any case.
From: rudra on 20 Apr 2008 07:49 Dear beet, You better use f90 compilers like gfortran or ifort(specially if you are using intel processor) and extend your code name from <file>.f to <file>.f90
|
Pages: 1 Prev: a cute program Next: It Hurts When I Do This |