Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
45 Views

Fortran error

Hello, i am getting the following error when trying to complied my program. 

Here is my code:

*USER SUBROUTINE
      SUBROUTINE DFLUX(FLUX,SOL,KSTEP,KINC,TIME,NOEL,NPT,COORDS,
     1 JLTYP,TEMP,PRESS,SNAME)
      include 'ABA_PARAM.INC'
      DIMENSION  FLUX(2),TIME(2),COORDS(3)
      CHARACTER*80 SNAME
*code 
!      REAL SOL,TEMP,PRESS
!      INTEGER JSTEP,JINC,NOEL,NPT,JLTYP
!      REAL t,dt,x,y,z
!      REAL FLUX1,FLUX2,FLUX3
      INTEGER flag,kstep 
      REAL t,x,y,z   
Real Q,a,b,cf,cr,pi,m,n   
*times
      t=time(1)
a= 6
      b = 2.5
      cf = 3
cr= 1
      pi = 3.14159265359
      
*start point parameters
FLUX(1) = 0
FLUX(2) = 0
 
      x = coords(1)
      y = coords(2)
      z = coords(3)
      
C     FORM HEAT FLUX FROM SAMPLING POINTS
      if(kstep.EQ.3) then
Q = 0.5*10*90
x1=x
     y1=y
z1=z - 5*t
m=exp(-3*((x1)**2/(a)**2+(y1)**2/(b)**2+(z1)**2/(cf)** 2))
n=exp(-3*((x1)**2/(a)**2+(y1)**2/(b)**2+(z1)**2/(cr)** 2))
      FLUX(1)=(6*1.732*Q)*((1.5/cf)*m+(.5/cr)*n)/(pi*sqrt(pi)*(a*b))
end if
 
      return
      end
 
this is the error I am receiving:
Welding.for(35): error #5082: Syntax error, found '=' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
     y=y
------^
Welding.for(34): error #6385: The highest data type rank permitted is INTEGER(KIND=8).   [X1]
x1=x1
-----------^
Welding.for(35): error #6385: The highest data type rank permitted is INTEGER(KIND=8).   
     y=y
-------^
compilation aborted for Welding.for (code 1)
Abaqus Error: Problem during compilation - C:\temp\Han\Welding.for
Begin MFS->SFS and SIM cleanup
8/28/2018 9:25:28 PM
   
 
Please let me know your thoughts on these few errors and how I could approach fixing them. Thanks!
0 Kudos
3 Replies
Highlighted
Black Belt Retired Employee
45 Views

The error messages you report don't match what's in the code you show. Please attach a complete source rather than typing it in.

As a side comment, your value of PI is wrong (last digit should be 6 if correctly rounded), not that it matters much since PI is implicitly single precision (as is your constant), so the extra digits won't be used.

0 Kudos
Highlighted
New Contributor III
45 Views

Is this an Abaqus user subroutine?  The routine name and later message indicate this is a user subroutine for an Abaqus finite element analysis.  Have you also tried compiling the routine outside of Abaqus, perhaps from the Intel Fortran initialized command line?  It can also be worthwhile to create a small main program that can call the subroutine and pass in values to test that it is working as expected before including in the Abaqus FEA.

Regards, Greg

0 Kudos
Highlighted
45 Views

This looks like it should be a fixed-form file (the extension ".for", the "C" in column 1).  Please make sure that you are following all the fixed-form rules and that your assignment statements start at column 7 or later.


Also, follow Greg's suggestion above, so that you can confirm that your subroutine works as expected.

                   --Lorri

0 Kudos