Fortran Syntax Error Found End-of-file When Expecting One Of End-of-statement
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the error #5082 syntax error workings and policies of this site About Us Learn more about Stack
Fortran Syntax Error Found End-of-statement When Expecting One Of
Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions fortran line continuation 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 Intel Visual Fortran Compiling Error up vote 1 down vote favorite When I compiling the project, visual fortran keeps giving me this kind of error. The error is found on the code below dimension tairgl(12),eairgl(24),windgl(12),psisgl(12),yenang(98),yunazm(98) This is the error message given by the compiler. Error: Syntax error, found END-OF-STATEMENT when expecting one of: ( [ Anybody have any idea about this error??? Thanks fortran share|improve this question asked Dec 22 '09 at 15:44 r1cebank 1251110 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted The syntax looks OK. I can think of two possibilities: 1) the compiler is configured to only look at source code to column 72 and this line is longer, 2) the error is somewhere else and the message is misleading. Possibility 1 assumes that you are compiling Fortran 77 with its fixed-form source layout, rather than Fortran 90, or that the compiler is mis-configured for Fortran 90. To fix possibility 1, either split the line with a continuation, split it into two dimension statements, or find the compiler option that causes the compiler to accept longer lines share|improve this answer edited Dec 22 '09 at 16:26 answered Dec 22 '09 at 16:15 M. S. B. 23k22748 add a comment| up vote 0 down vote From the question, it looks like there's a newline after the dime
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 How to compile Fortran http://stackoverflow.com/questions/1947183/intel-visual-fortran-compiling-error code of unknown dialect and with unknown libraries up vote -1 down vote favorite I am trying to compile some Fortran code that, according to the documentation, is known to compile with "Intel Fortran Compiler 11." However, when I try to compile the code using the version of ifort that comes with IntelĀ® Fortran Composer XE 2013 for OS X (here: http://software.intel.com/en-us/fortran-compilers), I get a number http://stackoverflow.com/questions/15724994/how-to-compile-fortran-code-of-unknown-dialect-and-with-unknown-libraries of errors. I suspect that I'm either 1) using a compiler that's incompatible with the exact dialect of Fortran used and/or 2) failing to include some necessary libraries. I'm not a Fortran programmer, so I'm hoping that someone with more experience will be able to glance at the code and recognize if it's just a simple matter of using a different compiler, setting some compiler options, including some specific libraries, or if I'm missing something else altogether. The full source code can be found just above the Contents here: http://baydeltaoffice.water.ca.gov/modeling/deltamodeling/models/dsm2/dsm2.cfm To start with, I'm just trying to compile groups.f in /DSM2_v8_0_6_src/dsm2_v8_0/src/common (which requires that a few other modules be compiled first), but the eventual goal is to compile DSM2_v8_0_6_src/dsm2_v8_0/src/ptm/native/fixedData.f and all of its dependencies. The syntax I'm using follows this basic pattern: ifort -c DSM2_v8_0_6_src/dsm2_v8_0/src/common/groups.f To get a sense of the types of errors I'm encountering, here are a couple of types that occur repeatedly: groups.f(225): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * ) :: , . % + - [ : . ** / // .LT. < .LE. <= .EQ. == ... write(unit_error,*)"Error in matching text pattern:",trim(pattern) --------------------------------------------------------------------
error when building BerkeleyGW, and the error message was like this: http://berkeleygw.org/?q=node/35 ---------------------------------START OF MESSAGE------------------------------------ cd Epsilon && make make[1]: Entering https://polymerfem.com/archive/index.php/t-3142.html directory `/home/yhli/work/BerkeleyGW-1.0.2/Epsilon' /usr/bin/cpp -ansi -I../Common -DINTEL -DMPI -DUSESCALAPACK -DVERBOSE ../Common/nrtype.f90 > ../Common/nrtype.p.f mpif90 -free -I ../Common -I /usr/local/fftw-2.1.5/include -c -O3 -no-prec-div ../Common/nrtype.p.f -o ../Common/nrtype.o ../Common/ ifort: Command line warning: no action performed for specified file(s) /usr/bin/cpp -ansi syntax error -I../Common -DINTEL -DMPI -DUSESCALAPACK -DVERBOSE ../Common/peinfo.f90 > ../Common/peinfo.p.f mpif90 -free -I ../Common -I /usr/local/fftw-2.1.5/include -c -O3 -no-prec-div ../Common/peinfo.p.f -o ../Common/peinfo.o ../Common/ ifort: Command line warning: no action performed for specified file(s) /usr/bin/cpp -ansi -I../Common -DINTEL -DMPI -DUSESCALAPACK -DVERBOSE ../Common/system.f90 > ../Common/system.p.f mpif90 -free -I ../Common -I /usr/local/fftw-2.1.5/include fortran syntax error -c -O3 -no-prec-div ../Common/system.p.f -o ../Common/system.o ../Common/ ifort: Command line warning: no action performed for specified file(s) /usr/bin/cpp -ansi -I../Common -DINTEL -DMPI -DUSESCALAPACK -DVERBOSE ../Common/message.f90 > ../Common/message.p.f mpif90 -free -I ../Common -I /usr/local/fftw-2.1.5/include -c -O3 -no-prec-div ../Common/message.p.f -o ../Common/message.o ../Common/ fortcom: Error: ../Common/message.f90, line 52: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( % flush(0) --------------^ fortcom: Error: ../Common/message.f90, line 118: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( % flush(0) ------------^ ------------------------------------END OF THE MESSAGE----------------------------------- The Fortran compiler I used was Intel Fortran, and the preproccessor was cpp. MANY THANKS IF ANYONE CAN HELP ME. Log in or register to post comments Hello Yunhai, Permalink Submitted by dstrubbe on Thu, 05/10/2012 - 14:41 Hello Yunhai, The ifort documentation, and Fortran 2003 standard, says that "flush(0)" should be a legal stateme
new at using Abaqus with subroutine, and I am with a problem in the compilation. I'm using Abaqus 6.10, Visual Studio 2008 and Intel Fortran Compiler 11.1. I have made all the procedures to link the compiler with abaqus, but when I tried to compile a example subroutine, from the manual, it returns this error (in Abaqus CAE): "Problem During Compilation - C:/Temp/creep1.for" I have tried to use the abaqus command: abaqus job=Job-2 user=creep1.for But it returned several error of code in the log file. I've done everything I could, but I cant find what I'm doing wrong. Could someone please help me? The subroutine: SUBROUTINE CREEP(DECRA,DESWA,STATEV,SERD,EC,ESW,P,QTILD, 1 TEMP,DTEMP,PREDEF,DPRED,TIME,DTIME,CMNAME,LEXIMP,L END, 2 COORDS,NSTATV,NOEL,NPT,LAYER,KSPT,KSTEP,KINC) C INCLUDE 'ABA_PARAM.INC' C CHARACTER*80 CMNAME C DIMENSION DECRA(5),DESWA(5),STATEV(*),PREDEF(*),DPRED(*), 1 TIME(2),COORDS(*),EC(2),ESW(2) C A=100000 SIG0=10000 AN=0.9 C T1=EXP(QTILD/SIG0) T2=EXP(-QTILD/SIG0) DECRA(1) = A*(0.5*(T1-T2))**AN*DTIME IF(LEXIMP.EQ.1) THEN DECRA(5) = AN*A*(0.5*(T1-T2))**(AN-1.)*DTIME/ 1 SIG0*0.5*(T1+T2) ENDIF C RETURN END The log file with the errors of compilation: Abaqus JOB Job-2 Abaqus 6.10-1 Begin Compiling Abaqus/Standard User Subroutines 5/22/2013 10:05:23 PM creep1.for(1): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: *