Fortran Openmp offload error

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

12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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. 

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

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

Regards

Sanjoy

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:

      !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))

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

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),
------------------------------------------------------------------^

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.

      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

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

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

Hi Kevin,

Unable to resolve...?

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

Hi ,

If u want I can share the file...

Issues still not resolved...

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.

Leave a Comment

Please sign in to add a comment. Not a member? Join today