Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Error messagge when using IMSL libraries

Claudio_C_
Beginner
2,181 Views

I have recently purchased a licence for Intel fortran XE composer edition  with IMSL libraries. I was trying to write a simple code for  practising with the use of  IMSL libraries. I report below the code:

program prova

use D_LINRG_INT

integer m,i
parameter (m=2)
double precision a(m,m),ainv(m,m)

a(1,1) = 1.0d0
a(1,2) = 2.0d0
a(2,1) = 3.0d0
a(2,2) = 4.0d0

25 format(2(1X,F7.4))  
! Computing the inverse of A  using the IMSL library subroutine
call D_LINRG(a,ainv)

print*, 'A inverse is:'
do i = 1,m
    print 25, ainv(i,:)
end do
end program

when iI try to build the project ( I have visual studio 2015) I get the following error messagge:

error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [D_LINRG_INT]

Can anybody help me solve this problem?

0 Kudos
22 Replies
mecej4
Honored Contributor III
1,889 Views

Have you performed the configuration steps described in https://software.intel.com/en-us/articles/installing-and-using-the-imsl-libraries ?

0 Kudos
Claudio_C_
Beginner
1,889 Views

I had not, but when I did that it still didn't work.

After that I tried to unistall both the compiler and the libraries and  do everything again since yesterday I had installed the IMSL library before the compiler. This time I installed the compiler first and the IMSL libraries second. The $(FNL_DIR)\IA32\lib and

$(FNL_DIR)\IA32\include\dll (ant their intel64 counterparts) this time were already in the list so no need to add them as suggested in the configuration guide, still the program did not work.

Also I have noticed two things. Now when I write the code everything appears in black. I am using visual studio but it looks like the text of the source code was written with windows text editor. Second - and probably more relevant for the problem at hand -

if I use the LINRG routine I get the error message:  fatal error LNK1104: cannot open file 'imslmkl_dll.lib'

If I use the double precision version of that routine D_LINRG I get the error message: error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [D_LINRG_INT]

I report below the code I tried to compile:

program inversione
    
include 'link_fnl_shared.h'
use d_linrg_int
    
integer i,m
parameter (m=2)
double precision a(m,m),ainv(m,m)

a(1,1) = 2.0d0
a(1,2) = 0.0d0
a(2,1) = 0.0d0
a(2,2) = 2.0d0

25 format (2(1x,F6.3))

call d_linrg (a,ainv)

do i = 1,m
   print 25, ainv(i,:)
end do

pause

end program

 

 

0 Kudos
mecej4
Honored Contributor III
1,889 Views

There are two issues here, and it is more likely that they can be resolved if handled one at a time. And, when you are describing a problem, "didn't work" is not informative enough to enable any diagnosis to be made.

The first issue is: "Is IMSL installed corectly?". To answer this, open a Parallel Studio command window from the Start menu. In the command window, if you type "ifort" you should see the version number of the compiler displayed. Next, change to a directory containing a Fortran source code that uses IMSL. Now type the command "ifort /Qimsl <file.f>", using the name that you have given the file in place of <file.f>.

If this works, it is the IMSL/Ifort/VS integration that needs fixing. If not, run the batch file fnlsetup.bat in the IMSL directory. Report the messages that you see and we can see if the problem can be identified.

It would be useful to see the output of the the command "set F" in the command window.

0 Kudos
Claudio_C_
Beginner
1,889 Views

If I do the first thing you suggested (that is type "ifort /Qimsl <file.f>") I get the messagge: "Impossible to find the specified path"

If I do the second option (run fnlsetup.bat) I simply get the answer "Setting environment for IMSL(R) Fortran Library - Intel(R) 64" or alternatively "Setting environment for IMSL(R) Fortran Library - IA-32" depending on the folder I am in.

0 Kudos
mecej4
Honored Contributor III
1,889 Views

That you found fnlsetup.bat and could run it with a "successful" output suggests that you have a correct IMSL installation.

Please retry the compilation, replacing the string between '<' and '>' with the name of your file, and removing the '<' and '>'. For example, if you created a file called Ex1_imsl.f90, the command is

ifort /Qimsl Ex1_imsl.f90

Before typing that command, check that you have changed to the directory in which the file Ex1_imsl.f90 exists.

0 Kudos
Claudio_C_
Beginner
1,889 Views

Below is what I get, which seems exactly what I got when I compiled from Visual studio


C:\Users\Admin\Documents\files fortran\Console2\Console2>ifort /Qimsl Source1.f90 
! The above is the command I gave
 
! And here is what I get on screen


Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on IA-32, Version 17.0.2.187 Build 20170213
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.

Source1.f90(4): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [D_LINRG_INT]
use d_linrg_int
----^
compilation aborted for Source1.f90 (code 1)

0 Kudos
mecej4
Honored Contributor III
1,889 Views

In the same command window, please enter the command "set > env.txt" and post the resulting file env.txt here.

0 Kudos
Claudio_C_
Beginner
1,889 Views

Here it is!

ADVISOR_2017_DIR=C:\Program Files (x86)\IntelSWTools\Advisor 2017\
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Admin\AppData\Roaming
ARCH_PATH=ia32
BIN_ROOT=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\bin\
CMPLR_PATH=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\bin\intel64_ia32
CommonProgramFiles=C:\Program Files (x86)\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=DESKTOP-8UKFE52
ComSpec=C:\windows\system32\cmd.exe
CPATH=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl\include;
C_TARGET_ARCH=ia32
DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\
F90=ifort
F90FLAGS=/F6000000 /fpe:3 /Qopenmp /w /I:"C:\Program Files (x86)\VNI\imsl\fnl701\IA32\include\dll" /nologo
FC=ifort
FFLAGS=/F6000000 /fpe:3 /Qopenmp /w /I:"C:\Program Files (x86)\VNI\imsl\fnl701\IA32\include\dll" /nologo
FNL_COMPILER_VERSION=Intel(R) Visual Fortran Compiler XE for applications running on IA-32
FNL_DIR=C:\Program Files (x86)\VNI\imsl\fnl701
FNL_EXAMPLES="C:\Program Files (x86)\VNI\imsl\fnl701\IA32\examples"
FNL_LICENSE_NUMBER=67
FNL_OS_VERSION=Microsoft Windows
FNL_VERSION=7.0.1
FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING=Default
Framework40Version=v4.0
FrameworkDir=C:\windows\Microsoft.NET\Framework\
FrameworkDIR32=C:\windows\Microsoft.NET\Framework\
FrameworkVersion=v4.0.30319
FrameworkVersion32=v4.0.30319
FSHARPINSTALLDIR=C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\
HOMEDRIVE=C:
HOMEPATH=\Users\Admin
ICPP_COMPILER17=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\
IFORT_COMPILER17=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\
INCLUDE=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\compiler\include;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\compiler\include\ia32;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\\shared;C:\Program Files (x86)\Windows Kits\8.1\include\\um;C:\Program Files (x86)\Windows Kits\8.1\include\\winrt;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\mpi\ia32\include;C:\Program Files (x86)\VNI\imsl\fnl701\IA32\include\dll;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl\include;
INCLUDE_DIR="C:\Program Files (x86)\VNI\imsl\fnl701\IA32\include\dll"
INSPECTOR_2017_DIR=C:\Program Files (x86)\IntelSWTools\Inspector 2017\
INTELGTDEBUGGERROOT=C:\Program Files (x86)\IntelSWTools\debugger_2017\gdb\intel64_igfx\
INTEL_DEV_REDIST=C:\Program Files (x86)\Common Files\Intel\Shared Libraries\
INTEL_LICENSE_FILE=C:\Program Files (x86)\Common Files\Intel\Licenses
I_MPI_ROOT=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\mpi
LD_LIBRARY_PATH=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\..\linux\compiler\lib\intel64_lin
LIB=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\compiler\lib;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\compiler\lib\ia32;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\compiler\lib\ia32_win;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x86;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\mpi\ia32\lib;C:\Program Files (x86)\VNI\imsl\fnl701\IA32\LIB;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl\lib\ia32_win;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\compiler\lib\ia32_win;
LIBPATH=C:\windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral;\Microsoft.VCLibs\14.0\References\CommonConfiguration\neutral;
LIB_ARCH=IA32
LINK_F90=imslmkl_dll.lib /libs:dll /link /force:multiple
LINK_F90_DLL=imslmkl_dll.lib /libs:dll /link /force:multiple
LINK_F90_DLL_SMP=imslmkl_dll.lib /libs:dll /link /force:multiple
LINK_F90_SMP=imslmkl_dll.lib /libs:dll /link /force:multiple
LINK_F90_STATIC=imsl.lib imslsuperlu.lib imslhpc_l.lib imsllapack_vendor.lib imslblas_vendor.lib imsls_err.lib imslmpistub.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib /link /force:multiple
LINK_F90_STATIC_SMP=imsl.lib imslsuperlu.lib imslhpc_l.lib imsllapack_vendor.lib imslblas_vendor.lib imsls_err.lib imslmpistub.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib /link /force:multiple
LINK_FNL=imslmkl_dll.lib /libs:dll /link /force:multiple
LINK_FNL_HPC=imslmkl_dll.lib /libs:dll /link /force:multiple
LINK_FNL_IMSL=imsl_dll.lib /libs:dll
LINK_FNL_SHARED=imslmkl_dll.lib /libs:dll /link /force:multiple
LINK_FNL_SHARED_HPC=imslmkl_dll.lib /libs:dll /link /force:multiple
LINK_FNL_SHARED_IMSL=imsl_dll.lib /libs:dll
LINK_FNL_STATIC=imsl.lib imslsuperlu.lib imslhpc_l.lib imsllapack_vendor.lib imslblas_vendor.lib imsls_err.lib imslmpistub.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib /link /force:multiple
LINK_FNL_STATIC_HPC=imsl.lib imslsuperlu.lib imslhpc_l.lib imsllapack_vendor.lib imslblas_vendor.lib imsls_err.lib imslmpistub.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib /link /force:multiple
LINK_FNL_STATIC_IMSL=imsl.lib imslsuperlu.lib imslscalar.lib imsllapack_imsl.lib imslblas_imsl.lib imsls_err.lib imslmpistub.lib
LINK_MPI=imsl.lib imslsuperlu.lib imslhpc_s.lib imsllapack_vendor.lib imslblas_vendor.lib imslp_err.lib mkl_scalapack_core.lib mkl_blacs_intelmpi.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib /link /force:multiple
LINK_MPIS=imsl.lib imslsuperlu.lib imslhpc_s.lib imsllapack_vendor.lib imslblas_vendor.lib imsls_err.lib mkl_scalapack_core.lib mkl_blacs_intelmpi.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib /link /force:multiple
LINK_MPIS_HPC=imsl.lib imslsuperlu.lib imslhpc_s.lib imsllapack_vendor.lib imslblas_vendor.lib imsls_err.lib mkl_scalapack_core.lib mkl_blacs_intelmpi.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib /link /force:multiple
LINK_MPIS_IMSL=imsl.lib imslsuperlu.lib imslscalar.lib imsllapack_imsl.lib imslblas_imsl.lib imsls_err.lib
LINK_MPI_HPC=imsl.lib imslsuperlu.lib imslhpc_s.lib imsllapack_vendor.lib imslblas_vendor.lib imslp_err.lib mkl_scalapack_core.lib mkl_blacs_intelmpi.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib /link /force:multiple
LINK_MPI_IMSL=imsl.lib imslsuperlu.lib imslscalar.lib imsllapack_imsl.lib imslblas_imsl.lib imslp_err.lib
LOCALAPPDATA=C:\Users\Admin\AppData\Local
LOGONSERVER=\\DESKTOP-8UKFE52
MIC_LD_LIBRARY_PATH=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\compiler\lib\mic;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\compiler\lib\intel64_win_mic
MIC_LIBRARY_PATH=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\compiler\lib\mic;
MKLROOT=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl
MPIF90=mpiifort
MPIFLAGS=/F6000000 /fpe:3 /Qopenmp /w /include:"C:\Program Files (x86)\VNI\imsl\fnl701\IA32\include\static" /nologo
MPIRUN=mpiexec
MPI_DIR=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\mpi\ia32
MSVS_VAR_SCRIPT="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\..\VC\vcvarsall.bat"
MSVS_VAR_SCRIPT_DIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
MSVS_VER_2012="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\..\VC\vcvarsall.bat"
NDK_DIR=""
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\
NUMBER_OF_PROCESSORS=8
OneDrive=C:\Users\Admin\OneDrive
OnlineServices=Online Services
OS=Windows_NT
Path=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\bin\intel64_ia32;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\redist\ia32\compiler;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\redist\ia32_win\compiler;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\;C:\Program Files (x86)\MSBuild\14.0\bin;C:\Program Files (x86)\MSBuild\14.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools;C:\windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCPackages;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\;C:\Program Files (x86)\IntelSWTools\debugger_2017\bin\\..\gdb\intel64\bin;C:\Program Files (x86)\IntelSWTools\debugger_2017\bin\..\libipt\intel64\lib;C:\Program Files (x86)\VNI\imsl\fnl701\IA32\lib;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\redist\ia32_win\mkl;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\redist\ia32_win\compiler;C:\Program Files (x86)\VNI\imsl\fnl701\Intel64\lib;C:\Program Files (x86)\VNI\imsl\fnl701\IA32\lib;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\mpirt;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32_win\mpirt;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32_win\compiler;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Users\Admin\Anaconda3;C:\Users\Admin\Anaconda3\Scripts;C:\Users\Admin\Anaconda3\Library\bin;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Bandizip\7z;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\redist\ia32_win\mpirt
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
platformcode=7F
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=5e03
PRODUCT_NAME=Intel Compiler 17.0 Update 2
PRODUCT_NAME_FULL=Intel(R) Compiler 17.0 Update 2 (package 187)
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files (x86)
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules
PTSMINSTALLPATH=c:\Program Files (x86)\HP\HP ProtectTools Security Manager\Bin\
PTSMINSTALLPATH_X86=c:\Program Files (x86)\HP\HP ProtectTools Security Manager\Bin\
PUBLIC=C:\Users\Public
RegionCode=EMEA
ROOT=C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows
SCRIPT_NAME=compilervars_arch.bat
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\windows
TARGET_ARCH=ia32
TARGET_VS=vs2015
TARGET_VS_ARCH=x86
TEMP=C:\Users\Admin\AppData\Local\Temp
TMP=C:\Users\Admin\AppData\Local\Temp
UCRTVersion=10.0.10240.0
UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\
USERDOMAIN=DESKTOP-8UKFE52
USERDOMAIN_ROAMINGPROFILE=DESKTOP-8UKFE52
USERNAME=Admin
USERPROFILE=C:\Users\Admin
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\
VisualStudioVersion=14.0
VNI_DIR=C:\Program Files (x86)\VNI\
VNI_F90_MSG=C:\Program Files (x86)\VNI\imsl\fnl701\IA32\bin
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\
VTUNE_AMPLIFIER_XE_2017_DIR=C:\Program Files (x86)\IntelSWTools\VTune Amplifier XE 2017\
windir=C:\windows
WindowsLibPath=C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\8.1\
WindowsSDKLibVersion=winv6.3\
WindowsSDKVersion=\
WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\
WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\
WIN_TITLE=Intel Compiler 17.0 Update 2 IA-32 Visual Studio 2015
WIN_TITLE_ARCH=IA-32
WIN_TITLE_VS=Visual Studio 2015

 

0 Kudos
mecej4
Honored Contributor III
1,889 Views

Please change use d_linrg_int to use linrg_int in your source code and try building.

I should have caught this earlier if I had bothered to look up the documentation for LINRG or looked in the INCLUDE/DLL directory.

0 Kudos
Claudio_C_
Beginner
1,889 Views

I still get an error message.

This said using linrg instead of d_linrg does not seem a  good solution because I need double precision arithmetic

Here below is what I get and below I report again the code:

1>------ Build started: Project: Console2, Configuration: Debug Win32 ------
1>Compiling with Intel(R) Visual Fortran Compiler 17.0.2.187 [IA-32]...
1>Source1.f90
1>Linking...
1>LINK : fatal error LNK1104: cannot open file 'imslmkl_dll.lib'
1>
1>Build log written to  "file://C:\Users\Admin\Documents\files%20fortran\Console2\Console2\Debug\BuildLog.htm"
1>Console2 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

0 Kudos
mecej4
Honored Contributor III
1,889 Views

There is a single module LINRT_INT.MOD that provides interfaces for both precisions. This is the standard pattern in IMSL and other libraries. If you use REAL arguments, your call will go to S_LINRG. If you use double precision arguments, the call will go to D_LINRG. The name LINRG is overloaded to make this work seamlessly. Finally, note that the compilation succeeded, but the linking failed because the IMSL LIB directory was probably not configured in Visual Studio.

0 Kudos
Claudio_C_
Beginner
1,889 Views

Let me answer separately to the two parts: I report in italics your message for your convenience:

There is a single module LINRT_INT.MOD that provides interfaces for both precisions. This is the standard pattern in IMSL and other libraries. If you use REAL arguments, your call will go to S_LINRG. If you use double precision arguments, the call will go to D_LINRG. The name LINRG is overloaded to make this work seamlessly.

This means that I can always use the general name of the subroutine (say linrg) and the compiler understands by itself what type of arguments I am using and calls the appropriate version of the subroutine?

Finally, note that the compilation succeeded, but the linking failed because the IMSL LIB directory was probably not configured in Visual Studio.

Then what should I do to properly configure the IMSL LIB directory in Visual Studio?

 

0 Kudos
mecej4
Honored Contributor III
1,889 Views

Claudio Campanale wrote:

This means that I can always use the general name of the subroutine (say linrg) and the compiler understands by itself what type of arguments I am using and calls the appropriate version of the subroutine?

Exactly. That is what "overloaded" means. You use a "generic" name in your code, and the compiler will direct the call to a "specific" routine that is appropriate for the types of arguments. This topic is covered at the beginning of the IMSL manual.

Then what should I do to properly configure the IMSL LIB directory in Visual Studio?

Follow the steps in the link that I gave in #2, under "Configuring for Use from Microsoft Visual Studio". Some adaptation of the instructions may be necessary for different versions of Visual Studio. You may have done that configuration earlier, but your removing and reinstalling Parallel Studio and IMSL would almost certainly have erased the configuration.

0 Kudos
Claudio_C_
Beginner
1,889 Views

I followed those steps and it did not work. When you say "Some adaptation of the instructions may be necessary for different versions of Visual Studio" what do you mean? Is it something that I should do/have done when installing visual studio? and if that's the problem how can I know which adaptations I need?

 

 

0 Kudos
mecej4
Honored Contributor III
1,889 Views

"Did not work" is not a useful description of what happened. Please report the error messages that you saw, or attach a copy of the build log file (buildlog.htm) from Visual Studio.

The large number of "features" in Visual Studio, combined with the needs of two third-party packages (Parallel Studio, IMSL) make it impossible to guess what went wrong.

Let us back up a little. I feel that you may now have a working installation, but that the VS configuration for IMSL is not quite correct. Please do what I requested in #6. If you succeed in building an EXE, we shall know for sure that you have a working installation, and you can focus on configuring Visual Studio.

As far as the question of adapting the configuration instructions: Someone at Intel needs to update the IMSL configuration page for use with VS 2015. VS 2015 and VS 2013 have minor differences in layout and "property" names. I have VS 2015 on one machine, and after being configured for IMSL it generates EXEs for me.

As far as I am concerned, configuring VS is mostly a nuisance, and I do most of my program building at the command line.

0 Kudos
Claudio_C_
Beginner
1,889 Views

Now that I used linrg instead of d_linrg compiling at the command line works. So I guess I can use visual studio to write the program and then compile it at the command line.

This said I still have on problem, which is less important but still I if possible I would like to solve.

When I write the code using visual studio the fortran constructs (like do, if , type declarations and so on) do not appear in color, while they did when I was using the demo version of the compiler. Having those fortran words in color helps with writing the program. Do you know how to restore that? ( I repeat that when I installed the demo version of parallel studio they appeard in color but then when I unistalled it and then re-installed the parallel studio composer I bought the license for, everything appears a plain black text.

0 Kudos
mecej4
Honored Contributor III
1,890 Views

The page https://software.intel.com/en-us/articles/installing-and-using-the-imsl-libraries says "Sign in to add a comment", but after signing in you find that you are not allowed to add a comment (this was possible in the past, and I find my own older comment there). There is one piece of information that should be added to that page. Furthermore, please update to make sure that the recipe works with VS 2015.

In addition to INCLUDE and LIB environments being set up, which needs to be done before a project can be built, if dynamic linking is used the directory containing the IMSL DLLs needs to be added to the execution path in order to run or debug an IMSL application inside Visual Studio. The typical message that indicates that this needs to be done is something similar to "...IMSLMKL_DLL.dll was not found...".

 

  •    Right click on your IMSL project in Visual Studio 2015 Solution Explorer and choose Properties.
  •    Click Configuration-Debugging. Under Action look for the line "Environment".
  •    In the box to the right, enter PATH=$(FNL_DIR)\IA32\lib or PATH=$(FNL_DIR)\intel64\lib, as appropriate.

 

0 Kudos
mecej4
Honored Contributor III
1,890 Views

Claudio, here are complete instructions to configuring VS2015 with IFort 17 Update 2. You will have to wait for someone else to help with the VS editor color problem.

Use existing file containing example source code from IMSL manual, copied and pasted in a text editor and saved as a text file.

(Or, after creating the project in 2. below, create a new source file using the VS editor. Paste the code and save the file.)

1. Open Visual Studio using shortcut under Parallel Studio 2017-Visual Studio Integrations-Launch VS2015

2. Create new Intel Fortran project, add the source file to project. Make sure that the source file has the line INCLUDE 'link_fnl_shared.h'. If this is missing, you will need to specify linking the IMSL libraries explicitly.

3. Tools-Options-Intel Compiler and Tools - Visual Fortran - Compiler. Choose tab for Win32 or x64, as desired.


   (a) Click ... for "Includes:"
       In the Set Directory List pop-up, add $(FNL_DIR)\IA32\include\dll if not
       already present.

   (b) Click ... for "Libraries:"
       In the Set Directory List pop-up, add $(FNL_DIR)\IA32\lib if not
       already present.

   (c) Click ... for "Executables:"
       In the Set Directory List pop-up, add $(FNL_DIR)\IA32\lib if not
       already present.

   (d) Click on "OK" to return to Visual Studio main panel.

4. Select project, select Release-Win32 configuration, and Build. (If Win32 is not in the platform selection, create one based on X86 using the Configuration Manager.)

5. Build

6. Add the IMSL DLL directory to PATH as follows, if not already done. Right click on IMSL project in Solution Explorer and choose Properties.
   Click Configuration-Debugging. Under Action look for the line Environment.
   In the box to the right, enter PATH=$(FNL_DIR)\IA32\lib or    PATH=$(FNL_DIR)\intel64\lib, as appropriate.

0 Kudos
Kevin_D_Intel
Employee
1,890 Views

Claudio - You can try restoring the keyword coloring by following step 3 of this article. This could save time uninstalling/reinstalling Parallel Studio Composer Edition again. Beware this could also undo some of the configurations mecej4 has been advising you about for configuring IMSL under Visual Studio. If you decide to following step 3 and it restores the keyword coloring, then please double check IMSL settings too.

mecej4 – Thank you for your perseverance in assisting Claudio with this issue. I have been reviewing the noted page based on your earlier comments and we will get it updated/revised.

0 Kudos
Claudio_C_
Beginner
1,616 Views

Dear mecej4

For the moment I have been able to compile and run codes using the IMSL subroutine from the command prompt of Intel Parallel Studio.

I have not yet tried to follow your instructions to enable compiling Fortran/IMSL from visual studio.

This said I have a question. Is it true that I don't even need to have visual studio installed and that I could simpy do all the work by writing the source code using windows text editor and compiling from the Intel Parallel Studio command prompt?

0 Kudos
Reply