/fast option

/fast option

I am trying to optimize my code and using /fast option.
I get the following error :
libifcoremt.lib(libifcoremain.obj) : error LNK2019: unresolved external symbol _MAIN__ referenced in function _main

What does this error mean ?

11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting - MiB1980

libifcoremt.lib(libifcoremain.obj) : error LNK2019: unresolved external symbol _MAIN__ referenced in function _main

This appears to mean that you don't have a successfully compiled Fortran main program in your object file list.

The program compiles when I dont use the /fast option. Is there any particular reason for the IVF to give this error when using the /fast option?

I can't imagine what /fast would do that would prevent you from linking. Does this happen to all programs or just one (or some)?

/fast is just shorthand for a set of options that can improve performance, at the expense of compile time. It also sets /arch:host (in 11.x) which means the program typically needs to run on the same system that compiled it.

Steve - Intel Developer Support

I am linking three other static library projects as dependencies with my main ( different name) program

The three libraries compile with /fast option but not the main program.

A similar scheme (libraries + main + /fast) succeeds on the same machine for some other solutions.

Quoting - Steve Lionel (Intel)
I can't imagine what /fast would do that would prevent you from linking. Does this happen to all programs or just one (or some)?

/fast is just shorthand for a set of options that can improve performance, at the expense of compile time. It also sets /arch:host (in 11.x) which means the program typically needs to run on the same system that compiled it.

Please do this. In your main project, go to the Linker > General property page and select Show Progress Messages to "Show all progress messages (/verbose)". Do a rebuild of the main project. Go into the Release subfolder and find buildlog.htm. Zip it and attach the ZIP to a reply here (see below for atachment instructions.)

Steve - Intel Developer Support

Attaching the zip here...

Quoting - Steve Lionel (Intel)
Please do this. In your main project, go to the Linker > General property page and select Show Progress Messages to "Show all progress messages (/verbose)". Do a rebuild of the main project. Go into the Release subfolder and find buildlog.htm. Zip it and attach the ZIP to a reply here (see below for atachment instructions.)

Attachments: 

AttachmentSize
Downloadapplication/zip BuildLog.zip14.42 KB

Thanks. I see you are using 9.1. You've also added /QxN /QaxN, which seems rather pointless to me - especially as /fast overrides those (though I've forgotten what 9.1 uses instead.)

There are also two unresolved references to MATVEC and MSOLVE - where are those defined? Can you attach main.obj?

What happens if you replace /fast with /Qipo? Remove the /QaxN - it isn't doing anything useful for you.

Steve - Intel Developer Support

Thanks a lot for your help...

(I have removed the /QxN and /QaxN options)

/fast and /Qipo gives the same results.

MATVEC and MSOLVE are subroutines defined in the same main project. When I dont use the /fast option I dont see the unresolved warning in the build log. I am attaching the main.obj here.

Quoting - Steve Lionel (Intel)
Thanks. I see you are using 9.1. You've also added /QxN /QaxN, which seems rather pointless to me - especially as /fast overrides those (though I've forgotten what 9.1 uses instead.)

There are also two unresolved references to MATVEC and MSOLVE - where are those defined? Can you attach main.obj?

What happens if you replace /fast with /Qipo? Remove the /QaxN - it isn't doing anything useful for you.

Attachments: 

AttachmentSize
Downloadapplication/zip main.zip215.87 KB
Best Reply

Sigh - should have realized that would do no good - the .obj files just contain intermediate language for IPO.

At this point I will ask you to try this with a current, supported release,preferably 11.1. If you can't do that, then I suggest disabling /Qipo for this project. It may be that it is doing something inappropriate for your main program.

Steve - Intel Developer Support

It works in 11.1...

Thanks for the help..

Quoting - Steve Lionel (Intel)
Sigh - should have realized that would do no good - the .obj files just contain intermediate language for IPO.

At this point I will ask you to try this with a current, supported release,preferably 11.1. If you can't do that, then I suggest disabling /Qipo for this project. It may be that it is doing something inappropriate for your main program.

Leave a Comment

Please sign in to add a comment. Not a member? Join today