Dear Mr. / Mrs. ,
I'm having difficulty compiling code that uses the DGETRF and DGETRI Fortran functions.
Below I placed a very small test example "test.f03", that illustrates my problem:
program main use lapack95, only: DGETRF_F95 implicit none integer :: i,j,info integer, dimension(20) :: ipiv real(8), dimension(20,20) :: test1,inverse1 do i=1,20 test1(i,:) = (/ (j,j=i,19+i) /) end do inverse1 = test1 call DGETRF_F95(inverse1,ipiv,info) if (info /= 0) then stop 'Matrix is numerically singular' end if end program main
When I attempt to compile this code I get the following errors:
bash-4.3$ gfortran test.f03 -I./include -L/opt/sw/intel/mkl/lib/intel64 -lmkl_lapack95_lp64 -lmkl_rt
/opt/sw/intel/mkl/lib/intel64/libmkl_lapack95_lp64.a(dgetrf.o): In function `dgetrf_f95_':
../../../../interfaces/lapack95/source/dgetrf.f90:(.text+0xa76): undefined reference to `for_dealloc_allocatable'
../../../../interfaces/lapack95/source/dgetrf.f90:(.text+0xb46): undefined reference to `for_check_mult_overflow64'
../../../../interfaces/lapack95/source/dgetrf.f90:(.text+0xb63): undefined reference to `for_allocate'
../../../../interfaces/lapack95/source/dgetrf.f90:(.text+0xbc8): undefined reference to `for_check_mult_overflow64'
collect2: error: ld returned 1 exit status
Which is completely unknown to me. Could somebody tell me what I'm missing here?
Thank you for your time!