Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29230 Обсуждение

Internal compiler error: IFX with matmul

Daniel_Dopico
Новый участник I
1 483Просмотр.

The following piece of code throws an ICE in my oneAPI 2024.1, compiling with IFX in Release config.

module formulacion_matR_Kalman
	IMPLICIT NONE
CONTAINS
    
    SUBROUTINE evalfj_matR_kalman (Tang,DIM)
    integer::DIM
	REAL(8),DIMENSION(DIM,DIM)::Tang,matRMmatR,matRMmatRp,matRKmatR,matRCmatR,dwk2_dz,dwk2_dzp,dzp_dz,dzs_dz
	REAL(8) dt2
	
    INTENT(OUT) Tang
    
    Tang=dt2*matmul(matRMmatR,dzs_dz)+dt2*(matRKmatR+matmul(matRCmatR+matRMmatRp,dzp_dz)+matmul(matRMmatR,(dwk2_dz+matmul(dwk2_dzp,dzp_dz))))

    END SUBROUTINE evalfj_matR_kalman
end module formulacion_matR_Kalman

 

0 баллов
1 Решение
Ron_Green
Модератор
1 385Просмотр.

I see your bug report and took ownership of it.  I posted this note to your bug report:

 

It appears to be a problem with a backend optimization where it is doing inlining of the matmul.

And it's at O2, the default optimization.

 

I found I can work around it by 2 methods

1) use /O3

2) use option /Qopt-matmul

 

I am tracing this back to the specific backend optimization at fault. i suspect inlining but I could be wrong. I should have this isolated in an hour or so and get the bug report done.

Просмотреть решение в исходном сообщении

7 Ответы
mecej4
Почетный участник III
1 445Просмотр.

I ran into no issues producing an OBJ file at the command line using IFX 2024.1.0 with /Ot, /O2 and /Od (just one option of these three at a time).

Because the matrices in the expression are used without prior definition, there is probably not much optimization to do anyway!

Ron_Green
Модератор
1 405Просмотр.

On linux using just -c I do see the ICE.  I am digging in deeper and hope to have some response soon.  I will, of course, get a bug report entered once I track this down.

Daniel_Dopico
Новый участник I
1 394Просмотр.

Thank you very much, Ron. I already reported a ticket with the issue.

It is Case#: 06229673.

Ron_Green
Модератор
1 386Просмотр.

I see your bug report and took ownership of it.  I posted this note to your bug report:

 

It appears to be a problem with a backend optimization where it is doing inlining of the matmul.

And it's at O2, the default optimization.

 

I found I can work around it by 2 methods

1) use /O3

2) use option /Qopt-matmul

 

I am tracing this back to the specific backend optimization at fault. i suspect inlining but I could be wrong. I should have this isolated in an hour or so and get the bug report done.

Daniel_Dopico
Новый участник I
1 380Просмотр.

Thank you very much, Ron. I can try one of those!

Ron_Green
Модератор
1 276Просмотр.

followup for this forum

 

This bug exists in 2024.1.0 and the upcoming 2024.2.0. 

it did not affect 2024.0.x

It is fixed in the new code branch targeting 2025.0.0 which is due out in the fall

/Qopt-matmul avoids the bug in 2024.1.x and 2024.2.x

 

 

Daniel_Dopico
Новый участник I
1 262Просмотр.

Thank you very much, Ron, for handling this so fast.

I reported quite a number of bugs in the last years and I am used to wait for months or even years for a fix and I normally get information when the bug is fixed, not before.

Ответить