Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

including mkl_rci.fi

ked1
Beginner
1,296 Views
I would like to implement fgmres, but I know little about mkl. My current problem is that when I try to include mkl_rci.fi, I get the following errors:

fortcom: Warning: /opt/apps/intel/10.1.015/mkl/include/mkl_rci.fi, line 28: Bad # preprocessor line
#define DCG(N, X, NRHS, B, RCI_REQUEST, IPAR, DPAR, TMP) DCGMRHS(N, X, NRHS, B, RCI_REQUEST, IPAR, DPAR, TMP)
-^
fortcom: Warning: /opt/apps/intel/10.1.015/mkl/include/mkl_rci.fi, line 29: Bad # preprocessor line
#define DCG_INIT(N, X, NRHS, B, METHOD, RCI_REQUEST, IPAR, DPAR, TMP) DCGMRHS_INIT(N, X, NRHS, B, METHOD, RCI_REQUEST, IPAR, DPAR, TMP)
-^
fortcom: Warning: /opt/apps/intel/10.1.015/mkl/include/mkl_rci.fi, line 30: Bad # preprocessor line
#define DCG_CHECK(N, X, NRHS, B, RCI_REQUEST, IPAR, DPAR, TMP) DCGMRHS_CHECK(N, X, NRHS, B, RCI_REQUEST, IPAR, DPAR, TMP)
-^
fortcom: Warning: /opt/apps/intel/10.1.015/mkl/include/mkl_rci.fi, line 31: Bad # preprocessor line
#define DCG_GET(N, X, NRHS, B, RCI_REQUEST, IPAR, DPAR, TMP, ITERCOUNT) DCGMRHS_GET(N, X, NRHS, B, RCI_REQUEST, IPAR, DPAR, TMP, ITERCOUNT)
-^
fortcom: Error: /opt/apps/intel/10.1.015/mkl/include/mkl_rci.fi, line 33: Syntax error, found '**' when expecting one of: => = . ( : %
C** #DEFINE
-^
fortcom: Error: /opt/apps/intel/10.1.015/mkl/include/mkl_rci.fi, line 41: Syntax error, found '**' when expecting one of: => = . ( : %
C** Function prototypes
-^
fortcom: Error: /opt/apps/intel/10.1.015/mkl/include/mkl_rci.fi, line 34: A specification statement cannot appear in the executable section.
integer TR_SUCCESS
------^
fortcom: Error: /opt/apps/intel/10.1.015/mkl/include/mkl_rci.fi, line 35: A specification statement cannot appear in the executable section.
parameter (TR_SUCCESS = 1501)
------^


I use the command

ifort -o test -L/opt/apps/intel/10.1.015/mkl/lib/em64t -I/opt/apps/intel/10.1.015/mkl/include -lmkl_lapack -lmkl -lguide -lpthread -warn test.f90

to get this.

Can anybody help me with this?
0 Kudos
1 Solution
Artem_V_Intel
Employee
1,296 Views
Quoting - tim18
Artur has a good point. 10.1.015 (original 10.1 release version) is an unlikely choice, when so many improved versions are available.

I'm completely agreed with Tim18's suggestion about newest versions of MKL, for example MKL 10.2 Update 1 is available now.

However, 10.1.0.015 version is also may be used. Please, take a look at cg_jacobi_precon.f example in "examples/solver/source" directory. I used Intel Fortran Compiler Professional version 11.1.038 and the next command line to build this sample:

ifort -w -I/opt/intel/mkl/10.1.0.015/include -fpp cg_jacobi_precon.f -L/opt/intel/mkl/10.1.0.015/lib/em64t/ -lmkl_solver_lp64 -lmkl_intel_lp64 -Wl,--start-group -lmkl_intel_thread -lmkl_core -Wl,--end-group -lguide -lpthread -lm -o cg_jacobi_precon.out

Probably it will help you.

If not, could you pleaseattach your test case?

Best regards,
Art

View solution in original post

0 Kudos
5 Replies
TimP
Honored Contributor III
1,296 Views
If you want to invoke the ifort pre-processor before compilation, you must so specify on the command line by one of the -fpp options, or implicitly by changing the name of the file to be pre-processed to .F90.
0 Kudos
ArturGuzik
Valued Contributor I
1,296 Views
Quoting - tim18
If you want to invoke the ifort pre-processor before compilation, you must so specify on the command line by one of the -fpp options, or implicitly by changing the name of the file to be pre-processed to .F90.

If Tim's suggestion wouldn't help (I'm not sure whether this applies to your version). There was an issue with that and was resolved (around Jan of this year). As far as I can remember. To workaround you could remove that lines from the file (make a copy first).

A.
0 Kudos
TimP
Honored Contributor III
1,296 Views
Artur has a good point. 10.1.015 (original 10.1 release version) is an unlikely choice, when so many improved versions are available.
0 Kudos
Artem_V_Intel
Employee
1,297 Views
Quoting - tim18
Artur has a good point. 10.1.015 (original 10.1 release version) is an unlikely choice, when so many improved versions are available.

I'm completely agreed with Tim18's suggestion about newest versions of MKL, for example MKL 10.2 Update 1 is available now.

However, 10.1.0.015 version is also may be used. Please, take a look at cg_jacobi_precon.f example in "examples/solver/source" directory. I used Intel Fortran Compiler Professional version 11.1.038 and the next command line to build this sample:

ifort -w -I/opt/intel/mkl/10.1.0.015/include -fpp cg_jacobi_precon.f -L/opt/intel/mkl/10.1.0.015/lib/em64t/ -lmkl_solver_lp64 -lmkl_intel_lp64 -Wl,--start-group -lmkl_intel_thread -lmkl_core -Wl,--end-group -lguide -lpthread -lm -o cg_jacobi_precon.out

Probably it will help you.

If not, could you pleaseattach your test case?

Best regards,
Art

0 Kudos
ked1
Beginner
1,296 Views
My code is working now.Using yourentire ifort command, I was able to compilethe.f version given in the Intel example files, but not the .f90 code that I wrote. By deleting the two lines inmkl_rci.fi that were giving meproblems, I was able to compile my .f90 code as well. Thanks for the help.

0 Kudos
Reply