Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26749 Discussions

Error compiling MKL example ex_nlsqp_bc_f

Arbabi__Nasser
Beginner
145 Views
I am trying to run "ex_nlsqp_bc_f.f" example of MKL in Intel Composer XE 2013 and Visual Studio 2012, but I get the following errors: mkl_rci.fi(158): error #5082: Syntax error, found '&' when expecting one of: * I just run the example code without any alterations. Do you have any suggestion how to resolve this error? Thanks
0 Kudos
7 Replies
Steve_Lionel
Black Belt Retired Employee
145 Views

Given that the filename ends with .f, that means it is interpreted as fixed-form source. You've asked this in the Fortran forum rather than the MKL forum, and I don't have the MKL samples handy, but I'd guess that there is a confusion between fixed and free form somewhere. The include file might be assuming free-form.

This is a rather old version of the product - if you need more help with MKL please ask in the MKL forum.

mecej4
Black Belt
145 Views

The mkl_rci.fi file for the current MKL version (the one that came with PS2018U2) appears to be slightly different. It would help if you posted Line-158 and a couple of adjacent lines, given that you have an old version of MKL. These MKL include files have a format that makes them usable in both fixed and free format source. Make sure that the '&' marks at the ends of lines in mkl_rci.fi are at or beyond col. 73, and that the '&' marks at the beginnings of lines are exactly in col.6.

I built and ran the example with PS2018 with no hitches, but that is probably of little comfort to you.

 

Arbabi__Nasser
Beginner
145 Views
mecej4 wrote:

The mkl_rci.fi file for the current MKL version (the one that came with PS2018U2) appears to be slightly different. It would help if you posted Line-158 and a couple of adjacent lines, given that you have an old version of MKL. These MKL include files have a format that makes them usable in both fixed and free format source. Make sure that the '&' marks at the ends of lines in mkl_rci.fi are at or beyond col. 73, and that the '&' marks at the beginnings of lines are exactly in col.6.

I built and ran the example with PS2018 with no hitches, but that is probably of little comfort to you.

 

Thanks for your comment. Line 158 of "mkl_rci.fi" is as below: 158 SUBROUTINE DCGMRHS_GET(n,x,nRhs,b,rci_request,ipar,dpar, & 159 & tmp,itercount) The "&" mark, in the beginning, is at line 6, and the end "&" mark is in Col 73. I need to include this library in my code as I want to embed my code into ABAQUS. Is there any way to include the code in a way that runs correctly, or modify the "mkl_rci.fi" file? I tried to modify the "mkl_rci.fi" file manually, but it is read-only.
Steve_Lionel
Black Belt Retired Employee
145 Views

If you are describing the source correctly, that looks ok. Please create a ZIP with that file and the .f you are compiling and attach it to a reply here.

Arbabi__Nasser
Beginner
145 Views
Steve Lionel (Ret.) wrote:

If you are describing the source correctly, that looks ok. Please create a ZIP with that file and the .f you are compiling and attach it to a reply here.

Thanks Steve. Actually, I copied the "mkl_rci.fi" file content to another file, and removed the "&" marks at the end of lines. Then I replaced the modified file with the original, which resolved the problem.
Steve_Lionel
Black Belt Retired Employee
145 Views

Oh, I wonder. What compiler options did you use? /extend_source by any chance?

Arbabi__Nasser
Beginner
145 Views

Steve Lionel (Ret.) wrote:

Oh, I wonder. What compiler options did you use? /extend_source by any chance?

I included the KLM library into VS console (Console> properties> Fortran> Libraries> /Qmkl:parallel). Then I modified the "mkl_rci.fi" file in the installed directory to be consistent with Fortran77 format.

Reply