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.

Interprocedural optimization

ZlamalJakub
New Contributor III
1,045 Views

I started to optimize my code speed. I want to inline some very simple PURE subroutine "LengthOfVector" to the caller routine.

-----------------------------------------------------------------------------------------------------------

I set "Interprocedural optimization" to "Multi-file /Qipo" in two relevant source files because subrotine I want to inline is in different source file. In the linker I set "Interprocedural optimization" to "Yes". When I tried to rebuild my solution (consisting of about 600 source files) linker shows following error:

1>ipo: warning #11021: unresolved _GAINPUT

1>        Referenced in D:\EOD\obj\Win32\Release/InitGa.obj
1>ipo: warning #11021: unresolved _INITIAL
1>        Referenced in D:\EOD\obj\Win32\Release/InitGa.obj
1>ipo: warning #11021: unresolved _GAFORTRAN
1>        Referenced in D:\EOD\obj\Win32\Release/InitGa.obj
1>ipo: error #11023: Not all components required for linking are present on command line

warning #1102 occurs in source file which have not set IPO (When the IPO is disabled in linker, program is compiled without any warning.)

------------------------------------------------------------------------

When the "single-file" IPO is set for compiler in two relevant source files, program is compiled without any warning (but without inlining).

When I move code of subroutine to the source file where it should be inlined, it is inlined when using "single-file" IPO (even if IPO is disabled in linker)

----------------------------------------------------------------------

When I tried to compile all source files with "multi-file" IPO, I obtained following errors:

1>ipo: error #11023: Not all components required for linking are present on command line
1>** The compiler has encountered an unexpected problem.
1>** Segmentation violation signal raised. **
1>Access violation or stack overflow. Please contact Intel Support for assistance.
1>Severe: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
1>Link: error #10014: problem during multi-file optimization compilation (code 3)
1>Link: error #10014: problem during multi-file optimization compilation (code 3)


--------------------------------------------------------------------

 

I am using Intel(R) Visual Fortran Compiler XE 15.0.0.108 [IA-32]

My questions are:

1. Is it possible to perform multi-file IPO on only selected source files in solution or whole solution must be compiled with multi-file IPO?

2. What is the meaning of: error #11023: Not all components required for linking are present on command line?

0 Kudos
1 Solution
jimdempseyatthecove
Honored Contributor III
1,045 Views

Here is a suggestion that may work (other than switch to x64 build).

Create (as an experiment) 10 new Static Library Projects for your application solution.

Of your 600 source files copy some to one of each static library project, selecting what is in each static library such that it maximizes the inlineability of functions within the library. The main solution will likely end up with just the file with the PROGRAM source.

Each of the static library projects is marked with multi-file IPO, *** the project with the PROGRAM source is marked with single file IPO.

The librarian will use multi-file IPO, the linker will use no (single) file IPO

Jim Dempsey

View solution in original post

0 Kudos
3 Replies
TimP
Honored Contributor III
1,045 Views

Yes, you may link together .obj files made with Qipo and Qipo-.  I'm not surprised at difficulty with iPo.on such a large project, particularly in 32 bit mode.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,046 Views

Here is a suggestion that may work (other than switch to x64 build).

Create (as an experiment) 10 new Static Library Projects for your application solution.

Of your 600 source files copy some to one of each static library project, selecting what is in each static library such that it maximizes the inlineability of functions within the library. The main solution will likely end up with just the file with the PROGRAM source.

Each of the static library projects is marked with multi-file IPO, *** the project with the PROGRAM source is marked with single file IPO.

The librarian will use multi-file IPO, the linker will use no (single) file IPO

Jim Dempsey

0 Kudos
ZlamalJakub
New Contributor III
1,045 Views

Thanks for suggestion Jim. It looks promising an I will try it.

0 Kudos
Reply