Gfortran Syntax Error Argument List
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings syntax error in write statement at (1) and policies of this site About Us Learn more about Stack Overflow
Fortran Line Length
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
Error: Unclassifiable Statement At (1)
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only
Fortran Unclassifiable Statement
takes a minute: Sign up Syntax error in call statement in Fortran up vote 0 down vote favorite I have written a simple test program to try subroutines and the call statement in Fortran. I am using gfortran compiler in GNU/Linux. I have declared 14 parameters which are numbered accordingly in my code. While my code works PERFECTLY WELL when fortran line continuation I try to pass 11 of those arguments through the call statement, I encounter a rather strange 'SYNTAX ERROR' when I try to include a 12th argument and I try to pass 12 arguments through the call statement. What might the problem be and how might I fix it? Here is the program I am talking about ` program test IMPLICIT REAL*4(A-B,D-H,O-Z) IMPLICIT COMPLEX(C) COMPLEX*16 CQC,CQV parameter k1=2 parameter k2=2 parameter k3=2 parameter k4=2 parameter k5=2 parameter k6=2 parameter k7=2 parameter k8=2 parameter k9=2 parameter k10=2 parameter k11=2 parameter k12=2 parameter k13=2 parameter k14=2 call bins(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12) end program subroutine bins(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12) integer k1, k2, k3, k4, k5 end subroutine ` Following is the error that I get when I include k12 in the 'call' statement and then compile it: ` siddharth@siddharth-VBox:~/Desktop/Codes$ gfortran test6.for -o test6.out test6.for:23.72: call bins(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12 1 Error: Syntax error in argument list at (1) test6.f
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Fortran Error Meanings up vote 2 down vote favorite I have been following books and PDFs on writing in FORTRAN to write an integration program. I compile the code with gfortran and http://stackoverflow.com/questions/24335487/syntax-error-in-call-statement-in-fortran get several copies of the following errors. 1)Unexpected data declaration statement at (1) 2)Unterminated character constant beginning at (1) 3)Unclassifiable statement at (1) 4)Unexpected STATEMENT FUNCTION statement at (1) 5)Expecting END PROGRAM statement at (1) 6)Syntax error in data declaration at (1) 7)Statement function at (1) is recursive 8)Unexpected IMPLICIT NONE statement at (1) I do not know hat they truly mean or how to fix them, google search has proven null and the other topics on this site http://stackoverflow.com/questions/13354510/fortran-error-meanings we about other errors. for Error 5) i put in Program main and end program main like i might in C++ but still got the same result. Error 7) makes no sense, i am trying for recursion in the program. Error 8) i read implicit none was to prevent unnecessary decelerations. Ill post the code itself but i am more interested in the compiling errors because i still need to fine tune the array data handling, but i cant do that until i get it working. Program main implicit none real, dimension(:,:), allocatable :: m, oldm real a integer io, nn character(30) :: filename real, dimension(:,:), allocatable :: alt, temp, nue, oxy integer locationa, locationt, locationn, locationo, i integer nend real dz, z, integral real alti, tempi, nuei, oxyi integer y, j allocate( m(0, 0) ) ! size zero to start with? nn = 0 j = 0 write(*,*) 'Enter input file name: ' read(*,*) filename open( 1, file = filename ) do !reading in data file read(1, *, iostat = io) a if (io < 0 ) exit nn = nn + 1 allocate( oldm( size(m), size(m) ) ) oldm = m deallocate( m ) allocate( m(nn, nn) ) m = oldm m(nn, nn) = a ! The nnth value of m deallocate( oldm ) enddo ! Decompose matrix array m into column arrays [1,n] write(*,*) 'Enter Column Number for Altitude' read(*,*) locationa writ
text] Re: Gfortran from SVN: "Error: Syntax error in argument list at (1)" From: Tobias Burnus
on various platforms. Moderators: Global Moderator, Moderator Post a reply 4 posts • Page 1 of 1 compilation error by captaincook » Wed Nov 14, 2012 7:50 am Dear All, I'm trying to install parallel version of VASP but I have the following error: fpp -f_com=no -free -w0 xml.F xml.f90 -DHOST=\"gfortran\" -DCACHE_SIZE=4096 -DMINLOOP=1 -DNGZhalf -DMPI_BLOCK=8000 mpif90 -O3 -c xml.f90 In file xml.F:886,str( 1Error: Syntax error in argument list at (1) In file xml.F:942,str( 1Error: Syntax error in argument list at (1)make: *** [xml.o] Error 1 The architecture of my machine is: x86_64 GNU/Linux I used the following Make file: ......# all CPP processed fortran files have the extension .f90SUFFIX=.f90#-----------------------------------------------------------------------# fortran compiler and linker#-----------------------------------------------------------------------FC=/usr/bin/gfortran#FC=/usr/local/gcc-4.6/bin/gfortran46 -ffree-form -ffree-line-length-0 -ff2c -fno-second-underscore # fortran linkerFCL=$(FC)#-----------------------------------------------------------------------# whereis CPP ?? (I need CPP, can't use gcc with proper options)# that's the location of gcc for SUSE 5.3## CPP_ = /usr/lib/gcc-lib/i486-linux/2.7.2/cpp -P -C ## that's probably the right line for some Red Hat distribution:## CPP_ = /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp -P -C## SUSE X.X, maybe some Red Hat distributions:CPP_ = ./preprocess <$*.F | /usr/bin/cpp -P -C -traditional >$*$(SUFFIX)# this release should be fpp clean# we now recommend fpp as preprocessor# if this fails go back to cppCPP_=fpp -f_com=no -free -w0 $*.F $*$(SUFFIX) #-----------------------------------------------------------------------# possible options for CPP:# NGXhalf charge density reduced in X direction# wNGXhalf gamma point only reduced in X direction# avoidalloc avoid ALLOCATE if possible# PGF90 work around some for some PGF90 / IFC bugs# CACHE_SIZE 1000 for PII,PIII, 5000 for Athlon, 8000-12000 P4, PD# RPROMU_DGEMV use DGEMV instead of DGEMM in RPRO (depends on used BLAS)# RACCMU_DGEMV use DGEMV instead of DGEMM in RACC (depends on used BLAS)# tbdyn MD package of Tomas Bucko#-----------------------------------------------------------------------CPP = $(CPP_) -DHOST=\"gfortran\" \ -DCACHE_SIZE=4096 -DMINLOOP=1 -DNGXhalf \#-----------------------------------------------------------------------# general fortran flags (there must a trailing blank on this line)# byterecl is strictly required for ifc, since other