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

Problem during compilation of DFLUX abaqus subroutine

ALOK_05
Beginner
2,091 Views

hello everyone,

I am trying to compile Fortran code in the Abaqus DLUX subroutine. I am very not in this field. I tried to compile Fortran code but it is getting failed " compilation aborted" statement.

DFLUX subroutine for Abaqus is as follows :

SUBROUTINE DFLUX(FLUX,SOL,KSTEP,KINC,TIME,NOEL,NPT,COORDS,JLTYP,TEMP,PRESS,SNAME)
C
      INCLUDE 'ABA_PARAM.INC'
C
      DIMENSION FLUX(2), TIME(2), COORDS(3),
      CHARACTER*80 SNAME
 
      X=COORDS(1)
  Y=COORDS(2)
  Z=COORDS(3)
  
  Dist = 0.0
  Y_center = 0.0 - ((0.1/100.0)*(TIME(2)))
  X_center = 0.0
  YT=Y_center - Y
  XT=X_center - X
  
  Dist = SQRT((YT*YT)+(XT*XT))
  
  if (Dist .le. 0.01) then
     FLUX(1) = 50000.0
  else
     FLUX(1) = 0.0
  endif
 
      RETURN
      END
 
************************************************************************************
however, when I ran it in Abaqus, it aborted with the following error:
**

D:\abaqus\Gausian\2file>abaqus job=Moving_Hf user=trail12 interactive
Analysis initiated from SIMULIA established products
Abaqus JOB Moving_Hf
Abaqus 2021
Abaqus License Manager checked out the following licenses:
Abaqus/Standard checked out 5 tokens from Flexnet server ###.##.###.###.
<** out of ** licenses remain available>.
Begin Compiling Abaqus/Standard User Subroutines
6/29/2023 3:24:47 PM
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.2.0 Build 20210228_000000
Copyright (C) 1985-2021 Intel Corporation. All rights reserved.

trail12.f(5): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: <IDENTIFIER>
DIMENSION FLUX(2), TIME(2), COORDS(3),
--------------------------------------------^
compilation aborted for trail12.f (code 1)
Abaqus Error: Problem during compilation - trail12.f
Abaqus/Analysis exited with errors

**********************************************************************

I have also attached the Fortran code file.

 Anyone could help me and thanks in advance.

 

0 Kudos
1 Solution
jimdempseyatthecove
Honored Contributor III
2,073 Views

To expand on mecej4's post...

Suggest you compile as free-form.

one of:

a) !DIR$ FIXEDFORMLINESIZE:132

    to top of program

b) rename the source file as trail12.f90 (indicates source is free form)

c) add option /free or /nofixed

d) add option /extend-source:132

Jim Dempsey

View solution in original post

0 Kudos
2 Replies
mecej4
Honored Contributor III
2,083 Views

The first line of your program is longer than 72 characters, which is not allowed in standard fixed form Fortran source.

There is an unexpected comma character at the end of the DIMENSION... line in your program.

jimdempseyatthecove
Honored Contributor III
2,074 Views

To expand on mecej4's post...

Suggest you compile as free-form.

one of:

a) !DIR$ FIXEDFORMLINESIZE:132

    to top of program

b) rename the source file as trail12.f90 (indicates source is free form)

c) add option /free or /nofixed

d) add option /extend-source:132

Jim Dempsey

0 Kudos
Reply