Failure of Lapack when OpenMP directive Enabled

Failure of Lapack when OpenMP directive Enabled

Portrait de criswu


    I build a project (vs2010 + IVF)  calling Lapack subroutines, but when I enable process OpenMP directives( Generate parallel code), and i encounted the 

Debug Assertion Failed!


Line: 417

Expression:(" Invalid signal or error",0)

program main
implicit none

     integer,parameter:: NMAX = 4000
     integer,parameter:: LWORK = 100*NMAX
     integer IPIV(NMAX)  
     complex WORK(LWORK)

     INTEGER maxedge ,error,ii

    Complex ,allocatable:: cmtx(:,:),crhs(:)

    maxedge = 1396

    if(error .ne. 0)then
         print *,'Allocate cmtx and crhs failure'
    cmtx = (0.0,0.0)
    do ii = 1,maxedge 
            cmtx(ii,ii) = (1.0,0.0)

    print *,'Start LU decompostion '

    LDA = maxedge
    call CGETRF(maxedge,maxedge,cmtx,LDA,IPIV,INFO)
    if( INFO .eq. 0)then
             call CGETRI(maxedge,cmtx,LDA,IPIV,WORK,LWORK,INFO)
             if(INFO .eq. 0) print *,'LU Success'
        print *,'Lapack Factor failure'

end program

Fichier attachéTaille
Téléchargement source1.f902.68 Ko
4 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Tim Prince

You leave us guessing here.  It may be useful to have a build log,  If you installed the MKL option and specified an option such as /Qmkl your lapack functions should be linked from MKL, and there should be no conflicts due to linking multiple OpenMP libraries.  Did you rebuild, all with debug build, after changing the option?

Portrait de criswu

I attached my whole program, and i linked my functions wth \Qmkl and enabled the \Qopenmp, it encounts the same error. 

Fichiers joints: 

Fichier attachéTaille
Téléchargement mkl-lapack-test.zip1 Mo
Portrait de criswu

By modifing

complex WORK(LWORK)


complex,allocatable : WORK(:)

and the allocate the array WORK(LWORK) can fix this problem. 

Connectez-vous pour laisser un commentaire.