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

mkl95_LAPACK produces segmentation fault (dgesv)

zuch
Beginner
1,596 Views

When I call  "dgesv" routine from mkl library with fortran 95 interface I get segmentation fault.

call dgesv( adns, rhs , ipiv , info ) ! forrtl: severe (174): SIGSEGV, segmentation fault occurred

call dgesv( n, nrhs, adns, max(1,n), ipiv, rhs, max(1,n), info )  ! F77  works fine

ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.139 Build 20140121
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

compiler flags: ifort main.f90 -mkl -lmkl_lapack95_lp64

 

 

 

0 Kudos
2 Replies
mecej4
Honored Contributor III
1,596 Views

If you wish to call the F95 generic name, which is the one with optional arguments, use the generic name, gesv, and not the specific name, dgesv, and make sure that you have provided the necessary interface (by including USE MKL95_LAPACK in every routine that calls a Lapack95/Blas95 routine by its generic name). The fact that you ran into a seg-fault indicates that your code does not contain such an interface, causing the subroutine to be called with mismatched number/types of arguments.

If you wish to call the F77 specific name, dgesv, provide all the arguments specified in the argument list for the subroutine.

0 Kudos
zuch
Beginner
1,596 Views

Thanks! I've missed that. now it works

0 Kudos
Reply