Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

Strange errors while using subroutine in abaqus:error #5082: Syntax error

Zhang__Jiarong
Beginner
1,900 Views

Recently i found a strange error when i run a vdload subroutine written in fortran in abaqus and it showed ‘Problem during compilation - I:\AAA\Chapter 07\04 crack-dynamic-3d\vdload31.for’

Then i found the data log, it showed that:

Abaqus JOB S19411-1621
Abaqus 6.14-4
Abaqus License Manager checked out the following licenses:
Abaqus/Explicit checked out 5 tokens from Flexnet server JRDoggy.
<1019 out of 1024 licenses remain available>.
Begin Compiling Double Precision Abaqus/Explicit User Subroutines
2019/4/11 22:14:23
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.139 Build 20131008
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.

vdload31.for(1): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: * ) <IDENTIFIER>
      subroutine vdload (
-------------------------^
vdload31.for(3): error #5082: Syntax error, found ',' when expecting one of: ( % [ : . = =>
    1 nblock, ndim, stepTime, totalTime,
------------^
vdload31.for(3): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * :: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...
    1 nblock, ndim, stepTime, totalTime,
----------------------------------------^
vdload31.for(4): error #5082: Syntax error, found ',' when expecting one of: ( % [ : . = =>
    2 amplitude, curCoords, velocity, dirCos, jltyp, sname,
---------------^
vdload31.for(4): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( * :: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> ...
    2 amplitude, curCoords, velocity, dirCos, jltyp, sname,
-----------------------------------------------------------^
vdload31.for(6): error #5276: Unbalanced parentheses
    1 value )
------------^
vdload31.for(6): error #5082: Syntax error, found ')' when expecting one of: :: <IDENTIFIER>
    1 value )
------------^
vdload31.for(8): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: <IDENTIFIER>
      dimension curCoords(nblock,ndim), velocity(nblock,ndim),
--------------------------------------------------------------^
vdload31.for(9): error #5082: Syntax error, found ',' when expecting one of: ( % [ . = =>
    1   dirCos(nblock,ndim,ndim), value(nblock)
--------------------------------^
compilation aborted for vdload31.for (code 1)
Abaqus Error: Problem during compilation - I:\AAA\Chapter 07\04 crack-dynamic-3d\vdload31.for
Abaqus/Analysis exited with errors
 

but my subroutine interface was taken from the Abaqus User Subroutines Reference Manual (6.10):

      subroutine vdload (
C Read only (unmodifiable)variables -
    1 nblock, ndim, stepTime, totalTime,
    2 amplitude, curCoords, velocity, dirCos, jltyp, sname,
C Write only (modifiable) variable -
    1 value )
C
      dimension curCoords(nblock,ndim), velocity(nblock,ndim),
    1   dirCos(nblock,ndim,ndim), value(nblock)
      character*80 sname
      parameter (zini=4.5,vel=30,dlen=0.166666667,pressure=0.7d6)
C
C
C     -------------------------------------------------------------
C     distan means the load movement distance within steptime(vehicle speed 'vel' is 30km/h);
C     Zmax and zmin are the upper and lower boundary of the load respectively(the two apart as 'dlen' is 0.166666667m);
C     -------------------------------------------------------------
      distan=vel*stepTime
      zc=zini-distan
      zmax=zc
      zmin=zmax-dlen
      do 100 k=1, nblock
       if(curCoords(k,3).lt.zmax.and.curCoords(k,3).ge.zmin) then
             value(k)=pressure
     else
           value(k)=0
    end if
 100    continue
    return
      end

i am really confused by the error. if anyone knows the reason plz tell me, i'll be appreciate it so much.

Thanks

0 Kudos
1 Reply
Juergen_R_R
Valued Contributor I
1,900 Views

This looks like an old fixed-form Fortran code, where numbers are used as line-continuation characters in column 6. The error message tells you that this is not a valid way of line continuation. It seems that your formatting got scrambled in the file. The code needs to start in column 7, and the numbers as continuation line characters need to be in column 6. Then the code compiles properly. Possibly you copied the file or the contents of the file, and the whitespaces got screwed up.

 

0 Kudos
Reply