- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
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)
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...
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - we'll take a look at this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can reproduce both problems - thanks. Curiously, it's only in 15.0, not in 14.0. I have escalated this as issue DPD200360242.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve - this will do as a stop gap measure. I will declare all my module coarrays with the SAVE attribute and test again.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page