Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29283 Discussions

Linking to C++'s IPP and TBB from Fortran, and duplicate MKL

lajoier
Beginner
1,226 Views
QUESTIONS
~~~~~~~~
Q1 -- Having both C++ and Visual Fortran installed, can I delete the duplicate
_ _ _ MKL folder in the Fortran section and link instead to the one in C++?
_ _ _ If so, what CSH, SH, and/or BAT files do I need to copy over from C++
_ _ _ or otherwise change? Do I need to change anything in the Registry?

Q2 -- If the above is possible (to link from Fortran into the C++ section), it is
_ _ _ also possible to link to the Integrated Performance Primitives (IPP) and
_ _ _ Threading Building Blocks (TBB) libraries that only installed with C++
_ _ _ and not with Visual Fortran. Are there other issues about doing this?

Q3 -- Unlike my old Compaq Visual Fortran, the Intel version required me to
_ _ _ install Microsoft Visual Studio (2005). If the answers to Q1 and Q2 are
_ _ _ positive, are there any Visual Studio settings I also would need to change?


BACKGROUND
~~~~~~~~~
I just installed the Intel Compiler Suite Professional for Windows which includes
both C++ and Visual Fortran. When the C++ software installed, in addition to
the compiler, there were three other software libraries. Per the release notes,
Version 11.0.072 (created 1/31/2009) includes:
Intel C++ Compiler for Windows Version 11.0.072
Intel Math Kernel Library (MKL) for Windows Version 10.1 update 1
Intel Integrated Performance Primitives (IPP) for Windows Version 6.0 update 1
Intel Threading Building Blocks (TBB) for Windows 2.1 update 2

When the Visual Fortran software installed, in addition to the compiler, there were
just one of those three other software libraries. Per the release notes,
Version 11.0.072 (created 1/31/2009) includes:
Intel Visual Fortran Compiler for Windows Version 11.0.072
Intel Math Kernel Library (MKL) for Windows Version 10.1 update 1

I was surprised that the installation SETUP program did not recognize that MKL was
already installed for C++. Indeed, it created a completely separate MKL library
folder "C:\Program Files\Intel\Compiler\11.0\072\fortran\mkl" that upon file date
and size analysis seems to have identical contents (all 142 subfolders and 6258
files) to the folder "C:\Program Files\Intel\Compiler\11.0\072\cpp\mkl".

That is an extra 300 MB of wasted file space, when I should be able to link to
the C++ one, if the files are truly identical (down to the byte and second).

After installation, I found that the only "new" files in the "C:\Program Files\Intel"
folder were CSH, SH, and BAT files to establish DOS-like environment variables.
And these variables are mainly associated with setting the PATH to the above
mentioned software libraries. These files are as follows:

C:\Program Files\Intel\Compiler\11.0\072\cpp\bin\ia32\iclvars_ia32.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\bin\iclvars.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\mkl\tools\environment\mklvars32.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\mkl\tools\environment\mklvars64.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\mkl\tools\environment\mklvarsem64t.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\em64t\vc8\bin\tbbvars.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\em64t\vc8\bin\tbbvars.csh
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\em64t\vc8\bin\tbbvars.sh
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\em64t\vc9\bin\tbbvars.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\em64t\vc9\bin\tbbvars.csh
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\em64t\vc9\bin\tbbvars.sh
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\ia32\vc7.1\bin\tbbvars.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\ia32\vc7.1\bin\tbbvars.csh
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\ia32\vc7.1\bin\tbbvars.sh
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\ia32\vc8\bin\tbbvars.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\ia32\vc8\bin\tbbvars.csh
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\ia32\vc8\bin\tbbvars.sh
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\ia32\vc9\bin\tbbvars.bat
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\ia32\vc9\bin\tbbvars.csh
C:\Program Files\Intel\Compiler\11.0\072\cpp\tbb\ia32\vc9\bin\tbbvars.sh

C:\Program Files\Intel\Compiler\11.0\072\fortran\Bin\IA32\ifortvars_ia32.bat
C:\Program Files\Intel\Compiler\11.0\072\fortran\Bin\IA32\vsppevars_ia32.bat
C:\Program Files\Intel\Compiler\11.0\072\fortran\Bin\ifortvars.bat
C:\Program Files\Intel\Compiler\11.0\072\fortran\mkl\tools\environment\mklvars32.bat
C:\Program Files\Intel\Compiler\11.0\072\fortran\mkl\tools\environment\mklvars64.bat
C:\Program Files\Intel\Compiler\11.0\072\fortran\mkl\tools\environment\mklvarsem64t.bat




0 Kudos
5 Replies
TimP
Honored Contributor III
1,226 Views
As far as I know, the MKL installations are identical, and 11.1 corrects this by moving MKL up to the same folder as fortran and cpp, and telling you when you are about to repeat an installation. If you set up either the ifort or the ICL environment, the PATHs for the others are set up also.
The Fortran installer wants to install PPE (a cut down version of VS2005) if it doesn't see a Visual Studio already installed. The C++ compiler won't work when you install Fortran this way. In order to make it all work together, you would need to remove the Fortran installation (at least the PPE), install the full Visual Studio and service packs, and repair ICL, and ifort.
0 Kudos
lajoier
Beginner
1,226 Views
Quoting - tim18
As far as I know, the MKL installations are identical, and 11.1 corrects this by moving MKL up to the same folder as fortran and cpp, and telling you when you are about to repeat an installation. If you set up either the ifort or the ICL environment, the PATHs for the others are set up also.
The Fortran installer wants to install PPE (a cut down version of VS2005) if it doesn't see a Visual Studio already installed. The C++ compiler won't work when you install Fortran this way. In order to make it all work together, you would need to remove the Fortran installation (at least the PPE), install the full Visual Studio and service packs, and repair ICL, and ifort.

Thank you for the quick reply. I would have responded sooner, but did not know where such replies are placed.

I JUST installed the latest compiler suite. I don't see 11.1, is it released yet? Is it a patch or a complete reinstall?

I was also thinking of moving the MLK, IPP, and TBB folders up to the same level as CPP and FORTRAN, and to adjust the link files accordingly. If I did so, and deleted one of the duplicate MKL folders, is there anything more to do than edit the BAT, CSH, and SH files (I have a nifty multi-file search and replace utility to reduce this labor)? Is there any PATH information hard-coded in 11.0 that would complain about such moves? Any mods to Registry?

I am not familar with the terms IFORT or ICL. My goal is to use Visual Studio 2005 (which I have never used BTW) along with both C++ and Fortran as necessary to get both old and new engineering software working again and/or developed in modern Windows environment. All my Fortran and C engineering software development to date has been in the command-line Unix-type OS environment. More recently though, I have been doing a lot of business software development in Visual Basic for Applications (VBA) in Microsoft Excel and Word, and its GUI IDE.

Long ago, my flight simulation code used to run on an Apollo computer (probably the last one in existance) and send a data stream across a serial port to an actuated model and another data stream across the Ethernet to a SGI computer for drive the display program. I have a copy of X-Plane on my PC and would to ressurrect that code and send UDP data packets from my Fortran/C flight sim to drive the X-Plane simulation. My old Compaq Visual Fortran did not have UDP functions, and I could never figure out how to call up Windows API DLL functions. I am hoping that this new Intel C++ and Fortran compiler suite either already has such functions or has been API connectivity.

-- Ronnie
0 Kudos
TimP
Honored Contributor III
1,226 Views
11.1 is a beta compiler, which is offered a couple of places on these forums. You would be restricted from releasing software until full release of 11.1, after which your current license, if still in effect, covers the new version. I mentioned it here only to say that your idea looks like it will be implemented over the next few months. I don't think such differences in folder organization show up in registry. A new version such as 11.1 gives you yet another copy of everything. The VS GUI integration allows 2 installations to co-exist; 10.1 and 11.0, or 11.0 and 11.1.
Incidentally, the replacement for PPE in 11.1 takes a somewhat different form, but still you need standard Visual Studio to support C/C++.
ifort and icl are the command line names of the Intel Fortran and C compilers for Windows. Sorry if I abbreviated my reply too much.
In principle, ability to call Windows API directly from Fortran is the same in CVF or current ifort, except that now it is extended to a bunch of newer Windows versions.
0 Kudos
lajoier
Beginner
1,226 Views
Quoting - tim18
11.1 is a beta compiler, which is offered a couple of places on these forums. You would be restricted from releasing software until full release of 11.1, after which your current license, if still in effect, covers the new version. I mentioned it here only to say that your idea looks like it will be implemented over the next few months. I don't think such differences in folder organization show up in registry. A new version such as 11.1 gives you yet another copy of everything. The VS GUI integration allows 2 installations to co-exist; 10.1 and 11.0, or 11.0 and 11.1.
Incidentally, the replacement for PPE in 11.1 takes a somewhat different form, but still you need standard Visual Studio to support C/C++.
ifort and icl are the command line names of the Intel Fortran and C compilers for Windows. Sorry if I abbreviated my reply too much.
In principle, ability to call Windows API directly from Fortran is the same in CVF or current ifort, except that now it is extended to a bunch of newer Windows versions.


I am not sure why, but it looks like the Registry contains the location of every file
on the computer, or at least in the Program Files folder. My search was looking
promising (few hits) until I came to the section where the keys are long strange
combos of letters and numbers that somehow mean something to the O/S.

Do you know of anyone who has tried to do what I asked before, in terms of
moving, or at least link between the Fortran and C++ libraries and copying or
editing the CSH, BAT, and SH files? If I don't move the C++ libraries, that will
minimize any Registry mods.

QUESTIONS
~~~~~~~~
Q1 -- Having both C++ and Visual Fortran installed, can I delete the duplicate
_ _ _ MKL folder in the Fortran section and link instead to the one in C++?
_ _ _ If so, what CSH, SH, and/or BAT files do I need to copy over from C++
_ _ _ or otherwise change? Do I need to change anything in the Registry?

Q2 -- If the above is possible (to link from Fortran into the C++ section), it is
_ _ _ also possible to link to the Integrated Performance Primitives (IPP) and
_ _ _ Threading Building Blocks (TBB) libraries that only installed with C++
_ _ _ and not with Visual Fortran. Are there other issues about doing this?

Q3 -- Unlike my old Compaq Visual Fortran, the Intel version required me to
_ _ _ install Microsoft Visual Studio (2005). If the answers to Q1 and Q2 are
_ _ _ positive, are there any Visual Studio settings I also would need to change?

0 Kudos
Steven_L_Intel1
Employee
1,226 Views
Q1 - Yes, you can. It would be better to do a "change" on the Fortran install and remove the MKL component rather than just delete the files. If you are using the command line, you would edit ifortvars.bat to point to the proper MKL. From Visual Studio you have to do it manually anyway.

Q2: IPP, theoretically, yes. IPP does not provide Fortran declarations but, as I often say, "if you can call it from C you can call it from Fortran". Note that I said C and not C++. TBB, however, is a C++ class library and is usable from C++ only.

Q3: Intel Fortran as of 10.0 installs a limited Visual Studio if you don't have it - just as CVF did. For more information on migrating from CVF, see http://software.intel.com/en-us/articles/migrating-from-compaq-visual-fortran Typically you would use Tools > Options > Intel Visual Fortran > Compiler and then add the paths for Library files for MKL and/or IPP. For MKL you'd also want Include files. See the MKL documentaton for more details.
0 Kudos
Reply