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

Fortran UEL on Windows

Ashkan_K_
Beginner
1,585 Views

Hi everybody,

I'm about writing a UEL on ABAQUS.

When I'm trying to run it, I'm getting an error message. I've attached the error messages and my code to this message so you can find them easily.

Would you please help me to solve the problem?

Best Regards,

0 Kudos
10 Replies
Steven_L_Intel1
Employee
1,585 Views

Where did you get this source? It's a mixture of fixed-form and free-form, hence the compiler errors.

It's these lines in particular that are the problem:

      DIMENSION :: ACC1Row1to4(4,32),ACC1Row5to8(4,32), AAA(3,4),&
           &ACC1Row9to12(4,32),ACC1Row13to16(4,32),ACC17Row1to20(4,32),&
           &ACC1Row21to24(4,32),ACC1Row25to28(4,32),ACC1Row29to32(4,32)
C
      AAA=RESHAPE((/2,3,4,3,4,5,4,5,&
                  &6,5,6,7/),(/3,4/),ORDER=(/2,1/))

These need to be rewritten to remove the trailing & and to use continuation indicators in column 6 as in the rest of the code.

0 Kudos
FortranFan
Honored Contributor III
1,585 Views

Please refer to free-form and fixed-form source format information within Intel Fortran user guide and documentation, especially the information on continuation lines.

Your code seems to mix the two formats.

For example, the declaration statement, DIMENSION :: ACC1Row1to4... and assignment AAA=RESHAPE(..., uses the free-form continuation option ("&" at the end of the line) which is inconsistent with .for file extension you are using.  By default, .for file implies fixed-form format i.e., continuation character in the 6th column on the subsequent line.

 

0 Kudos
TimP
Honored Contributor III
1,585 Views
If you are trying to follow the method to accomodate both std fixed and free format, the trailing & must be placed in col 73-80 while the leading & is in col. 6.
0 Kudos
Ashkan_K_
Beginner
1,585 Views

Thanks everybody. The comments were so useful and I  greatly appreciate them.

I fixed some of the problems but now I have a new one. I've attached both error and code files to this text.

When I'm running the code without defining the ACC1Row1to4 matrix by RESHAPE function, it's working perfectly but, when I'm defining the matrix ACC1Row1to4 matrix by RESHAPE function (as you can see in the code) it gives me error messages.

Would you please let me know how can I fix it.

Thanks in advance,

Regards,

 

0 Kudos
TimP
Honored Contributor III
1,585 Views

You have so many things wrong that it's hard to see what problem you may have had with reshape, even in the simpler of the source files.  Maybe you didn't post the file you are discussing.

0 Kudos
Ashkan_K_
Beginner
1,585 Views

@ Tim Prince

Thanks for your consideration.

I uploaded the right file. But I figured it out what's wrong. In defining ACC1Row1to4 by RESHAPE the first number is 0, when I'm changing it to 0.0 It's working which I don't know why. Would you please let me know why it's working like that?

Best Regards,

0 Kudos
Intel_C_7
Beginner
1,585 Views

I have a UEL for Abaqus. I do get some some displacements but to know if its correct I need the values of damage (Df) for corresponding displacements. How do I print the SVARS? I tried writing in .txt file but I get just a single value in the file.

0 Kudos
mecej4
Honored Contributor III
1,585 Views

The file u1.for compiles if a dummy include file ABA_PARAM.INC is provided, so there are no issues related to Intel-Fortran.

I think that you will be better off asking Abaqus-specific questions elsewhere.

0 Kudos
John_Campbell
New Contributor II
1,585 Views

From the code example posted above, I have wondered what flexibility is available for how to define AAA in the following example.

      AAA=RESHAPE((/2,3,4,3,4,5,4,5,&
&6,5,6,7/),(/3,4/),ORDER=(/2,1/))

For my limited use of RESHAPE, I would have previously declared AAA as: integer AAA(3,4), but what is a minimum or necessary declaration of AAA ?
Does RESHAPE redefine AAA as a rank 2 array AAA(3,4), if it was previously defined as something else ?
Or should AAA have previously been defined as: integer, dimension(3,4) :: AAA ?
Can/must AAA be defined as : integer, dimension(:,:), allocatable :: AAA ?  then does RESHAPE imply allocation of AAA ?
What would happen if AAA was initially declared as: integer, dimension(2,6) :: AAA or: integer, dimension(10) :: AAA ??

Since F95, F2003 and F2008 have provided automatic allocation and sizing of arrays, which becomes a problem to utilise and then generate code that is not easily portable to other F95 compilers. Given the mixed levels of implementation of F2003 and F2008 for compilers that are available, I suspect this is a general problem when writing code that can retain some level of portability.

John

0 Kudos
Steven_L_Intel1
Employee
1,585 Views

Any compiler worth using nowadays has those features. Pretty much all the mainstream compilers have at least that level of F2003 support.

0 Kudos
Reply