Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

system crash when running dss on MKL_dss_indefinite

$
0
0

Hey there,

my dss implementation freezes the whole system, probably due running out of memory, when switching from positive_definite to indefinite.

The matrix provided to dss is 4x4, so not a big problem, but it is negative definite.

The module implementing the solver is:

include "mkl_dss.f90"
Module ModMKLSolver
  use Data_Kind
  use ModEquation
  use ModLogfile
  Implicit none
  Type MKLSolver
    Type(Equation) :: TSEq
  contains
    Procedure, Pass, Public :: Solve => SubSetPEVDSS
  End type MKLSolver
  Private :: SubSetPEVDSS
contains
  Subroutine SubSetPEVDSS(this,ISSubStat)
    use MKL_DSS
    Implicit None
    Class(MKLSolver), Target, Intent(InOut) :: this
    Integer(Iks), Intent(InOut) :: ISSubStat
    Integer(Ikxl) :: c1, c2
    TYPE(MKL_DSS_HANDLE) :: handle
    Integer(Ikxl) :: ISError
    Integer(Ikl) :: opt, a, ISSize
    Integer(Ikl), Allocatable, Dimension(:) :: IVPermu
    ISSize=this%TSEq%TSLHS%ISDim
    Allocate(&&IVPermu(ISSize),&&stat=ISSubStat)
    If(ISSubStat==0) Then
      IVPermu=0
      this%TSEq%RVsol=0._rkdbl
      ISSubStat=dss_create(handle, MKL_DSS_MSG_LVL_WARNING&&+MKL_DSS_TERM_LVL_ERROR)
      If(ISSubStat==0) Then
        ISSubStat=dss_define_structure(handle=handle,&&opt=MKL_DSS_SYMMETRIC,&&rowIndex=this%TSEq%TSLhs%IVRowPos,&&nRows=ISSize,&&RCols=ISSize,&&columns=this%TSEq%TSLhs%IVColPos,&&nNonZeros=size(this%TSEq%TSLhs%RVCoeff))
      End If
      If(ISSubStat==0) Then
        ISSubStat=dss_reorder(handle=handle, opt=MKL_DSS_GET_ORDER, perm&&=IVPermu)
      end If
      If(ISSubStat==0) Then
        ISSubStat=dss_factor(handle=handle,&
          !&opt=MKL_DSS_POSITIVE_DEFINITE,&&opt=MKL_DSS_INDEFINITE,&&RValues=this%TSEq%TSLhs%RVCoeff)
      End If
      If(ISSubStat==0) Then
        ISSubStat=dss_solve(handle=handle,&&opt=0,&&RRhsValues=this%TSEq%RVRHS,&&nRhs=1,&&RSolValues=this%TSEq%RVSol)
      End If
    End If
  end Subroutine SubSetPEVDSS
end Module ModMKLSolver

The implementation works with setting "positive_definite" and matrices which abide by that rule.

Compiler: ifort 15, System: ubuntu 14.04

Any suggestions??

Thanks

Karl


Viewing all articles
Browse latest Browse all 3270


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>