Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29280 Discussions

Question concerning Intel Fortran Compiler Version 9 for Windows

herzenstiel
Beginner
457 Views
Dear Members,

our department bought an Intel Fortran Compiler professional Version 9 (Package ID: W_FC_C_9-1.0.019) for Windows, which is embedded in the Visual Studio 2003 professional . Our operating system is Windows XP professional (32 bit). The issue we have to do is to integrate Fortran code from another System (Linux System) to the Windows system. The other system (Linux System) has the following specifications:

Linux Version: Linux 2.4.21-286-default #1 Sat Apr 2 08:57:10 UTC 2005 i686 i686 i386 GNU/Linux

Computer type:
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel Pentium 4 CPU 2.66GHz
stepping : 7
cpu MHz : 2660.496

PGI Compiler Version: PGF90 Linux/x86 3.2-4


Attached you can find a little program written with Fortran. The Intel Fortran Compiler for Windows doesn't compile the program, it aborts with the following error messages:

Command Line: "array(1:10)%Nr(1)=1.2345" / Error: The part-name to the right of a part-ref with nonzero rank has the ALLOCATABLE attribute (6.1.2). [NR]
Command Line: "write (*,*) 'array(1:10)%Nr(1)=',array(1:10)%Nr(1)" / Error: The part-name to the right of a part-ref with nonzero rank has the ALLOCATABLE attribute (6.1.2). [NR]

The PGI compiler shows no errors for the same program, I included the output file (dynamic_array_out.txt so please rename it to dynamic_array.out) so you can run it.

Summary: We suppose that the implicit loop "array(1:10)%...." for the command: "array(1:10)%Nr(1)=1.2345" is accepted by the PGI compiler but not by the Intel compiler. This problem looks very simple and yes it is possible to solve it for this simple case with a do loop. But it has consequences to the usage of the implicit loop for example when using the pack command or other commands, because there is is not so easy to replace the implicit loop command with a do loop.

So the questions are:
1) Does the command line "array(1:10)%Nr(1)=1.2345" agree with the Fortran 95/90 standard??
2) Maybe the memory administration (management) cannot handle this command in the Windows platform but in the Linux platform???

Another problem we have is that the Intel Compiler for Windows includes a WatchWindow for controlling the variables/arrays. But it doesn't work for dynamic self customized arrays like in the attached source code. After the command line "allocate (array(1:10))" it shows an array of the size 10 but it also shows an array of the size 10 for the array(:)%Nr but the array ...%Nr is at this point of the program not allocated, but it shows some values for the substructure of the array (Nr). This is very confusing and it cannot be controlled which variables are allocated and which values they have. If the array size of the array is changed to the following command: allocate array(1:5) also the substructure array (Nr) shows an array of the size 5. So it seems like the substructure (Nr) is dependant on the allocation of the array size of the variable array. The watch window shows allocated variables or values for variables which are not allocated or don't have values.

Maybe someone can help to solve those problems??
Thank you so much for your support, if you have any questions please do not hesitate to get in touch.

Best regards!!

Peter

Message Edited by herzenstiel@cck.uni-kl.de on 07-20-2005 11:12 AM

Message Edited by herzenstiel@cck.uni-kl.de on 07-20-2005 11:12 AM

Message Edited by herzenstiel@cck.uni-kl.de on 07-20-2005 11:13 AM

Message Edited by herzenstiel@cck.uni-kl.de on 07-20-2005 11:14 AM

0 Kudos
1 Reply
Steven_L_Intel1
Employee
457 Views
1) Does the command line "array(1:10)%Nr(1)=1.2345" agree with the Fortran 95/90 standard??

Well, the program's use of a derived type with ALLOCATABLE components does not conform to Fortran 90/95. That is a new feature in Fortran 2003. So let's ask if it conforms to that. The answer is "no":

C614 (R612) There shall not be more than one part-ref with nonzero rank. A part-name to the right of a part-ref with nonzero rank shall not have the ALLOCATABLE or POINTER attribute.

You're assigning to an array of allocatable arrays - Fortran doesn't support such a concept. If the component was a POINTER, then the declaration would be legal F95, but F95 contains the same constraint (minus "ALLOCATABLE or".)

2) Maybe the memory administration (management) cannot handle this command in the Windows platform but in the Linux platform???

This is a Fortran language issue, nothing to do with the OS.

Regarding the debugger issue, we are actively working on some known bugs in the debugger handling of derived types containing pointer or allocatable arrays. I would urge you to submit a problem report to Intel Premier Support with an example to make sure that we get the case you are interested in.
0 Kudos
Reply