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

Unresolved symbol : powr8i4

dexter26
Beginner
2,130 Views
Hi,



I am using ifort 9.0 Build 20060222Z Package ID: l_fc_c_9.0.033 to compile certain libraries.

I get an unresolved symbol __powr8i4

There isnt a single page which talks about this symbol. It props up whenever I have

Real(8) :: a

REAL(8) :: b

b = 10.d0**a

Or something similar to this. Has anyone seen something like this before.

If I compile the same code with ifort 9.0 Package ID: l_fc_c_9.0.032

There are no problems

Please comment
0 Kudos
13 Replies
Steven_L_Intel1
Employee
2,130 Views
Make sure that you are not referencing an older set of libraries in your libpath.
0 Kudos
xavier_martinez_garc
2,130 Views
Hi,

I'm having the same problem. I'm working with Fortran Package ID: W_FC_P_9.1.024.

What happens to me is that when I compile and link my code with Visual Studio .NET everything works fine. But, when I compile and link using a .bat file (which is required as I'm joining my code to an existing one and this is the only way I can do it), then I have the link error.

I must say that I am pretty shure I am using the same libraries with Visual Studio .NET and when I do link with the .bat file.

Thanks in advance,

Xavi
0 Kudos
Steven_L_Intel1
Employee
2,130 Views
Are you perhaps linking against an older version of the ifort libraries? Is there a reason you're using 9.0 and not 9.1?
0 Kudos
xavier_martinez_garc
2,130 Views
No. I am using 9.1 and I think the only libaries I've got installed in my computer are the 9.1 ones.

0 Kudos
Steven_L_Intel1
Employee
2,130 Views
Xavi, you're using Windows. What is the definition of the LIB environment variable in the context where you're building with the .bat? Do you run ifortvars.bat first or use the "Build environment" shortcut to start your command prompt session?
0 Kudos
xavier_martinez_garc
2,130 Views
My .bat file includes the following paths and libraries:

SET IFORT_COMPILER91=C:Program FilesIntelCompilerFortran9.1
SET INTEL_SHARED=C:Program FilesCommon FilesIntelShared Files
SET INTEL_LICENSE_FILE=C:Program FilesCommon FilesIntelLicenses
SET PATH=%IFORT_COMPILER91%Ia32Bin;%INTEL_SHARED%Ia32Bin;%PATH%
SET LIB=%IFORT_COMPILER91%Ia32Lib;%IFORT_COMPILER91%Ia32Lib;%LIB%
SET INCLUDE=%IFORT_COMPILER91%Ia32Include;%INCLUDE%

As you see, the librarie I'm using is the corresponding to the fortran compiler plus the libraries defined by windows, which are the ones found in:

C:Program FilesMicrosoft Visual Studio .NET 2003SDKv1.1Lib

The error appears when I do the exponential number of a variable:

var = (whatever number)**var2

I do need it to remove some spourious numbers generated by my code (I don't want numbers with an order of magnitude lower than 12 the maximum value of my array). The code I've written to do so is:

Integer :: n, i
Real(8) :: vec(n), absvec(n), lim, subst, val1
Real(8) :: MAX, om

! Create absvec, absolute value of vec
absvec(:) = abs(vec(:))

! Localize the order of magnitude of the maximum value of auxvec
MAX = maxval(absvec)
if (MAX .eq. 0) then
lim = 1.0e-12
else
lim = MAX * 1.0e-12
endif

expon = int(log10(lim))-1
om = 10.0d0**(int(log10(lim)))

do i = 1, n
val1 = vec(i) / om
subst = (val1 - ANINT(val1)) * om
vec(i) = vec(i) - subst
enddo

If you have any clue to do the same without requiring the 10.0d0**(int(log10(lim))) line, I will be more than pleased to avoid this problem with another method.

Thanks for all your help,

Xavi
0 Kudos
Lorri_M_Intel
Employee
2,130 Views

Hi -

I just tried to reproduce the problem you saw, using 9.1.034 and your .BAT file.

What is the command line that you are using to build your applicaton? Is there a chance that you are using the "/libdir:none" command, and trying to explicitly list the Fortran libraries yourself?

If so, make sure you add "libm.lib" to your list of libraries.

If this is not the case, then I'm going to need just a few more clues in order to help out ...

- Lorri

0 Kudos
Steven_L_Intel1
Employee
2,130 Views

Xavi,

This routine is defined in libm.lib. Check to make sure that the version of libm.lib you have is dated January 2007. You may have also done something to prevent libm from being searched. If you can't resolve this, please file an issue with Intel Premier Support and attach a ZIP of your project files including objects.

0 Kudos
xavier_martinez_garc
2,130 Views
Hi,

The libm.lib I have is dated 07-04-2006

Do you know where can I get the updated one?

Thanks,
0 Kudos
Steven_L_Intel1
Employee
2,130 Views
It gets installed when you install the compiler. Please log in to the Intel Registration Center, select Product Downloads and download version 9.1.034 of the Windows Fortran compiler. Install it. Let me know how this works for you.
0 Kudos
xavier_martinez_garc
2,130 Views
At last I've found the problem.

After installing the new library, I've tried to compile again the code and the same link error has appeared. Then I looked better at my .bat file and I've found that the libraries of the program I'm writing the subroutine for (ANSYS) are more preferent than the fortran ones. After changing the preference order, the code links properly.

However, now I cannot run the program because ANSYS does not know how to found the command __powr8i4 defined in its library libmmd.lib. Of course not, this command is defined in libm.lib!!

So, If I try to do 10**a using the ansys libraries, my subroutine crashes. And if I make my subroutine work using the libm.lib, then ANSYS crashes...

I think I give it up. Lots of thanks for your help


0 Kudos
Steven_L_Intel1
Employee
2,130 Views

It's also defined in libmmd, which is also provided by the compiler. My best guess is that you do not fully understand the environment you're linking in. But if ANSYS wants to use libmmd, then you should use /libs:dll when you are compiling the Fortran code to match that.

Try adding /link /verbose at the end of the ifort command that links the application. It will list all of the libraries searched.

0 Kudos
gpython
Beginner
2,130 Views
I use IVF 9.1.024, VS 2005 Pro and ansys 10.0 sp1 compile success. The method is very simple.

Copy libmmd.lib(IVF9**lib) to ansys**customlibintel and libmmd.dll(IVF9**lib) to ansys**customuserintel to cover orgin files,then run anscust.bat to compile files. No errors!

At last, run ansys with ansys product launcher. It will work well!

You can try it.

gpython
2007.05.01
0 Kudos
Reply