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.

non standard threadprivate

Roman1
New Contributor I
541 Views

Hi,

The code below is Example A.27.6f (page 248) from OpenMP API.
http://www.openmp.org/mp-documents/OpenMP3.1.pdf

When I compile the code with the /Qopenmp /stand:f03 options, the following warning is
printed for the THREADPRIVATE line:
warning #7025: This directive is not standard F2003.

Do you know the reason for this message?


Roman


[fortran]MODULE INC_MODULE_GOOD3
   REAL, POINTER :: WORK(:)
   SAVE WORK
!$OMP THREADPRIVATE(WORK)
END MODULE INC_MODULE_GOOD3


SUBROUTINE SUB1(N)
USE INC_MODULE_GOOD3

!$OMP PARALLEL PRIVATE(THE_SUM)
   ALLOCATE(WORK(N))
   CALL SUB2(THE_SUM)
   WRITE(*,*)THE_SUM
!$OMP END PARALLEL
END SUBROUTINE SUB1


SUBROUTINE SUB2(THE_SUM)
   USE INC_MODULE_GOOD3
   WORK(:) = 10
   THE_SUM=SUM(WORK)
END SUBROUTINE SUB2


PROGRAM INC_GOOD3
   N = 10
   CALL SUB1(N)
END PROGRAM INC_GOOD3
[/fortran]

0 Kudos
1 Reply
Steven_L_Intel1
Employee
541 Views
We take the position that directives are "statements that look funny". They change the meaning of the program and therefore it is appropriate for us to flag them as not being standard Fortran. That OpenMP directives are standard OpenMP is a side issue.
0 Kudos
Reply