[CPMD-list] Some Numerical Mismatch with CPMD-TEST results in Apple-Mac-OS-X

Pradip Kumar Biswas biswas at univap.br
Wed Aug 11 17:14:40 CEST 2004


Hi,

After making the CPMD code run on Apple MacOS-X (g4 machine) through some 
alterations listed below, we find the end-results for Aluminium, for example, are quite 
close (differ in the 5th place after decimal or above) except the electron density 
gradient where the difference is most prominent. I attach our output file as well as the 
CPMD-TEST output we are comparing with. DRHOMAX differ the most.  Below we 
enlist the changes we made in the code to make it run in Apple MacOS.
##(Are they the source of the discrepancy? If so, how we can remove this discrepancy.
Or nothing to be worried about those discrepancies ????)

1. We figure out that the vecLib BLAS routine ZDOTC is leading to the segmentation 
fault error. To overcome this,

a)  I changed the calls OVLAP_H in atomwf.f , calc_alm.f , friesner_c.f , friesner_c_p.f 
by CALL OVLAP_C (which, perhaps, as I understood, does not enforce Hermitian 
symmetry for the matrix)

b) The remaining use of ZDOTC in friesner-c.f is diverted by  using a renamed function 
ZZDOTC defined as: ZZDOTC(NGWK,NKRY_BLOCK*NKRY_MAX,CSCR,IBN1,IBN0)

and we create a small routine for the function (given below) to make the dot product 
between the columns given by IBN1 and IBN0.

2) In an another attempt, we do not change the CALL OVLAP_H by CALL OVLAP_C 
but within the SUBROUTINE OVLAP_H transfer the vectors to another routine to 
perform the dot product. 

The two sets of results are identical indicating the replacement of the calls OVLAP_H 
by OVLAP_C does not affect the solution (as perhaps the matrix is Hermitian).

For 1.b) we take the function as:

       Function zzdotc(n,m,zx,cj,ck)
C
       COMPLEX*16 zx,ztemp,zzdotc
       DIMENSION ZX(N,M)
       integer i,n,m,cj,ck
       ztemp = (0.0d0,0.0d0)
       zzdotc = (0.0d0,0.0d0)
       if(n.le.0.or.m.le.0)return
C
        do 30 i=1,n
        ztemp=ztemp+dconjg(zx(i,cj))*zx(i,ck)
 30     continue
        zzdotc=ztemp
        return
        end

Regards,

Biswas.

--
Universidade do Vale do Paraíba - UNIVAP.
http://www.univap.br/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: al001geo.out
Type: application/octet-stream
Size: 164466 bytes
Desc: not available
Url : http://cpmd.org/pipermail/cpmd-list/attachments/20040811/40fc9bf1/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newout_aug_9
Type: application/x-macbinary
Size: 160384 bytes
Desc: not available
Url : http://cpmd.org/pipermail/cpmd-list/attachments/20040811/40fc9bf1/attachment.bin 


More information about the CPMD-list mailing list