Skip to content

List of BLAS/LAPACK calls without explicit interfaces #1375

@foxtran

Description

@foxtran

At #1371, I've suggested to use linker trick to wrap BLAS/LAPACK calls into NEWLAPACK library for framework Accelerate.

There is a list of lines (single per routine) where changes in BLAS/LAPACK interfaces with bind(C will not work in xtb project. It is only a part of problem, since other dependencies also needs to be adjusted in this way.

external dgemm ! I hope you know what you are doing...

call dsysv('u', m, 1, Atmp, m, ipiv, Xtmp, m, test, -1, info)

call dsysv('u', m, 1, Atmp, m, ipiv, Xtmp, m, test, -1, info)

call dsysv('u', m, 1, Atmp, m, ipiv, Xtmp, m, test, -1, info)

call dgemm('n','n',3*mol%n,mol%n,m,-1.0_wp,dAmatdr,3*mol%n,Ainv,m, &

call dsysv('l', ndim, 1, mat, ndim, ipiv, ptr, ndim, test, -1, info)

call dpotrf('U',ndim,U,ndim,ierr) !LAPACK routine A = U**T*U

call dgemv('n',9,mol%n,1.0_wp,dcndL,9,dhdcn,1,1.0_wp,sigma,1)

external :: dsymm, dgemm ! can't use wrappers due to change of leading dim

external :: dsymm, dgemm ! can't use wrappers due to change of leading dim

CALL dgemm('N','N',nao,n,n,1.D0,cca,nao,d,n,0.D0,tmp_cmo,nao) ! non-std BLAS

call dgemv('n', 3*nat, nat, 1.0_wp, dcndr, 3*nat, dEdcn, 1, 1.0_wp, gradient, 1)

call ssyev ('V','U',nat3_cur,mini_hess,nat3_cur,eig,aux,lwork,info)

call dsyev ('V','U',n3,res%hess,n3,res%freq,aux,lwork,info)

real(wp) :: ddot, thrs, scal, damp, dampO,dampD,thr

real(wp) :: ddot, thrs, scal, damp, dampO,dampD

call dspmv('u',nat3,1.0d0,hess,dx,1,0.0d0,tvec,1)

call dsysv('u', m, 1, Atmp, m, ipiv, Xtmp, m, test, -1, info)

call dsytrf('L',m,Ainv,m,ipiv,test,-1,info)

call dsytri('L',m,Ainv,m,ipiv,work,info)

call dgemm('n','n',3*n,m,m,-1.0_wp,dAmat,3*n,Ainv,m,1.0_wp,dqdr,3*n)

call dgemv('n',self%n3,self%nvar,1.0_wp,self%B,self%n3,self%coord,1,0.0_wp,displ_cartesian,1) ! B * coord

call dgemv('t',self%n3,self%nvar,1.0_wp,self%B,self%n3,array_form,1,0.0_wp,g_normal,1)

real(wp) :: lambda,gnorm,dnorm,ddot,eold,xdum,estart,acc,e_in

real(sp) :: r4dum,sdot

call dgemv('t',anc%n3,anc%nvar,1.0_wp,anc%B,anc%n3,g,1,0.0_wp,gint,1)

real(wp), external :: ddot

real(wp), external :: ddot

real(sp), external :: sdot

real(wp), external :: ddot

call dgemv('t',3*mol%n,nvar,1.0_wp,trafo,3*mol%n,g_xyz,1,0.0_wp,g_anc,1)

real(wp), external :: ddot

call dspmv('u',3*mol%n,1.0_wp,hessp,velocities,1,0.0_wp,scratch,1)

real(wp), external :: ddot

call dspmv('u',nat3,0.5_wp,hess,displ,1,0.0_wp,hdx,1)

call dsysv('u',nvar,1,htmp,nvar,ipiv,pinvg,nvar,test,-1,info)

real(wp) de_min,grad_min,e_ed,e_pr,de,ddot,gthr

real(wp) :: dum, ddot

call dsyev ('V','U',ndim,A,ndim,e,aux,lwork,info)

call DSYGVD(1,'V','U',ndim,A,ndim,S,ndim,e,aux, & !workspace query

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions