I was attempting to run my Structural Analysis program this morning, where mecej4 was instrumental in getting Pardiso working. The HP computer I use sometimes is due for a scrub and reinstall of windows. It has the last of the parallel studio remnants and the new one-api installed. As I tried to recompile the program I encountered 66 errors, mainly due to mkl and use and include statements.
I stupidly played with it for a while and the errors could be fixed until I got to MKL and Pardiso and then it was a hopeless cause.
I swapped over to the Thinkpad and it complied and ran first time. The think pad is a recent install with only one-api ever being installed. The only warning was on heaps_arrays being changed to heaps-array. It was a sln file that had not been changed for several years.
Why did the heaps_array change,?
I probably made an install error on the HP.
Also, how do you find the Fortran and MKL samples, the Intel Manual page references them, but they are not automatically installed and a hunt on google left me none the wiser. I had to chuckle, the Intel Sample with MKL and one-api was run on VS 2017 about ten months ago.
Still waiting for the "pure Fortran question..."
The thing about heap_arrays and heap-arrays (not heaps_arrays) is that both were accepted for a long time, even though only heap-arrays is documented. The underscore version is a remnant of the DEC VMS days, where compiler options were spelled with underscores, and someone thought it would be a good idea to accept either underscore or dash. This isn't sustainable and the compiler was changed to warn you that the underscore version is deprecated. It still works - for now.
Samples - sigh. The Fortran samples have not been updated in a few years (maybe even since I left.) There is no oneAPI version of the Fortran samples. As for MKL, you'll have to ask them. But samples have not been installed with the compiler for at least 6-7 years, if not more.
MKL was a separate product in the early years, then an optional component of Parallel Studio, before OneAPI was born. In OneAPI, MKL is a selectable component in the OneAPI Base Toolkit. You did not say which Intel compiler you attempted to use on your HP, but if that compiler does not also have a companion MKL installed, attempts to compile programs that call MKL routines will not succeed.
Whether you have an MKL version that came with Parallel Studio or the one available for OneAPI, the MKL examples are delivered as Zip archives:
Directory of c:\xxx\yyy\OneAPI\mkl\latest\examples 08/02/2021 07:23 PM <DIR> . 08/02/2021 07:23 PM <DIR> .. 06/11/2021 03:54 AM <DIR> c 07/10/2021 08:32 AM <DIR> cmake 06/11/2021 11:54 AM 75,940 examples_cluster_c.zip 06/11/2021 11:54 AM 133,852 examples_cluster_f.zip 06/11/2021 11:54 AM 2,863,365 examples_core_c.zip 06/11/2021 11:54 AM 2,866,894 examples_core_f.zip 06/11/2021 11:54 AM 1,640,567 examples_dpcpp.zip 06/11/2021 11:54 AM 136,115 examples_f95.zip 06/11/2021 11:54 AM 389,792 examples_offload_c.zip 06/11/2021 11:54 AM 303,717 examples_offload_f.zip 06/11/2021 03:54 AM <DIR> f 06/11/2021 03:54 AM <DIR> f95 06/11/2021 11:54 AM 11,661 README.txt
The subdirectories "c", "cmake", etc., will not be present until after the Zip files have been extracted.
The MKL examples are meant to be studied and used as templates for user applications, but are not otherwise needed for building programs that use MKL.
Steve has already commented on the Fortran compiler examples. Those examples, as far as I recollect, have nothing to do with MKL.
I was of the opinion that heaps-array was about as close to a real Fortran question as I could get. Thank you for the response, it is quite easy to understand how someone on a committee somewhere has had a bee in their bonnet, always wondered if that was a car bonnet or a hat, although the hat is the obvious answer as the phrase comes from the 16th century from Scotland, or about the time my children think I was born.
The HP had the MKL installed with ONEAPI and the installation looks normal. If I strip it down to the bare bones, the first error is
Severity Code Description Project File Line Suppression State
Error error #5102: Cannot open include file 'mkl_pardiso.fi' C:\Users\macne\Documents\Visual Studio 2017\Projects\Program087 - Balor\Balor\Balor\pardiso.f90 83
The file is however present in the mkl installation, but it is also present in the Parallel Studio version which was uninstalled before the ONE API was installed.
My ONEAPI MKL install has the examples in the .1 and the .2 folder, but not the .3 or the latest folder. Interesting. See picture.
The exact same program and SLN file compiled first time on the Thinkpad which has only had ONE_API installed. This program has been running with MKL for several years now across a multitude of machines and different versions of Intel Fortran.
It is no great problem, it was just an interesting observation.
Thank you for the note on the samples.
You have to make sure that the MKL include file is in one of the places Fortran will look for include files. This is the Fortran > General > Additional Include Directories property, or if you use MKL a lot you can add it to the global list of include directories under Tools > Options > Intel Compilers and Libraries > IFORT Intel Fortran Compiler Classic > Compilers > Includes. Don't forget to set the proper paths for both Win32 and x64.