Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

How to express the directive for OpenMP

Anonymous21
Beginner
172 Views

How do you know how to express the continuous red line with the previous line as follows?

!$OMP PARALLEL DEFAULT(PRIVATE),SHARED(i, j,k,ucn,q,dc,de,dz)
!$OMP& SHARED(qq,qw) ---> Question??
:
:
!$OMP END PARALLEL


If adding the + or &, the complier make the error message.


adi.f90(10): error #5082: Syntax error, found '&' when expecting one of:

0 Kudos
1 Solution
TimP
Black Belt
172 Views
Quoting - hydrol88

How do you know how to express the continuous red line with the previous line as follows?

!$OMP PARALLEL DEFAULT(PRIVATE),SHARED(i, j,k,ucn,q,dc,de,dz)
!$OMP& SHARED(qq,qw)
Could you let me know how to do or some references for that?

No red visible from here.
In Chapman, Jost, van der Pas http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=11387
likewise
https://computing.llnl.gov/tutorials/openMP/#Directives
for the !$omp form of OpenMP directive, the ampersand is required to be at the end of lines to be continued, analogous to Fortran 90 source format (except that it works also with Fortran 77 fixed source format).
Both that textbook and a working internet search engine are important for learning OpenMP.

View solution in original post

6 Replies
jimdempseyatthecove
Black Belt
172 Views

Check to verify that all the "!$OMP" are using the letter O (oh) and not the digit 0 (zero).

I suspect the error is in the !$OMP PARALLEL statement because the continuation line is not honored and the !$OMP END PARALLEL error is reporting it is being compiled without a matching !$OMP PARALLEL.

Jim Dempsey
TimP
Black Belt
173 Views
Quoting - hydrol88

How do you know how to express the continuous red line with the previous line as follows?

!$OMP PARALLEL DEFAULT(PRIVATE),SHARED(i, j,k,ucn,q,dc,de,dz)
!$OMP& SHARED(qq,qw)
Could you let me know how to do or some references for that?

No red visible from here.
In Chapman, Jost, van der Pas http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=11387
likewise
https://computing.llnl.gov/tutorials/openMP/#Directives
for the !$omp form of OpenMP directive, the ampersand is required to be at the end of lines to be continued, analogous to Fortran 90 source format (except that it works also with Fortran 77 fixed source format).
Both that textbook and a working internet search engine are important for learning OpenMP.

View solution in original post

jimdempseyatthecove
Black Belt
172 Views

tim18,

I noticed that the current version of the IVF documentation is missing the section on OpenMP continuation lines. There is a comment in thegeneral section on continuation lines applying to OpenMP directives, but no explicit example.

In the older IVF documentation there was a section of !$OMP continuation lines including sample code.

Intel should add this back to the documentation. (and include an index reference under the OpenMP section of theindex).

Jim Dempsey
TimP
Black Belt
172 Views
Jim,
Good point. I suppose the Intel docs can't hope to keep up with the improved quality of OpenMP documentation in textbooks and on the net, but that would indicate the need to include appropriate URLs to cover areas not directly in the Intel .pdf. Customer submission of documentation issues on premier.intel.com has more weight than comments from Intel employees.
Thanks.
rreis
New Contributor I
172 Views
This question was also posted and answered here:

http://software.intel.com/en-us/forums/showthread.php?t=63411
Anonymous21
Beginner
172 Views
Thanks for your helps.Imade a solution foryour commentsas to add &in the last line.


Quoting - hydrol88

How do you know how to express the continuous red line with the previous line as follows?

!$OMP PARALLEL DEFAULT(PRIVATE),SHARED(i, j,k,ucn,q,dc,de,dz)
!$OMP& SHARED(qq,qw) ---> Question??
:
:
!$OMP END PARALLEL


If adding the + or &, the complier make the error message.


adi.f90(10): error #5082: Syntax error, found '&' when expecting one of:


Reply