Another coarray issue

Another coarray issue

Let's assume I have the two following source files:

MODULE TEST_MODULE
    USE,INTRINSIC :: ISO_FORTRAN_ENV
    IMPLICIT NONE
    INTEGER,ALLOCATABLE :: A(:)[:]
END MODULE TEST_MODULE

and

PROGRAM TEST
    USE TEST_MODULE
    IMPLICIT NONE
    ALLOCATE(A(10)[*])
END PROGRAM TEST

Running the code yields: "forrtl: severe (151): allocatable array is already allocated..."

Now, if I bundle the module and the program in the same source file, as shown here:

MODULE TEST_MODULE
    USE,INTRINSIC :: ISO_FORTRAN_ENV
    IMPLICIT NONE
    INTEGER,ALLOCATABLE :: A(:)[:]
END MODULE TEST_MODULE

PROGRAM TEST
    USE TEST_MODULE
    IMPLICIT NONE
    ALLOCATE(A(10)[*])
END PROGRAM TEST

then the program runs successfully (well at least it does not crash).

All this is with IVF 15.0 Update 0 (latest Beta) and VS2013. Any idea? I am trying very hard these days to love Intel coarrays but it's not easy...

8 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

... and when I compile from the command line I get an "fortcom: Fatal: There has been an internal compiler error (C0000005). Compilation aborted for TEST.f90 (code 1)" error message. Strange. This is with Version 15.0.0.070 Beta Build 20140530.
 

Thanks - we'll take a look at this.

Steve - Intel Developer Support

I can reproduce both problems - thanks. Curiously, it's only in 15.0, not in 14.0. I have escalated this as issue DPD200360242.

Steve - Intel Developer Support

Thanks Steve!

I would add that (at least, on my machine) the behavior of the compiler (and the resulting executable) seems to differ whether it is compiled as a Debug or Release version. The Release version triggers an ICE. The Debug version compiles and links; but then the code, when executed, triggers an 'allocatable array already allocated'. This behavior holds for both 32-bit and 64-bit versions.

This is a very basic functionality (being able to put a coarray in a module!) and therefore this bug is a complete show-stopper, I would say that because of this regression coarrays are not useable with 15.0 for any realistic, non-trivial code.

[I also suspect that there is something fishy happening with the MPI libraries during the installation/integration of 15.0 with VS2013, although this may be limited to my environment; but I would have expected however that a fresh install of both VS2013 (first) and then the Intel compiler could solve my problems - and this did not]

Yes, that's what I found. I doubt there is any MPI issue here - it seems to be a generated code problem. The developers are looking at this now.

Steve - Intel Developer Support

A simple workaround for this one - add the SAVE attribute to the coarray in the module. This is harmless as the standard has it given SAVE anyway as a module variable.

Steve - Intel Developer Support

Thanks Steve - this will do as a stop gap measure. I will declare all my module coarrays with the SAVE attribute and test again.

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui