Use of COMPLEX data and use of BLAS

Documentation, Web site and code modifications

Moderators: baguetl, routerov

Locked
User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

Use of COMPLEX data and use of BLAS

Post by jzwanzig » Mon Dec 04, 2017 4:49 pm

Hi everyone,

I'm back to development. Currently I'm putting the finishing touches on implementing nuclear magnetic dipoles--they are input with nucdipmom(3,natom) input variable, and then the Hamiltonian is modified to include them (in PAW, both on-site terms and the bare A.p term). Two questions arise:

1) Our coding rules forbid use of COMPLEX data types--why? Is this rule still necessary?

2) Our coding rules also discourage the use of BLAS, seemingly more for readability than anything else. But the A.p nuclear dipole Hamiltonian in reciprocal space is an npw_k x npw_k matrix at each k point (Hermitian, so storable as one triangle only) and its application to the wavefunction at k is tailor-made for a call to ZHPMV, which with MKL is much faster than any other approach (I've coded about 4 different methods).

so--overall, can I use COMPLEX and BLAS in this case? Or, if not, why not?

thanks,
Joe
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: Use of COMPLEX data and use of BLAS

Post by ebousquet » Wed Dec 20, 2017 11:03 am

Hi Joe,
I started to use complex in the following routine:
56_xc/dfpt_mkvxc_noncoll.F90
which sounds working. However, I didn't make an automatic test yet so I don't know the transferability of it. Should do this automatic test this week...
I think we should go toward complex in the future because it will help us in very complex cases (the other complex ;-) )...
Cheers,
Eric

Locked