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

limit on number of write statements?

Arun_P_
Beginner
881 Views

I seem to have a rather strange problem. I have a UMAT subroutine written for ABAQUS.

When i try to compile this user subroutine with the Intel fortran compiler (version 8.1), the compiler just hangs. It does not give me any kind of an error - does not even give me any warnings. After a long analysis, i narrowed this problem to some write statements. There is nothing wrong with this write statements. However, it seems that I am limited to the number of write statements that I can have. I conclude this from the fact that by commenting out certain write statements, I can put in some new write statements and vice versa. I use these write statements for debugging purposes. Most of these write statements are within loops - for eg.

do i=1,3
write(6,'(3f12.5)')(A(I,J),J=1,3)
enddo

The user routine compiles correctly when i comment out the write statements. It also compiles correctly on the gnu (g77) compiler (with the write statements)

My question now is

1. Is there a limit on the number of write statements one can have in a routine? If so, is there a way of increasing this number?

2. Is there any other way of putting these write statements so that I could use it for debugging purposes?


Hope I have explained the problem clearly.

 

0 Kudos
5 Replies
Steven_L_Intel1
Employee
881 Views
There is no "limit" to WRITE statements, but you may have encountered a compiler bug. 8.1 is no longer a supported version - the current version is 10.0. I would recommend using 10.0. If you can't, see if disabling optimization (-Od) helps.
0 Kudos
Arun_P_
Beginner
881 Views
Steve:

Thanks for the reply. I did run it without optimization (was -O0) and the subroutine compiled fine. But I am still unable to understand the problem. Can one safely conclude it is a compiler bug? (I am not well versed with the working of compilers)

0 Kudos
Steven_L_Intel1
Employee
881 Views
Yes, in the absence of other evidence I'd say that it was a compiler bug. Sometimes a certain combination of code constructs can trigger a bug in the optimizer. The compiler yoi're using is rather old so chances are good we corrected the problem in a subsequent update. If not, please let us know at Intel Premier Support.
0 Kudos
jimdempseyatthecove
Honored Contributor III
881 Views

I agree with Steve in that you should think about upgrading.

The older IVF used to have problems with literal strings. In particular with strings spanning continuation lines and strings containing "". The problems would be squirrelly (hard to catch) as you make changes to the codein attempts to locate the problem the problem location moves.

Since V9.1 I have not seen such problems (we are on 10.something now).

Jim Dempsey

0 Kudos
TimP
Honored Contributor III
881 Views
ABAQUS may have specified use of the 8.1 compiler, for consistency with the objects they provide to the customer. In general, a newer compiler should work, provided that all libraries are taken from the newer compiler installation (both at link time, and, in the case of shared libraries, at run time). In fact, we just got a statement from the compiler library team indicating that use of an ifort 9.1 library is preferred, even when used with 8.1 built objects. It's understandable that a customer would not want to go counter to the advice of their software vendor.
0 Kudos
Reply