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

Error in code?

mechprog
Beginner
3,853 Views
Hello all,

I can not understand the error in the following code:


CODE

IF(JRCD.NE.0)THEN

1 WRITE(6,*) 'REQUEST ERROR IN USDFLD FOR ELEMENT NUMBER ',

2 NOEL,'INTEGRATION POINT NUMBER ',NPT


I obtain the following error messages, but do not fully under it:

ERROR MESSAGE
cyclic_fatigue_B_Reduced.for(65) : Error: Syntax error, found IDENTIFIER 'WRITE' when expecting one of: ;
1 WRITE(6,*) 'REQUEST ERROR IN USDFLD FOR ELEMENT NUMBER ',
--------^
cyclic_fatigue_B_Reduced.for(65) : Error: Syntax error, found CHARACTER_CONSTANT 'REQUEST ERROR IN USDFLD FOR ELEMENT NUMBER ' when expecting one of: => = . ( %
1 WRITE(6,*) 'REQUEST ERROR IN USDFLD FOR ELEMENT NUMBER ',
-------------------^
cyclic_fatigue_B_Reduced.for(66) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: :: , : )
2 NOEL,'INTEGRATION POINT NUMBER ',NPT
------------------------------------------------^

Any input would be much appreciated. Thanks.

0 Kudos
1 Solution
Arjen_Markus
Honored Contributor II
3,832 Views
The "1" in the second statement you have shown is probably in the sixth column (given
yesterday's discussion) so itcontinues the first line. But that is already complete.

Remove that "1" and it will probably work.

Regards,

Arjen

View solution in original post

0 Kudos
25 Replies
mecej4
Honored Contributor III
732 Views
The file will be written into whatever is the current working directory when ABAQUS calls your DLL. If you think that ABAQUS has already called and executed your DLL, use Windows file-search to look for the file. Alternatively, as others have pointed out, in the OPEN statement specify a full path for the file rather than just the filename.
0 Kudos
mechprog
Beginner
732 Views

I have written some quick code to check my writting to file code works and this seems to work ok (see code below). This writes to a.txt file the value ofx. Therefore,I guess this means that the problem has to lie with the abaqus end?

[fxfortran]c      
      PROGRAM WriteFile
c
      REAL x
      INTEGER :: FILE = 110
c
      PRINT*, 'ENTER VALUE OF X'
      READ*, x
c
  120 FORMAT (F12.6)
      OPEN (UNIT=FILE, FILE='FILE1.txt', STATUS='REPLACE')
      WRITE (FILE, 120) x
      CLOSE (UNIT=FILE)
c      
      END[/fxfortran]
0 Kudos
Les_Neilson
Valued Contributor II
732 Views
Is it possible for you to attach the actual code for the routinebeing called ? (Please attach rather than paste inline)
There may be something else going on which is not immediately obvious from your description.

Les
0 Kudos
mechprog
Beginner
732 Views
Thanks Les,

I have attached the file to this post. I look forward to any input or comments.
0 Kudos
Les_Neilson
Valued Contributor II
732 Views
Well I don't see anything obviously wrong in the code.
Nothing is explicitly declared so the implicit typing rules apply, does the calling routine pass the correct type andkind for each actual argument?
Iassume E11isin the include file otherwise if it is a local variable it is redundant.
If this is the actual code there are a lot of unused dummy arguments - but heyI see that a lot:-)

Otherwise the problem must lie elsewhere.

Les
0 Kudos
Reply