From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb9cd,3e10dbc776740ba1 X-Google-Attributes: gidfb9cd,public X-Google-Thread: 110292,3e10dbc776740ba1 X-Google-Attributes: gid110292,public X-Google-Thread: f57db,3e10dbc776740ba1 X-Google-Attributes: gidf57db,public X-Google-Thread: 1164f8,3e10dbc776740ba1 X-Google-Attributes: gid1164f8,public From: henley Subject: Re: A portable benchmark for ANSI C compilers, Windows NT and MPP supercomputers. Date: 1997/03/17 Message-ID: <332D6190.5831@tonys.ecology.umn.edu>#1/1 X-Deja-AN: 226190699 References: <5g120v$312@news-rocq.inria.fr> Organization: University of Minnesota Newsgroups: comp.benchmarks,comp.sys.intel,comp.sys.dec,comp.os.ms-windows.nt.misc Achim Gratz wrote: > Your CG > looks fairly typical to me except for the fact that where one would > expect a matrix-vector-product, there's two calls to D_slash. My > question again, is this a linear or nonlinear operation? Has it side > effects? What is the reason for having a separate matrix for the real > and imaginary part? Would it be possible to pack these so that you > get a matrix of complex numbers? These are good points... Actually, the reason for having the real/imaginary separated like that goes back to when I had those routines coded in assembly level routines on the CM5. I could go into details if you like, but I could get better performance that way. As for the two calls to D_slash... yes, that takes the part of the matrix-vector multiplication of conjugate gradient, and I don't know whether I would call it a linear operation or not. I guess I would. > > > The "matrix" that is inverted is not really a matrix, ok? So your > > previous experience with CG is completely irrelevant. The matrix > > multiplication is the most expensive step in the conjugate gradient > > (as you will agree), but the actual multiplication is an abstract > > one in this sense. It involves transporting 8 neigboring complex > > vectors (ie, 6 components, 3 real, 3 imaginary) to each point of a > > distinct parity via the gauge links (a la General Relativity) which > > are COMPLEX 3 dimensional matrices. It is a complex four dimensional > > operation that is difficult to implement. > > OK, while I still don't understand the physics involved, then don't > call this function matrix_matrix_multiply when it is in fact something > completely different. It IS a matrix-matrix multiplication! It multiplies two SU(3) matrices (SU(3) matrices are special (det = 1) unitary complex 3x3 matrices). Seriously, I do know what I am talking about. Imagine you spent a couple of years working on an algorithm, and someone told you that you had accidently used a cross-product calculation instead of a matrix multiplication.... heh. I think you may be confused as to what the "matrix" is. The "matrix" used in the CG routine does not have seperate real and imaginary parts.... but its elements are SU(3) matrices which do. > > [...] > > me. I simply posted my code because I am interested in the comments > > of others, and also I would like to see how different machines > > compare. > [...] > > I understand (I think) why you posted the code and I like the idea. > But nobody who doesn't have a QCD background (like me) will have the > slightest chance of understanding (and hence optimising) the code if > it stays like it is, that's why I called it ugly. I'm sorry if that > is offending to you, but I stand by my word. To quote the readme.txt that I posted: "...The code is messy and ugly... sorry, it is still in a very early development stage..." I could have spent a couple of days cleaning it, checking it, and adding comments. Nobody likes someone else's code, especially if there are zero comments! :) Robert Harley is not a physicist (although he is very smart, and may be a mathematician, I think), and he rewrote several routines (in fast_routines.c, the very ones you are probably using). His changes improved the performance on RISC CPUs substantially, so it is entirely possible to optimize and improve this code without knowing any QCD. How about you rewrite a couple of routines, and make them look pretty? If they are faster too, I would love to have them. And while you are at it, how about posting some of YOUR code. ;)