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

can't get VERF function to work

Ahmad_Falahatpisheh
1,763 Views
Hi All,

I am trying to use verf in my fortran 90 code. I have followed both the procedures for both IMSL and MKL. I set the library and include directories in Visual Studio and I still can't build my code in VS. The famous error shows up:
error LNK2019: unresolved external symbol _VERF referenced in function _MAIN__

The code is in the following form:
program test
include "mkl_vml.f90"
...
...
call verf(1,a,y)
end program


Then I tried the following to build it:
ifort myfortran.f90 %LINK_FNL_HPC%
but I got the following error:
ifort: command line warning #10161: unrecognized source type '%LINK_FNL_HPC%'; object file assumed

Could someone shed light on this problem?
0 Kudos
10 Replies
mecej4
Honored Contributor III
1,763 Views
The routine name is probably vserf or vderf; these are among the vectorized error functions in MKL.

Unless your code calls IMSL routines, you do not need IMSL. The compiler did not find LINK_FNL_HPC defined in the environment where you ran it. That is one of the variables that is set up by the IMSL batch file, fnlsetup.bat.
0 Kudos
Ahmad_Falahatpisheh
1,763 Views
I am not writing a code which is optimized for parallel processing. I wanted to calculate error function in a regular way. Is there other library or I have to write my own code to calculate that function?

Thanks a lot.
0 Kudos
mecej4
Honored Contributor III
1,763 Views
In that case, just call the intrinsic function ERF(). For just that, you need neither MKL nor IMSL.
0 Kudos
Steven_L_Intel1
Employee
1,763 Views
I cannot find a routine named VERF in either MKL or IMSL. Have you purchased and installed IMSL?
0 Kudos
Ahmad_Falahatpisheh
1,763 Views
Yes I purchased and installed Intel Visual Fortran v11.1 + MKL for Win, Aca, ESD. The MKL directory contains:

  • benchmarks
  • bin
  • examples
  • include
  • interfaces
  • lib
  • tests
  • tools
I have a fortran 90 handbook but it does not mention anything about ERFC function. I just found online that ERFC is an intrinsic Fortran function. Do you know any comprehensive Fortran 90 handbook?

Thanks.

0 Kudos
Steven_L_Intel1
Employee
1,763 Views
ERFC is a Fortran 2008 function and is supported by version 11.1. You can find its description in the Intel compiler Language Reference.
0 Kudos
Ahmad_Falahatpisheh
1,763 Views
Thanks Steve. Does Intel has the PDF version of it?
0 Kudos
Steven_L_Intel1
Employee
1,763 Views
Sorry, no PDF version. You can read it online here.
0 Kudos
mecej4
Honored Contributor III
1,763 Views
ERFC(x) = 1 - ERF(x)

Do not use one for the other!
0 Kudos
Arjen_Markus
Honored Contributor II
1,763 Views
That is as far as the mathematical definition is concerned. The raison d'etre for erfc() in F2008
is (at leastthat is how I understand it)that for large arguments computing the one from the other
is very problematic - the error function rapidly approaches 1 and then the above computation is numerically
inaccurate.

Regards,

Arjen
0 Kudos
Reply