Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

MKL interval_arithmetic module

g_f_thomas
Beginner
455 Views

I'm using interval_arithmetic as in

program main

use interval_arithmetic

implicit none

type

(D_INTERVAL) :: A, sumA

!Initialization stuff here

sumA = dinterval(zero, zero)

doj = 1, lda

do i = 1, lda

sumA = sumA + ABS(A(i,j))

enddo

enddo

Why is ABS, which is interfaced in the interval_arithmetic module, not recognized as such? The linker issues:

error LNK2019: unresolved external symbol _DI_ABS referenced in function _MAIN__

Thanks,

Gerry

0 Kudos
2 Replies
Todd_R_Intel
Employee
455 Views
Indeed, I only see entry points for _D_ABS. I'll look into this.
-Todd
0 Kudos
Vladimir_Koldakov__I
New Contributor III
455 Views

Gerry,

There is workaround. Replace, please, name DI_ABS with D_ABS in the file include/mkl_interval.f90.
The same for SI_ABS. Here is diffs:

INTERFACE ABS

- FUNCTION SI_ABS(X)
+ FUNCTION S_ABS(X)
TYPE S_INTERVAL
REAL(4) :: INF, SUP
END TYPE S_INTERVAL
TYPE(S_INTERVAL), INTENT(IN) :: X
- TYPE(S_INTERVAL) :: SI_ABS
- END FUNCTION SI_ABS
+ TYPE(S_INTERVAL) :: S_ABS
+ END FUNCTION S_ABS

- FUNCTION DI_ABS(X)
+ FUNCTION D_ABS(X)
TYPE D_INTERVAL
REAL(8) :: INF, SUP
END TYPE D_INTERVAL
TYPE(D_INTERVAL), INTENT(IN) :: X
- TYPE(D_INTERVAL) :: DI_ABS
- END FUNCTION DI_ABS
+ TYPE(D_INTERVAL) :: D_ABS
+ END FUNCTION D_ABS

END INTERFACE

Thanks,
Vladimir

0 Kudos
Reply