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

ifort and common blocks

Alin_M_Elena
Beginner
745 Views

Hi,

Trying to compile an application with intel compiler 13.1.3 for linux and openmpi I kept getting 

This name does not have a type, and must have an explicit type.   [MPI_IN_PLACE]

As the application is not open source... I created a small example to show the issue (file attached) which I boiled down to the an issue with the current version of the compiler. 

[alin@abaddon:~/playground/mpimod]: ifort *.F90
test.F90(5): error #6404: This name does not have a type, and must have an explicit type. [MPI_IN_PLACE]
write(*,*)"MPI_IN_PLACE: ", mpi_in_place
----------------------------^
compilation aborted for test.F90 (code 1)

if in myf.h i comment line 2 and uncomment line 3 everything compiles as expected.

so it seems to be an issue when there is only one variable in the common block.

older versions of the compiler that I have tried 2013.2.146 and 2013.0.079 compile the files as expected.

another workaround is: in file myTestMod.F90 the line 

use myMPI, only : mpi_in_place

is replaced by

use myMPI

is this a regression or I miss something?

regards,

Alin

0 Kudos
4 Replies
Steven_L_Intel1
Employee
745 Views

Yes, it does appear that this is a regression. It happened between updates 3 and 4 of Composer XE 2013. I have escalated this to development as issue DPD200247222.

The simplest solution, and one I would recommend if feasible, is to do away with COMMON and have these be module variables. This also avoids the error and doesn't require any other code changes (that is, unless you have code that redeclares the COMMON and doesn't use modules.)

0 Kudos
Alin_M_Elena
Beginner
745 Views

Hi Lionel,

thank you for your fast answer and suggestion!

The codes affected by this are openmpi and mpich. Fortunately for me intel-mpi is not affected and I can use it.

regards,

Alin

0 Kudos
jimdempseyatthecove
Honored Contributor III
745 Views

>>so it seems to be an issue when there is only one variable in the common block.

Can you add a second dummy variable and EQUIVILENCE them to work around the bug?

Jim Dempsey

 

0 Kudos
Steven_L_Intel1
Employee
745 Views

This issue has been fixed for the 15.0 release due out later this year. The fix isn't in the initial beta.

0 Kudos
Reply