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

Link error 7002

dajum
Novice
2,143 Views
I'm getting:

astap.for(62650): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [IFPORT]

use ifport

-----------^

I'm compiling in the build environment so all the environment variables have been set correctly and IFPORT.MOD is in the right include directory. So the include path would appear to be correct. Is this error message wrong? Why doesn't it find the compiler provided library?

Thanks,

dave

0 Kudos
18 Replies
mecej4
Honored Contributor III
2,143 Views
There are several inconsistencies in the report, so it may be useful to copy and paste the compiler and linker output verbatim. Please also state the compiler and OS versions used.

It is possible that you have more than one version of the compiler installed, and the compiler version that you ran is trying to read a module file (*.mod) that was compiled with a different version of the compiler.

The linker does not have any interest in .mod files. Likewise, the compiler does not read library files.

I also note that the source file is quite large. Is it possible that some compiler/computer limits are being bumped into?
0 Kudos
dajum
Novice
2,143 Views

c:\V53Ivf64\sinda33\HumeTime\vivf.inp_sw>ifort @infon.lnk

Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100414 Package ID: w_cprof_p_11.1.065

Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

ifort astap.for /fpe:0 /real_size:64 /integer_size:64 /names:lowercase /iface:cref /module:C:\PROGRA~1\CULLIM~1\SINDAF~3\mod /MD /iface:mixed_str_len_arg /include:C:\PROGRA~1\CULLI

M~1\SINDAF~3\lib /assume:byterecl /extend_source:132 /O3 /traceback /INCREMENTAL:NO

astap.for(62650): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [IFPORT]

use ifport

-----------^

compilation aborted for astap.for (code 1)


The source isn't that large compared to most of our files so it isn't likely to be hitting limits. It appears to be a compiler message, but says to check include paths. It knows it is looking for a module, so does it really check INCLUDE paths? Or does it only follow MODULE inputs? The line is simply calling a function from the IFPORT module. Do we need to do more than just USE the module name? I don't find anything in the documentation that helps define how to use it more than inserting the USE statement.

0 Kudos
Lorri_M_Intel
Employee
2,143 Views
How did you set up the command line environment? Did you use "Fortran Build Environment" menu item (which creates a command window),or did you set PATH explicitly yourself?

If you can't use the command window provided, at least invoke the ifortvars.bat file to set all environment variables needed to run the compiler. You can find that bat file in Program Files (x86)\Intel\Compiler\11.1\064\bin and you should use
ifortvars intel64

To answer your question about INCLUDE:

Yes, the compiler searches the INCLUDE directories to find modules. The /module switch is appended to the set of INCLUDE directories, but does not limit the search to that directory. It also names the directory where any .mod files generated by this compilation should be put.

ifortvars.bat sets the INCLUDE environment variable, including the directory where ifport.mod resides.

You should not have to do anything other than USE the module name. Well, once the INCLUDE environment variable is set up correctly of course.

I hope this helps,

-- Lorri


0 Kudos
dajum
Novice
2,143 Views
Thanks Lorri for your response.

I did use the "Fortran Build Environment" menu item from the Intel list. So all of that should have been set correctly. Here is the environment from the command prompt window. It has the INCLUDE path set. I verified that the file IFPORT.MOD exists within the paths in the INCLUDE set.

Maybe this will help you figure out why it doesn't work for me.

Can you tell me what to do next since I already think this should work okay without getting errors.

Dave

ALLUSERSPROFILE=C:\ProgramData

ANS_OLD_ATTACH=1

APPDATA=C:\Users\dajum\AppData\Roaming

CLASSPATH=.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip

CM2012DIR=C:\Program Files (x86)\Common Files\Autodesk Shared\Materials\

CommonProgramFiles=C:\Program Files (x86)\Common Files

CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files

CommonProgramW6432=C:\Program Files\Common Files

COMPUTERNAME=DAJUM-PC

ComSpec=C:\Windows\system32\cmd.exe

CPATH=C:\Program Files (x86)\Intel\Compiler\11.1\065\mkl\include;

FPATH=C:\Program Files (x86)\Intel\Compiler\11.1\065\mkl\include;

FP_NO_HOST_CHECK=NO

Framework35Version=v3.5

FrameworkDir=C:\Windows\Microsoft.NET\Framework64

FrameworkVersion=v2.0.50727

F_EM64T_REDIST11=C:\Program Files (x86)\Common Files\Intel\Shared Files\fortran\

HOMEDRIVE=C:

HOMEPATH=\Users\dajum

IFORT_COMPILER11=C:\Program Files (x86)\Intel\Compiler\11.1\065

ILBDIR=C:\Program Files (x86)\Common Files\Autodesk Shared\Materials\

INCLUDE=C:\Program Files (x86)\Intel\Compiler\11.1\065\mkl\include;C:\Program Files (x86)\Intel\Compiler\11.1\065\Include;C:\Program Files (x86)\Intel\Compiler\11.1\065\Include\Int

el64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0

A\include;

INTEL_LICENSE_FILE=C:\Program Files (x86)\Common Files\Intel\Licenses;C:\Program Files (x86)\Common Files\Intel\Licenses

LIB=C:\Program Files (x86)\Intel\Compiler\11.1\065\mkl\em64t\lib;C:\Program Files (x86)\Intel\Compiler\11.1\065\Lib\intel64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\AT

LMFC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib\x64;

LIBPATH=C:\Windows\Microsoft.NET\Framework64\v3.5;C:\Windows\Microsoft.NET\Framework64\v2.0.50727;C:\Windows\Microsoft.NET\Framework64\v3.5;C:\Windows\Microsoft.NET\Framework64\v2.

0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64;

LIBRARY_PATH=C:\Program Files (x86)\Intel\Compiler\11.1\065\mkl\em64t\lib;

LOCALAPPDATA=C:\Users\dajum\AppData\Local

LOGONSERVER=\\DAJUM-PC

NUMBER_OF_PROCESSORS=8

OS=Windows_NT

Path=C:\Program Files (x86)\Intel\Compiler\11.1\065\mkl\em64t\bin;C:\Program Files (x86)\Intel\Compiler\11.1\065\Bin\intel64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\B

IN\amd64;C:\Windows\Microsoft.NET\Framework64\v3.5;C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft .NET Framework 3.5 (Pre-Release Version);C:\Windows\Microsoft.NET\Framework64

\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual

Studio 9.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\x64;C:\Program Files\Microsoft SDKs\

Windows\v6.0A\bin\win64\x64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Program Files (x86)\Common Files\Intel\Shared Files\fortran\bin\Intel64;C:\Windows\system32;C:\Wind

ows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\Dell Wireless WLAN Card;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG Software S

tack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Wave Systems Corp\Gemalto\Access Client\v5\;C:\Program Files (x86)\Common Files\Roxio Sh

ared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;c:\lf9557;c:\bin;C:\Program Files (x86)\

QuickTime\QTSystem\;C:\Program Files (x86)\InstallAware\InstallAware 10;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

PROCESSOR_ARCHITECTURE=x86

PROCESSOR_ARCHITEW6432=AMD64

PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 30 Stepping 5, GenuineIntel

PROCESSOR_LEVEL=6

PROCESSOR_REVISION=1e05

ProgramData=C:\ProgramData

ProgramFiles=C:\Program Files (x86)

ProgramFiles(x86)=C:\Program Files (x86)

ProgramW6432=C:\Program Files

PROMPT=$P$G

PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

PUBLIC=C:\Users\Public

QTJAVA=C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip

RoxioCentral=C:\Program Files (x86)\Common Files\Roxio Shared\10.0\Roxio Central36\

SESSIONNAME=Console

SystemDrive=C:

SystemRoot=C:\Windows

TEMP=C:\Users\dajum\AppData\Local\Temp

TMP=C:\Users\dajum\AppData\Local\Temp

USERDOMAIN=dajum-PC

USERNAME=dajum

USERPROFILE=C:\Users\dajum

VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC

VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\

VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0

windir=C:\Windows

WindowsSdkDir=C:\Program Files\Microsoft SDKs\Windows\v6.0A\

0 Kudos
TimP
Honored Contributor III
2,143 Views
Just in case: the ifport.mod file must match the compiler version (e.g. X86 vs. X64, 11.1 vs. 12.0, ...)
If you forced the compiler to use a specific .mod file (ifort *.f90 ifport.mod) it should tell you if there is a match.
The source code ifport.f90 is provided, so you can make your own ifport.mod.
0 Kudos
dajum
Novice
2,143 Views
Tim I'm not sure what you are implying, but I didn't force anything. I'm on a 64 bit machine, using the 64 bit Build environment, and the INCLUDE path clearly points to the 64 bit version of the .mod file. There are only 2 on the machine, one in the ia32 directory and one in the ia64 directory. Why the compiler is confused is beyond my understanding.

Dave
0 Kudos
Steven_L_Intel1
Employee
2,143 Views
Please add the switch /#x to the command line and show us all the output from the command.
0 Kudos
dajum
Novice
2,143 Views
Here it is:

c:\V53Ivf64\sinda33\HumeTime\vivf.inp_sw>ifort @infon.lnk

Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100414 Package ID: w_cprof_p_11.1.065

Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

ifort astap.for /#x /fpe:0 /real_size:64 /integer_size:64 /names:lowercase /iface:cref /module:C:\PROGRA~1\CULLIM~1\SINDAF~3\mod /MD /iface:mixed_str_len_arg /include:C:\PROGRA~1\C

ULLIM~1\SINDAF~3\lib /assume:byterecl /extend_source:132 /O3 /traceback /INCREMENTAL:NO

C:\PROGRA~2\Intel\Compiler\11.1\065\bin\intel64\fortcom \

-D__INTEL_COMPILER=1110 \

-D_MT \

-D_DLL \

-D_M_AMD64 \

-D_M_X64 \

-D_WIN64 \

-D_WIN32 \

-D__INTEL_COMPILER_BUILD_DATE=20100414 \

-mGLOB_pack_sort_init_list \

-I. \

-IC:\PROGRA~1\CULLIM~1\SINDAF~3\lib \

-INCREMENTAL:NO \

-IC:\PROGRA~2\Intel\Compiler\11.1\065\include\intel64 \

"-IC:\Program Files (x86)\Intel\Compiler\11.1\065\mkl\include" \

"-IC:\Program Files (x86)\Intel\Compiler\11.1\065\Include" \

"-IC:\Program Files (x86)\Intel\Compiler\11.1\065\Include\Intel64" \

"-IC:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE" \

"-IC:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" \

"-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\include" \

"-assume byterecl" \

"-extend_source 132" \

-fpe0 \

"-fp_modspec fp_speculation_STRICT" \

"-iface cref" \

"-iface mixed_str_len_arg" \

"-integer_size 64" \

"-module C:\PROGRA~1\CULLIM~1\SINDAF~3\mod" \

"-names lowercase" \

-O3 \

"-real_size 64" \

"-reentrancy threaded" \

-traceback \

-mP1OPT_version=11.1-intel64 \

-mGLOB_diag_file=astap.diag \

-mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 \

-mGLOB_tune_for_fort \

-mGLOB_use_fort_dope_vector \

-mP2OPT_static_promotion \

-mP1OPT_print_version=FALSE \

-mP3OPT_use_mspp_call_convention \

"-mGLOB_options_string=-#x -fpe:0 -real_size:64 -integer_size:64 -names:lowercase -iface:cref -module:C:\PROGRA~1\CULLIM~1\SINDAF~3\mod -MD -iface:mixed_str_len_arg -include:C:

\PROGRA~1\CULLIM~1\SINDAF~3\lib -assume:byterecl -extend_source:132 -O3 -traceback -INCREMENTAL:NO" \

-mGLOB_cxx_limited_range=FALSE \

-mGLOB_traceback \

-mP3OPT_defaultlibs_omit=FALSE \

-mP3OPT_defaultlibs=P3OPT_DEFAULTLIBS_DYNAMIC_MULTITHREAD \

-mP3OPT_defaultlibs_select=P3OPT_DEFAULTLIBS_SELECT_F90_IVF \

-mP3OPT_defaultlibs_f90_port \

-mP1OPT_check_stack \

-mP3OPT_inline_alloca \

-mGLOB_routine_pointer_size_64 \

-mGLOB_split_functions=0 \

-mIPOPT_activate \

-mIPOPT_lite \

-mGLOB_machine_model=GLOB_MACHINE_MODEL_EFI2 \

-mGLOB_use_base_pointer \

-mGLOB_fp_speculation=GLOB_FP_SPECULATION_STRICT \

-mGLOB_extended_instructions=0x8 \

-mP2OPT_gen_read_only_strings=TRUE \

-mP2OPT_subs_out_of_bound=FALSE \

-mGLOB_ansi_alias \

-mIPOPT_args_in_regs=0 \

-mPGOPTI_value_profile_use=T \

-mGLOB_opt_level=3 \

-mP2OPT_hlo_level=3 \

-mP2OPT_hlo \

-mIPOPT_obj_output_file_name=astap.obj \

-mGLOB_os_target=GLOB_OS_TARGET_WINNT \

-mP3OPT_asm_target=P3OPT_ASM_TARGET_MASM5 \

-mP3OPT_obj_target=P3OPT_OBJ_TARGET_NTCOFF \

-mGLOB_obj_output_file=astap.obj \

-mGLOB_source_dialect=GLOB_SOURCE_DIALECT_FORTRAN \

-mP1OPT_source_file_name=astap.for \

astap.for

astap.for(62650): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [IFPORT]

use ifport

-----------^

compilation aborted for astap.for (code 1)

del C:\Users\dajum\AppData\Local\Temp\42962arg

0 Kudos
Steven_L_Intel1
Employee
2,143 Views
And ifport.mod is in C:\Program Files (x86)\Intel\Compiler\11.1\065\Include\Intel64 ? Can you try installing a later update?
0 Kudos
dajum
Novice
2,143 Views
Yes it is there. I can't install a newer version.We try to maintain backwards compatibility for our users by keepingour libraries built in one version. I could replace that file, but it would cause me too much pain to try and use a newer version here. I could move to another machine and test with Composer, but that wouldn't solve my problem on this machine. Did you see anything in the options?

Dave
0 Kudos
Steven_L_Intel1
Employee
2,143 Views
Nothing jumps out at me. What if you copy ifport.mod to your source folder?
0 Kudos
dajum
Novice
2,143 Views
It needs both IFPORT.MOD and IFPORT_TYPES.MOD to be moved to the source folder. Then it compiles fine. At least we know the .mod files are okay. Just the compiler is broken. :) Copying the files is not a real good solution for me as it would mean changing the program and does our compilation and execution to perform that action.
0 Kudos
Steven_L_Intel1
Employee
2,143 Views
Hmm - looking again at the -#x output I see something odd. What do you have set for "Additional INCLUDE directories" in the project? If something is there, what happens if you clear it?
0 Kudos
dajum
Novice
2,143 Views
I removed the .mod files from the local directory and took out the /include switch. It then gives the same error about not finding IFPORT.MOD
0 Kudos
Steven_L_Intel1
Employee
2,143 Views
What happens if you add a USE for some other module, such as KERNEL32?
0 Kudos
dajum
Novice
2,143 Views

I use a bunch of our own modules which are on the /MODULE path. Those get found fine.

Adding USE KERNEL32

astap.for(5): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [KERNEL32]

USE KERNEL32

-----------^

astap.for(62651): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [IFPORT]

use ifport

-----------^

compilation aborted for astap.for (code 1)

0 Kudos
Lorri_M_Intel
Employee
2,143 Views
Oh, I think I see your problem.

In your ifon.lnk file, do you have the switch -INCREMENTAL:NO

Please change that to look like /link /INCREMENTAL:NO

The "parsing rule", if you will, for include directories is that anything after a capital I is considered the rest of the directory. Unless the switch is a known-compiler switch. INCREMENTAL:NO is a linker switch.

The compiler believes that you have a directory called NCREMENTAL:NO and it's trying tosearch it for ifport.mod

When the error is returned (because that is clearly an invalid directory spec) the compiler says "File not found".

-- Lorri
0 Kudos
dajum
Novice
2,143 Views
That was it!

Thanks Lorri
0 Kudos
Reply