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

Fortran VUMAT on windows

Mina_P_
Beginner
1,115 Views

Hi everybody,
I am going to compile a VUMAT which is done in Fortran 77:

subroutine vumat(
CCCC Eingangsvariablen nach Abaqus
1 nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal,
2 stepTime, totalTime, dt, cmname, coordMp, charLength,
3 props, density, strainInc, relSpinInc,
4 tempOld, stretchOld, defgradOld, fieldOld,
5 stressOld, stateOld, enerInternOld, enerInelasOld,
6 tempNew, stretchNew, defgradNew, fieldNew,
CCCC Ausgangsvariablen nach Abaqus
1 stressNew, stateNew, enerInternNew, enerInelasNew )
include 'vaba_param.inc'
CCCC Dimensionen der Variablen nach Abaqus
dimension props(nprops), density(nblock),
1 coordMp(nblock,*),
2 charLength(*), strainInc(nblock,ndir+nshr),
3 relSpinInc(*), tempOld(*),
4 stretchOld(*), defgradOld(*),
5 fieldOld(*), stressOld(nblock,ndir+nshr),
6 stateOld(nblock,nstatev), enerInternOld(nblock),
7 enerInelasOld(nblock), tempNew(*),
8 stretchNew(*), defgradNew(*), fieldNew(*),
9 stressNew(nblock,ndir+nshr), stateNew(nblock,nstatev),
1 enerInternNew(nblock), enerInelasNew(nblock)
character*80 cmname
CCCC Benutzerdefinierte Variablen und Dimensionen
real*8 gamma,celas(6,6),c2(6,6),cdach(6,6)
real*8 totstrain(6),eelas(6),etrans(6)
real*8 f1,f2,f3,smises,x(6)
real*8 sigmn,sigmc,sigan,sigac,gammamin,gammamax
real*8 gamalt,dga(nblock),dgb(nblock),dgc
real*8 n1(nblock),n2(nblock),gammin(nblock),gammax(nblock)
real*8 dsigl,dsigu
real*8 cona1,conb1,cona2,conb2,cona3,conb3
real*8 emoda, emodm, e, enum, enua, xnu, detrans
integer nblock, z
...

by compiling am getting these errors:

Gvumat.for(1): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: * )
subroutine vumat(
-----------------------^
Gvumat.for(3): error #5082: Syntax error, found INTEGER_CONSTANT '1' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
1 nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal,
------^
Gvumat.for(3): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
1 nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal,
--------------------------------------------------------------^
Gvumat.for(4): error #5082: Syntax error, found INTEGER_CONSTANT '2' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
2 stepTime, totalTime, dt, cmname, coordMp, charLength,
------^
Gvumat.for(4): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
2 stepTime, totalTime, dt, cmname, coordMp, charLength,
-------------------------------------------------------------^
Gvumat.for(5): error #5082: Syntax error, found INTEGER_CONSTANT '3' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
3 props, density, strainInc, relSpinInc,
------^
Gvumat.for(5): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
3 props, density, strainInc, relSpinInc,
----------------------------------------------^
Gvumat.for(6): error #5082: Syntax error, found INTEGER_CONSTANT '4' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
4 tempOld, stretchOld, defgradOld, fieldOld,
------^
Gvumat.for(6): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
4 tempOld, stretchOld, defgradOld, fieldOld,
--------------------------------------------------^
Gvumat.for(7): error #5082: Syntax error, found INTEGER_CONSTANT '5' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
5 stressOld, stateOld, enerInternOld, enerInelasOld,
------^
Gvumat.for(7): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
5 stressOld, stateOld, enerInternOld, enerInelasOld,
----------------------------------------------------------^
Gvumat.for(8): error #5082: Syntax error, found INTEGER_CONSTANT '6' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
6 tempNew, stretchNew, defgradNew, fieldNew,
------^
Gvumat.for(8): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
6 tempNew, stretchNew, defgradNew, fieldNew,
--------------------------------------------------^
Gvumat.for(10): error #5276: Unbalanced parentheses
1 stressNew, stateNew, enerInternNew, enerInelasNew )
----------------------------------------------------------^
Gvumat.for(10): error #5082: Syntax error, found INTEGER_CONSTANT '1' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
1 stressNew, stateNew, enerInternNew, enerInelasNew )
------^
Gvumat.for(10): error #5082: Syntax error, found ')' when expecting one of: , ;
1 stressNew, stateNew, enerInternNew, enerInelasNew )
----------------------------------------------------------^
Gvumat.for(13): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of:
dimension props(nprops), density(nblock),
-----------------------------------------------^
Gvumat.for(14): error #5082: Syntax error, found INTEGER_CONSTANT '1' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
1 coordMp(nblock,*),
------^
Gvumat.for(14): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
1 coordMp(nblock,*),
--------------------------^
Gvumat.for(15): error #5082: Syntax error, found INTEGER_CONSTANT '2' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
2 charLength(*), strainInc(nblock,ndir+nshr),
------^
Gvumat.for(15): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
2 charLength(*), strainInc(nblock,ndir+nshr),
---------------------------------------------------^
Gvumat.for(16): error #5082: Syntax error, found INTEGER_CONSTANT '3' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
3 relSpinInc(*), tempOld(*),
------^
Gvumat.for(16): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
3 relSpinInc(*), tempOld(*),
----------------------------------^
Gvumat.for(17): error #5082: Syntax error, found INTEGER_CONSTANT '4' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
4 stretchOld(*), defgradOld(*),
------^
Gvumat.for(17): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
4 stretchOld(*), defgradOld(*),
-------------------------------------^
Gvumat.for(18): error #5082: Syntax error, found INTEGER_CONSTANT '5' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
5 fieldOld(*), stressOld(nblock,ndir+nshr),
------^
Gvumat.for(18): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
5 fieldOld(*), stressOld(nblock,ndir+nshr),
-------------------------------------------------^
Gvumat.for(19): error #5082: Syntax error, found INTEGER_CONSTANT '6' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
6 stateOld(nblock,nstatev), enerInternOld(nblock),
------^
Gvumat.for(19): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( ...
6 stateOld(nblock,nstatev), enerInternOld(nblock),
--------------------------------------------------------^
Gvumat.for(20): error #5082: Syntax error, found INTEGER_CONSTANT '7' when expecting one of: ; BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
7 enerInelasOld(nblock), tempNew(*),
------^
(22): catastrophic error: Too many errors, exiting

Does anybody have any idea to help me in this regard?
Mina

0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,115 Views
I am not sure if it comes from pasting the code here, or if this is the way your code actually looks, but you are using fixed-form Fortran source and all of the leading blanks have been removed from the lines. Fixed-form source is very picky about this. For example, the first few lines of the source should look like this: [fortran] subroutine vumat( CCCC Eingangsvariablen nach Abaqus 1 nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal, 2 stepTime, totalTime, dt, cmname, coordMp, charLength, 3 props, density, strainInc, relSpinInc, 4 tempOld, stretchOld, defgradOld, fieldOld, 5 stressOld, stateOld, enerInternOld, enerInelasOld, 6 tempNew, stretchNew, defgradNew, fieldNew, CCCC Ausgangsvariablen nach Abaqus 1 stressNew, stateNew, enerInternNew, enerInelasNew ) [/fortran] Statements begin in column 7. Continuation indicators, those numbers 1-7, must be in column 6. The C for the comments must be in column 1. When you paste code in the forum as normal text, all those blanks get removed so that might be disguising the problem, but the error messages suggest to me that your code is missing the blanks.
0 Kudos
Mina_P_
Beginner
1,115 Views
Thank you so much Steve, yes exactly you are write. but how is with the numbers like : 2000 , how many space should thay have ? for example in the code, for theis part (2000): 2000 continue CCCC Elastisch Verformung: gamma = const. call elastic(x,celas,c2,cdach,smises,e,xnu,emoda, & emodm,enua,enum,totstrain,gamma,detrans) CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCC Kontrolle, ob Transformationsbedingung erfüllt ist if ((smises.GT.(1.0-gamma)*sigmn+gamma*sigmc).AND. & (gamma.LT.gammamax)) then call trans(sigmn,sigmc,x,smises,e,xnu,emoda, & emodm,enua,enum,totstrain,gamma,detrans) elseif ((smises.LT.(1.0-gamma)*sigac+gamma*sigan).AND. & (gamma.GT.gammamin)) then call trans(sigac,sigan,x,smises,e,xnu,emoda, & emodm,enua,enum,totstrain,gamma,detrans) else goto 2001 endif the erros is: Gvumat.for(95): error #5082: Syntax error, found INTEGER_CONSTANT '2000' when expecting one of: ;
0 Kudos
mecej4
Honored Contributor III
1,115 Views
The way in which you posted lines of code makes it next to impossible to respond, because column positions, which have strict requirements in fixed-format Fortran source, are not preserved when you post in-line. Please attach a file containing the source, or use the [fortran]...[/fortran] markup. Fixed-format Fortran source lines with statement numbers must contain the statement number in columns 1-5. Column 6 must be blank on the first (or only) line of a statement, and the statement must begin (or be continued, if a continuation line) on or after column 7. Line continuation marks must be in Column 6.
0 Kudos
Steven_L_Intel1
Employee
1,115 Views
As mecej4 says, the 2000 here is a statement number. These go in columns 1-5 - you should put the 2000 in columns 1-4, leave 5 and 6 blank, and then the CONTINUE starts in column 7. I also agree that if you need further help, either attach the source file or use the markup tags the forum supports.
0 Kudos
Reply