From: jesse AT lenny DOT dseg DOT ti DOT com (Jesse Bennett) Newsgroups: comp.os.msdos.djgpp Subject: Re: Netlib code [was Re: flops...] Date: 13 Feb 1997 04:12:48 GMT Organization: Texas Instruments Lines: 39 Message-ID: <5du4c0$kor$1@superb.csc.ti.com> References: <5dh4gi$ek9$1 AT superb DOT csc DOT ti DOT com> <1997Feb12 DOT 130129 DOT 27922 AT indyvax DOT iupui DOT edu> Reply-To: jbennett AT ti DOT com (Jesse Bennett) NNTP-Posting-Host: lenny.dseg.ti.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <1997Feb12 DOT 130129 DOT 27922 AT indyvax DOT iupui DOT edu>, mwood AT indyvax DOT iupui DOT edu (Mark H. Wood) writes: > I have to ask: why not simply code the relevant parts of your program in > Fortran? Because in my application all of the code is relevant. The truth of the matter is that I have a huge investment in C code that I don't want to rewrite. But, I am considering doing just that due to the lack of portable, high quality and high performance C libraries for linear algebra. I am currently calling Fortran compiled LAPACK/BLAS library functions from my C code and the performance is lackluster, to say the least. The problem is not with the performance of the Fortran code but with the memory bandwidth overhead associated with converting the C row-major matrices to the Fortran column-major order prior to calling each Fortran function and then back to row-major order before returning to the C code. For small-medium scale problems this is probably no big deal, but I have programs that consume 10-15 *days* of CPU time on a 500Mhz DEC Alpha system. My initial experiments indicate that this time would be reduced by at least 50% in a native Fortran implementation. So I will probably do as you suggest, rewrite the relevant portions of my code in Fortran. In other words - all of it. The sad thing (to me) is that well written C can perform at least as well (and often better) than equivalent Fortran code in numerical analysis applications. Unfortunately, as it stands today, most serious scientific code will continue to be written in Fortran77 because of the huge body of well written and highly optimized code that is already available for these applications, as exemplified by the netlib collection. Much of this code represents 30+ years of development so it is very mature and stable. Most (if not all) of the Fortran BLAS routines were written in the 70's, for example. You just had to ask, didn't you. :^) Oh well... I feel better now. Hmm... I wonder where I put that Fortran text? --Jesse