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

newbie: free form include files

awallrab
Beginner
612 Views
Hello,
I'm quite new to mkl. As I looked at the include files
I noticed that there are only fixed form inlcude files
in the installation. Do I need to install the free form
include files seperately ?
0 Kudos
8 Replies
awallrab
Beginner
612 Views
I forgot to post the program I want to compile, so here it is :
include '/opt/intel/mkl/8.0.1/include/mkl_vsl.fi'

program noise

USE MKL_VSL_TYPE
USE MKL_VSL

implicit none

integer :: n

double precision :: a,sigma
double precision :: r(10000)
integer :: brng,method
integer :: seed,errcode

TYPE (VSL_STREAM_STATE) :: stream

brng=VSL_BRNG_MCG31
method=0
seed=1

a=0d0
sigma=1d0

n=10000

errcode=vslnewstream( stream, brng, seed )

errcode=vdrnggaussian( method, stream, n, r, a, sigma)

end

When I try to compile it produces the following error mesages:

ifort -fixed -free -L/opt/intel/mkl/8.0.1/lib/32/ -c noise.f90
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 1: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! file: mkl_vsl.fi
-------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 2: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C!
--^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 3: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! INTEL CONFIDENTIAL
-------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 4: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! Copyright(C) 2005 Intel Corporation. All Rights Reserved.
-------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 5: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! The source code contained or described herein and all documents related to
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 6: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! the source code ("Material") are owned by Intel Corporation or its suppliers
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 7: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! or licensors. Title to the Material remains with Intel Corporation or its
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 8: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! suppliers and licensors. The Material contains trade secrets and proprietary
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 9: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! and confidential information of Intel or its suppliers and licensors. The
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 10: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! Material is protected by worldwide copyright and trade secret laws and
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/incl ude/mkl_vsl.fi, line 11: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! treaty provisions. No part of the Material may be used, copied, reproduced,
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 12: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! modified, published, uploaded, posted, transmitted, distributed or disclosed
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 13: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! in any way without Intel's prior express written permission.
----------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 14: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! No license under any patent, copyright, trade secret or other intellectual
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 15: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! property right is granted to or conferred upon you by disclosure or delivery
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 16: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! of the Materials, either expressly, by implication, inducement, estoppel or
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 17: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! otherwise. Any license under such intellectual property rights must be
--------------------------------------------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 18: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! express and approved by Intel in writing.
---------------------------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 19: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C!++
----^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 20: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
C! Fortran 90 VSL interface.
-----------------------------^
fortcom: Error: /opt/intel/mkl/8.0.1/include/mkl_vsl.fi, line 21: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
0 Kudos
TimP
Honored Contributor III
612 Views
The Fortran include files should have been made compatible with either fixed or free form. It looks reasonable to me to file a problem report on premier.intel.com. It should be easy to fix, by making comment lines start with !, for instance. You didn't show any inclusion of the -I path to the mkl include directory. In my installation, the include file name is mkl_vsl_subroutine, not mkl_vsl_type.
0 Kudos
Andrey_G_Intel2
Employee
612 Views
Let my clarify situation with VSL fortran headers.
About source form. VSL headers implemented in fixed source form. Since MKL 8.0.2 we were replaced comment symbols from 'C!' to '!'. But were are only one incompatibility between free and fixed source form: it`s line folding. And we can`t make headers which will be compatible with free and fixed source form at the same time.
You can compile VSL headers to .mod files and use these files in your program without including mkl_vsl.fi into your source code.
About differences between mkl_vsl.fi and mkl_vsl_subroutine.fi. Read mklman.pdf please (chapter 10, note at end of page 10-1).
0 Kudos
TimP
Honored Contributor III
612 Views
Where there are continuation lines, the include files should be made compatible with both free form and standard 72-column fixed form, by the standard method:

Place & in column 73 of the line to be continued, and & in column 6 of the continuation line. The & in column 73 is ignored in fixed form.

The only case which is not taken care of is fixed form with extended line length. As agilev says, another copy of the include file would be needed, to take care of fixed form with varying line lengths.
Unfortunately, this scheme is not working in fixed format with the current ifort compiler, even with the include files provided with the compiler. I am checking on whether I should file a problem report.

Message Edited by tim18 on 03-10-2006 05:27 AM

0 Kudos
v-nijs
Beginner
612 Views
I am having the same problem with " include 'mkl_vsl.fi' " when i include it in an f90 file. The random number generators works fine in a .f file however. The solution that is offered to use with f90 files is not at all clear to me. I tried something with the .mod files but then I got other errors. Does anyone have a simple worked example or a step-by-step howto for this? Or perhaps even better, an mkl_vsl.fi file that doesn't cause these problems?

Thanks,

Vincent


0 Kudos
TimP
Honored Contributor III
612 Views
That problem was supposed to have been corrected in MKL 8.1. Please show a specific example of your problem with 8.1 or 9.0. Evidently, the problem was still in current versions 4 months ago, so there's little point in looking for a correction in any but now current versions.
0 Kudos
Daniel_Gandolfo
Beginner
612 Views
DON'T ANYBODY FIND THIS SITUATION WITH FORTRAN USERS UNACCEPTABLE. LOOK, THERE ARE NUMEROUS EXAMPLES FOR C/C++ USERS IN THE DOCS MATERIAL, ALMOST NOTHING FOR FORTRAN USERS ! HOW COME THAT QUESTIONS SO IMPORTANT LIKE THE WAY YOU SHOULD USE A SOFT YOU PAYED IS ALMOST NON-EXISTENT !!!
I TOO NEED TO BE ABLE TO USE IN A SIMPLE AND EFFICIENT WAY MKL, WHERE TO FIND THESE INFORMATIONS ? IT SEEMS THAT WE HAVE TO CORRECT BUGS IN THE SOFTS FOR THIS ? PLEASE, STOP THE JOKES !!!
0 Kudos
Daniel_Gandolfo
Beginner
612 Views
In order to use calls to VSL in fortran, do the following:

1) go to include directory: /Library/Frameworks/Intel_MKL.framework/Versions/8.1.1/include
2) compile the file mkl_vsl.f90 (it creates the corresponding mkl_vsl.mod file) this way:
ifort -vec-report0 -c mkl_vsl.f90
3) At the begining of your .f90 file delete (if present) the command: include 'mkl_vsl.fi' (command appearing in all example files given at: /Library/Frameworks/Intel_MKL.framework/Versions/8.1.1/examples/vslf/source)
4) At the beginning of your code, include module files: mkl_vsl_type.mod and mkl_vsl.mod right :
USE MKL_VSL_TYPE
USE MKL_VSL
These .mod files have to be present in your working dir!
5) compile your code including paths to libraries:
ifort -vec-report0 -L/$MKLROOT -lmkl -lguide -lpthread -lmkl_ia32 -lm Test.f90
6) Some functions (like CheckVslError) show errors at compilation time, just comment them.

All this works for me.
0 Kudos
Reply