Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

How to express the directive for OpenMP

Anonymous21
Beginner
567 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
Honored Contributor III
567 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

0 Kudos
6 Replies
jimdempseyatthecove
Honored Contributor III
567 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
0 Kudos
TimP
Honored Contributor III
568 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.
0 Kudos
jimdempseyatthecove
Honored Contributor III
567 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
0 Kudos
TimP
Honored Contributor III
567 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.
0 Kudos
rreis
New Contributor I
567 Views
This question was also posted and answered here:

http://software.intel.com/en-us/forums/showthread.php?t=63411
0 Kudos
Anonymous21
Beginner
567 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:


0 Kudos
Reply