Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

OpenMP catastrophic error Internal compiler error

pat97269
Beginner
1,584 Views

Hi all,here i report the catastrophic error i've got with a simple code :[fortran]module tt contains function test(p0) integer,dimension(:),allocatable :: p0 integer :: test,np[/fortran][fortran] np=10 !$omp parallel do shared(np) default(private) do i=1,np print *,'i',p0 end do !$omp end parallel do test=1 end function test end module tt program mp use tt implicit none integer :: i,np np=10 print *,test([1]) end program[/fortran] As soon as the openmp deal with an allocatable array which is an argument of the function , i get internal error.Thanks

0 Kudos
8 Replies
mecej4
Honored Contributor III
1,584 Views
The variable np is undefined in the module.
0 Kudos
pat97269
Beginner
1,584 Views
And so ? Did you compile the code ?
a undefined variable never stop the compiler and throw an catastrophic error, it's an execution time problem.
I fix the undefined variable and still have the problem, the compiler stop without compiling the code. (I have test that with v12.1.0 and the last v12.1.2)
0 Kudos
Udit_P_Intel
Employee
1,584 Views
I can reproduce this reported problem with just the following code. Note that I have removed NP here:

subroutine test(p0)
integer,dimension(:),allocatable :: p0

!$omp parallel do default(private)
do i=1,2
print *,p0
end do
!$omp end parallel do

end

-bash-3.2$ ifort -c a1234.f90 -openmp
a1234.f90: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not beexplicit cause of this error.

-----------
I noticed that if we remove DEFAULT(PRIVATE) then there is no problem. Maybe the other OpenMP experts can comment more on this issue. Or if there is a bug, then the support team can start a tracker.

Best!
-Udit
0 Kudos
TimP
Honored Contributor III
1,584 Views
On the basis that any internal error is a bug, even if provoked by invalid code, this does appear to demonstrate a compiler bug. The compiler ought to point to invalid source code before quitting. It may be a tough question of policy, as the compiler does little to diagnose OpenMP related problems unless you engage -diag-enable openmp and have Inspector installed. Unless I have missed something, the compile with that option engaged dies without results.
0 Kudos
Anonymous66
Valued Contributor I
1,584 Views
Hi,

I have escalated this issue to the developers. The issue number is DPD200177818. I will post any updated I receive on this issue to this thread.

Regards,
Annalee
0 Kudos
pat97269
Beginner
1,584 Views
The same issue appears when you try to work with output variable of a function. So it is both in and out 1.
Thanks
0 Kudos
Anonymous66
Valued Contributor I
1,584 Views

A fix has been found for this issue. We are currently planning to include it in the next major release which isscheduled for later this year.

0 Kudos
Anonymous66
Valued Contributor I
1,584 Views
This is issue has been fixed in Intel® Fortran Composer XE for Linux* 2013 which is now available at the Intel® Registration Center. Regards, Annalee Intel Developer Support * Other names and brands may be claimed as the property of others.
0 Kudos
Reply