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

error LNK2001: unresolved external symbol _for_check_mult_overflow

yhmwhigg
Beginner
962 Views
Hi,
I compile a lib named a.lib by following command in CVF6.6C.
df *.f90 /c ! to get obj files
lib *.obj /out:a.lib !to get the a.lib file.
then I use a.lib in CVF6.5, some subroutines in a.lib works ok, but others not. There is an error message like:
error LNK2001: unresolved external symbol _for_check_mult_overflow
How can I resolve it? Can anyone give me some advices?
Thanks in advance!

Message Edited by yhmwhigg on 03-09-2006 04:50 PM

0 Kudos
6 Replies
Steven_L_Intel1
Employee
962 Views
Read the CVF 6.6 release notes.
0 Kudos
yhmwhigg
Beginner
962 Views
Hi, Steve,
I had read the CVF 6.6 release notes, but I find nothing about this problem. I check the subroutines in a.lib, and find that when I use allocatable dimension in the a subroutine, it can not work under CVF6.5. Otherwise, it works ok.
Hope you give some details about this problem. Thanks again.
0 Kudos
Steven_L_Intel1
Employee
962 Views
I thought there was more about this in the release notes. As of CVF 6.5A, a new routine was used to calculate the size for ALLOCATE. You must be using the original 6.5 release.

Your choices are:

1. Upgrade the 6.5 CVF to at least 6.5A
2. Build the library with 6.5
3. Add the undocumented switch /switch:fe_no_check_mult_overflow when building the library on 6.6.
0 Kudos
yhmwhigg
Beginner
962 Views
Thank you Steve.
The method 3 is great. It can solved all the problems.
An other question about the switch:
Doesusing this switch make some different in results?
Or, it will be more efficientwhen not to use it?
0 Kudos
Steven_L_Intel1
Employee
962 Views
When you do an ALLOCATE, the compiler has to compute how many bytes of storage to allocate. In the process of doing so, if the array size is too large, the expression will overflow. Previous versions of CVF didn't check for overflow and could give wrong results. The new routine is used to do the computation with an overflow check.

As long as your allocations are good (not exceeding 2GB), it won't matter if you use the switch or not.
0 Kudos
yhmwhigg
Beginner
962 Views

Thanks a lot Steve.

0 Kudos
Reply