Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Ankündigungen
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.
29283 Diskussionen

unsolved external symbol _DRNUN

gte274s
Einsteiger
1.299Aufrufe
Hi, I have a problem with the random number generator _DRNUN that I used as

call drnun (NR, R)

where NR - Number of random numbers to generate. (Input)
R - Vector of length NR containing the random uniform (0,1)deviates. (Output).

It is fine to compile the code in Compaq visual Fortran. However, it gives me error message as "error LNK2019: unresolved external symbol _DRNUN referenced in function XXX". Could anyone please tell me what is wrong and how should I correct it?

Thanks for your time and I appreciate your help.
0 Kudos
8 Antworten
Steven_L_Intel1
Mitarbeiter
1.299Aufrufe
DRNUN is an IMSL routine, and therefore you have to tell either the compiler or the linker that you are using IMSL.

Method 1:

Add the line:

USE NUMERICAL_LIBRARIES

right after the PROGRAM, SUBROUTINE or FUNCTION line of the code that calls DRNUN

Method 2:

Select Project..Add to Project..Files. Files of type: Library Files (.LIB). Browse to the Program FilesMicrosoft Visual StudioDF98IMSLLIB folder. Select all the .LIB files and click OK.

Steve
gte274s
Einsteiger
1.299Aufrufe
Thanks, Steve.
crkkos
Einsteiger
1.299Aufrufe
DRNUN is an IMSL routine, and therefore you have to tell either the compiler or the linker that you are using IMSL.

Method 1:

Add the line:

USE NUMERICAL_LIBRARIES

right after the PROGRAM, SUBROUTINE or FUNCTION line of the code that calls DRNUN

Method 2:

Select Project..Add to Project..Files. Files of type: Library Files (.LIB). Browse to the Program FilesMicrosoft Visual StudioDF98IMSLLIB folder. Select all the .LIB files and click OK.

Steve

crkkos
Einsteiger
1.299Aufrufe
Quoting - crkkos
I tried the USE NUMERICAL LIBRARIES and couldnt get the function to work. I am using susedev1 and ifort 11

crkkos
Einsteiger
1.299Aufrufe
Suse 10 that is

Steven_L_Intel1
Mitarbeiter
1.299Aufrufe
Intel does not offer a package with IMSL on Linux. You can buy IMSL for Linux from Visual Numerics.

The Intel Math Kernel Library, included with Intel Fortran Professional Edition, has many random number generators. Otherwise, consider using the Fortran intrinsic RANDOM_NUMBER.
Peter
Einsteiger
1.299Aufrufe
Quoting - crkkos


Did you try to use the method 2 ??
Steven_L_Intel1
Mitarbeiter
1.299Aufrufe
Quoting - Peter

Did you try to use the method 2 ??
Peter, he's using Linux where the original posts do not apply.
Antworten