- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
The following example may just reflect my poor understanding of how coarrays work... or it could be a bug. Compiled with the IVF 15.0 update 0, using VS2013 shell... any comments?
PROGRAM TEST
IMPLICIT NONE
TYPE T_A
INTEGER :: VALUE
END TYPE T_A
TYPE T_B
TYPE(T_A),ALLOCATABLE :: ARRAY(:)
END TYPE T_B
TYPE(T_B) :: COARRAY
- Marcas:
- Intel® Fortran Compiler
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
The commented out allocate statement is not legal fortran - if you are allocating a structure component then the thing that designates the particular parent of the component cannot be coindexed. But the compiler should diagnose this at compile time (C644).
(If you think about it conceptually - with the [xx] coindexing you are directing the current image to go and do a local allocation on image xx (image xx and the current image happen to be the same here, but the syntax you are using implies that they could be different) of something that isn't itself a coarray (it is a component of a coarray), and that doesn't really make sense - it is remote specification of an executable action. If you want image xx to do a local allocation, then get image xx to execute an allocate statement on a local object as part of its sequence of execution (which is exactly what you have in the not commented out bit). Note this situation is different from all images executing a synchronised allocate statement for a coarray proper.)
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
The commented out allocate statement is not legal fortran - if you are allocating a structure component then the thing that designates the particular parent of the component cannot be coindexed. But the compiler should diagnose this at compile time (C644).
(If you think about it conceptually - with the [xx] coindexing you are directing the current image to go and do a local allocation on image xx (image xx and the current image happen to be the same here, but the syntax you are using implies that they could be different) of something that isn't itself a coarray (it is a component of a coarray), and that doesn't really make sense - it is remote specification of an executable action. If you want image xx to do a local allocation, then get image xx to execute an allocate statement on a local object as part of its sequence of execution (which is exactly what you have in the not commented out bit). Note this situation is different from all images executing a synchronised allocate statement for a coarray proper.)
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thank IanH for your explanation. It seems this compiler check is not implemented yet.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I entered issue DPD200360195 about the missing constraint check.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
This will be fixed in a release later this year.
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora