- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I believe that the code shown below (built with ifx 2026.0.0 on Windows 11) is standard-compliant; however, it crashes with the message: "forrtl: severe (153): allocatable array or pointer is not allocated".
PROGRAM P
IMPLICIT NONE (TYPE, EXTERNAL)
CHARACTER(LEN = :), ALLOCATABLE :: S
S = '' ! The code will work if this line is commented out.
!$OMP PARALLEL PRIVATE(S)
S = 'Hi!'
WRITE(*, *) S
!$OMP END PARALLEL
END PROGRAM PSimilar codes, where the allocatable variable is an integer array, do not exhibit the same behavior. It seems the bug is limited to the automatic lhs allocation of S on line 8.
Enlace copiado
1 Responder
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
It runs on latest ONEAPI, but throws the errors and then performs ok
You cannot debug it, it sticks on line 6.
PROGRAM P IMPLICIT NONE (TYPE, EXTERNAL) CHARACTER(:), ALLOCATABLE :: S !S = 'A' ! The code will work if this line is commented out. !$OMP PARALLEL PRIVATE(S) S = 'Hi!' WRITE(*, *) S !$OMP END PARALLEL END PROGRAM P
But this runs, remove the null assignment of S, why do you need it, as you note? The standard Intel note does not have LEN =
Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla