Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

A problem with OpenMP code...

sidorovich
Beginner
656 Views
I have a code

USE OMP_LIB
INTEGER THREADS, M_up/0/
Y = 10000.0d0
Y_old = 0.0
call OMP_SET_NUM_THREADS(2)
THREADS = OMP_GET_NUM_THREADS( )

do while (((zabs(Y-Y_old)) > errrel).OR.(M_up Y_old=Y
M_up = M_up + THREADS
!$OMP PARALLEL
!$OMP DO SCHEDULE (STATIC, THREADS)
do m=M_up-THREADS,M_up,1
.............
....loop....
.............
end do
!$OMP END PARALLEL

I cannot comple it because of

1>Compiling with Intel Fortran Compiler 10.1.019 [IA-32]...
1>ye_circ.f90
1>fortcom: Fatal: There has been an internal compiler error (C0000005).
1>compilation aborted for C:userVisual Studio 2005Projectsyy.f90 (code 1)

I use MSVS2005 environment, the commandline for IFC is
/nologo /Og /QaxT /QxT /Qparallel /Qpar_threshold:2 /Qopenmp /module:"Release" /object:"Release" /libs:dll /threads /c

The problem may be overcome by deleting /Qopenmp option, but this's no good... ;-)

The same error one can get if complile the code

!$OMP PARALLEL DO
do m=0,M_max,1
* * *
if (zabs(Y-Y_old)* * *
end do
!$OMP END PARALLEL DO

How to solve this problem? Thank you!!
0 Kudos
2 Replies
Steven_L_Intel1
Employee
656 Views
Please report the problem to Intel Support and attach a complete test source that demonstrates the problem.
0 Kudos
jimdempseyatthecove
Honored Contributor III
656 Views

Hi,

Although the compiler should not produce a fatal error, the style of your programming, as posted,is incomplete, incorrect,orthat of C/C++.

Your post has:

do while (((zabs(Y-Y_old)) > errrel).OR.(M_up Y_old=Y 
M_up = M_up + THREADS

Which does not have matching numbers of parenthesis and has incomplete and/or incorrect expression following .OR.

The following assumption (fixing parenthesis) would produce incorrect statement

do while (((zabs(Y-Y_old)) > errrel).OR.(M_up Y_old=Y))

Due to invalid logical expression "(M_up Y_old=Y)"

Whitespace between M_up and Y_old is an invalid operator. And unlike C/C++ you cannot have an assignment within an expression.

Jim Dempsey

0 Kudos
Reply