Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1 View

Fortran Openmp offload error

Hi everyone,

I am doing some fortran openmp code offloading in MIC.In compilation time I am getting the below error messages.Please help me.

 Directive ignored - Syntax error, found END-OF-STATEMENT when expecting one of: ) , :

 *MIC* Directive ignored - Syntax error, found END-OF-STATEMENT when expecting one of: ) , :

Thanks 

Sanjoy

0 Kudos
11 Replies
Highlighted
Employee
1 View

Sanjoy, we need to see the

Sanjoy, we need to see the actual statement(s) causing the error to be able to determine the root cause. Please post the associated statement(s) flagged by the errors. 

0 Kudos
Highlighted
Beginner
1 View

My coding statement is like

My coding statement is like this:

!DIR$ OFFLOAD BEGIN TARGET(mic:0) in(psi(1:5,1:nslt),irocom(1:nslt),cfsmt,psi2(1:nslt),pot(1:nslt),jcol(1:maxel),psi1(1:nslt),phi(1:nslt)) out(sinhom(1:nslt)

Though the out statement is coming below..originally it was in same line in that directive.

Below are the error statemaent in same line number:

evolve_msd4am4_td_combine_newest.f(232): remark #5082: Directive ignored - Syntax error, found END-OF-STATEMENT when expecting one of: ) , :
!DIR$ OFFLOAD BEGIN TARGET(mic:0) in(psi(1:5,1:nslt),irocom(1:nslt),cfsmt,psi2(1:nslt),pot(1:nslt),jcol(1:maxel),psi1(1:nslt),phi(1:nslt)) out(sinhom(1:nslt)
-------------------------------------------------------------------------------------------------------------------------------------------------------------^
evolve_msd4am4_td_combine_newest.f(232): remark #5082: *MIC* Directive ignored - Syntax error, found END-OF-STATEMENT when expecting one of: ) , :
!DIR$ OFFLOAD BEGIN TARGET(mic:0) in(psi(1:5,1:nslt),irocom(1:nslt),cfsmt,psi2(1:nslt),pot(1:nslt),jcol(1:maxel),psi1(1:nslt),phi(1:nslt)) out(sinhom(1:nslt)
-------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks in advance.

Regards

Sanjoy

0 Kudos
Highlighted
Beginner
1 View

Sorry all the in and out

Sorry all the in and out statement are in same line of that directive..

Regards

Sanjoy

0 Kudos
Highlighted
Employee
1 View

Does your last reply mean you

Does your last reply mean you resolved this?

In case not, the line is too long for a single line (fixed form) and the OUT clause is missing a closing paren. The transfer of psi also requires using a contiguous section, so you can perhaps use psi(:,1:nslt) ; however, you need to evaluate that based on the app’s use/need. With that you can restructure the directive as follows:

[cpp]

      !DIR$ OFFLOAD BEGIN TARGET(mic:0) in(psi(:,1:nslt),irocom(1:nslt),
     * cfsmt,psi2(1:nslt),pot(1:nslt),jcol(1:maxel),psi1(1:nslt),
     * phi(1:nslt))  out(sinhom(1:nslt))

[/cpp]

0 Kudos
Highlighted
Beginner
1 View

It is not resolved yet...

It is not resolved yet...

I am trying with the new directive also..same errors are showing...

One more thing leftside * is necessary right..?

Sanjoy

0 Kudos
Highlighted
Beginner
1 View

Error msg:

Error msg:

evolve_msd4am4_td_combine_newest.f(232): remark #5082: Directive ignored - Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
!DIR$ OFFLOAD BEGIN TARGET(mic:0) in(psi(:,1:nslt),irocom(1:nslt),
------------------------------------------------------------------^
evolve_msd4am4_td_combine_newest.f(232): remark #5082: *MIC* Directive ignored - Syntax error, found END-OF-STATEMENT when expecting one of: ( <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> <INTEGER_CONSTANT> ...
!DIR$ OFFLOAD BEGIN TARGET(mic:0) in(psi(:,1:nslt),irocom(1:nslt),
------------------------------------------------------------------^

0 Kudos
Highlighted
Employee
1 View

The name of your source file

The name of your source file is evolve_msd4am4_td_combine_newest.f, where .f implies fixed form, so the * should appear in column 6 and the code for each line begins in or after column 7.

The example below demostrates the original error and the replacement statement.

[cpp]

      program t
      integer :: psi(1,1),irocom(1),cfsmt,psi2(1),pot(1),jcol(1)
      integer :: psi1(1),phi(1),sinhom(1)

#ifdef ORIG
      !DIR$ OFFLOAD BEGIN TARGET(mic:0)in(psi(1:5,1:nslt),irocom(1:nslt),cfsmt,psi2(1:nslt),pot(1:nslt),jcol(1:maxel),psi1(1:nslt),phi(1:nslt)) out(sinhom(1:nslt)
#else
      !DIR$ OFFLOAD BEGIN TARGET(mic:0)in(psi(:,1:nslt),irocom(1:nslt),
     * cfsmt,psi2(1:nslt),pot(1:nslt),jcol(1:maxel),psi1(1:nslt),
     * phi(1:nslt))  out(sinhom(1:nslt))
#endif

      !dir$ end offload
      end

[/cpp]


To produce the original error, compile using:  ifort -fpp -DORIG t.f

To use the corrected form, compile using:  ifort -fpp t.f

0 Kudos
Highlighted
Beginner
1 View

Hi Kevin,

Hi Kevin,

Unable to resolve...?

Shall I share the file to you,so that you can understand what is wrong..

0 Kudos
Highlighted
Beginner
1 View

Hi ,

Hi ,

If u want I can share the file...

0 Kudos
Highlighted
Beginner
1 View

Issues still not resolved...

Issues still not resolved...

0 Kudos
Highlighted
Employee
1 View

Sorry, I had not received

Sorry, I had not received notice of your earlier posts. Sure, if you want to share a file you can post a reply and upload the file which everyone can read or use the "Send Author a Message" to send a private reply/protected file.

0 Kudos