Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
54 Views

Compilation error: ipo error 11018, omitting main file

Jump to solution

Hi,

I'm trying to compile my code from the command line using a Makefile on Windows 10 (64 bit). I'm getting ipo error 11018. When executing nmake, the compiler seems to be omitting the line corresponding to the generation of the .obj for the main file. I guess that is causing the ipo error. I still don't understand why this is happening. I'm attaching the Makefile and the file with the dependency tree.

Note: I had to change add the extension .txt to the attached files so the forum lets me upload them.

This is what I get after executing nmake

nmake /A

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads lib_kind.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads lib_basic.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads get_params.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads par_pass.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads lib_rwtxt.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads lib_interp.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads tools_fnutil.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads lib_solver.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads bargaining.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads tools_extra.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads tools_distributions.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads tools_value_fns.f90
        ifort /c /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads lib_rwhdf5.f90
        ifort -o Mod_LW /nologo /O3 /heap-arrays1024 /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\shared /I"C:\Program Files\HDF_Group\HDF5\1.10.1"\include\static /Qopenmp /check:none /libs:dll /threads  Lib_Kind.obj Tools_Fnutil.obj Lib_Basic.obj Lib_Rwhdf5.obj Get_Params.obj Lib_Rwtxt.obj Lib_Interp.obj Par_Pass.obj Lib_Solver.obj Tools_Distributions.obj Bargaining.obj Tools_Value_Fns.obj Tools_Extra.obj Ratio_Steady_2.obj /link /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files\HDF_Group\HDF5\1.10.1"\lib  hdf5_fortran.lib /STACK:1024000000,256000000
ipo: error #11018: Cannot open Ratio_Steady_2.obj
LINK : fatal error LNK1181: cannot open input file 'Ratio_Steady_2.obj'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.4.246\windows\bin\intel64\ifort.EXE"' : return code '0x49d'
Stop.

Thanks!

 

0 Kudos

Accepted Solutions
Highlighted
Black Belt Retired Employee
54 Views

I do not in any way pretend to be a make/nmake expert, but where you have the following:

# Suffix-rules:  Begin by throwing away all old suffix- 
# rules, and then create new ones for compiling  
# *.f90-files. 
.SUFFIXES: 
.SUFFIXES: .f90 .mod

.f90.mod:
	$(FC) /c $(FFLAGS) $<

I am not seeing a rule to go from .f90 to .obj. Since the dependencies list doesn't indicate that Ratio_Steady_2.f90 creates a .mod, nmake has no clue what to do with it.

View solution in original post

0 Kudos
8 Replies
Highlighted
54 Views

Your build missed/errored or failed to include Ratio_Steady_2.f90

Jim Dempsey

0 Kudos
Highlighted
Beginner
54 Views
Thanks, Jim. But I think I'm compiling Ratio_Steady_2.f90 in the last line of lw.dep, or am I missing something? I don't know why nmake is ignoring that line. I already tested the code in VS and I could build it with no issues, so I don't think that's the problem.
0 Kudos
Highlighted
54 Views

Not sure why myself (in looking at your lw include file).

I suggest you experiment by moving " Ratio_Steady_2.obj" from the right end of the FOBJ to the left end of FOBJ...
... and moving the last line that builds it to an earlier line.

Then monitor your build output for unexpected output.

Jim Dempsey

0 Kudos
Highlighted
Beginner
54 Views

I did what you suggested, but it had no effect. nmake seems that doesn't care about the order I specify when generating each obj file. It compiles each obj in an order that doesn't conflict with the module calling, though.

As long as this happens, and nmake is not successful in generating Ratio_Steady_2.obj, the order in FOBJ seems to be irrelevant.

Christian

0 Kudos
Highlighted
54 Views

The "clean" option in your makefile deletes .o files, not .obj.

Can you try fixing that, issuing a clean, and then rebuilding with the edits that Jim had suggested?

             --Lorri

0 Kudos
Highlighted
Beginner
54 Views

Thanks, Lorri. I just fixed that, and applied the edits Jim suggested, but nmake is still ignoring the line that builds Ratio_Steady_2.obj, no matter where I put it, and no matter the order in FOBJ.

Christian

0 Kudos
Highlighted
Black Belt Retired Employee
55 Views

I do not in any way pretend to be a make/nmake expert, but where you have the following:

# Suffix-rules:  Begin by throwing away all old suffix- 
# rules, and then create new ones for compiling  
# *.f90-files. 
.SUFFIXES: 
.SUFFIXES: .f90 .mod

.f90.mod:
	$(FC) /c $(FFLAGS) $<

I am not seeing a rule to go from .f90 to .obj. Since the dependencies list doesn't indicate that Ratio_Steady_2.f90 creates a .mod, nmake has no clue what to do with it.

View solution in original post

0 Kudos
Highlighted
Beginner
54 Views

Thanks, Steve! That made the trick. I had forgotten the rule from .f90 to .obj.

Christian

0 Kudos