Date: Thu, 17 Aug 2000 00:22:55 -0500 From: "Glenn Johnson<glennpj>" <glennpj@bayouhome.net> To: Matt Pillsbury <pillsy@brown.edu> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: FORTRAN? Message-ID: <20000817002255.A14277@gforce.johnson.home> In-Reply-To: <20000816023651.A79791@straylight.NONE>; from pillsy@brown.edu on Wed, Aug 16, 2000 at 02:36:51AM -0400 References: <20000816023651.A79791@straylight.NONE>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 16, 2000 at 02:36:51AM -0400, Matt Pillsbury wrote: > Hi, > > I'm seriously thinking about upgrading my system from 3.5-STABLE > to 4.1-STABLE, since I will soon lose cablemodem access to the > Internet. One of the reasons I'm considering the change is that web > site lists a native FORTRAN compiler as one of the new features in > 4.x. Since FORTRAN is one of those things that I occasionally have a > need for, and f2c isn't terribly efficient compared to native code, I > was wondering if anybody has more info about this. You could install the egcs port and get g77. 4.1-STABLE uses g77 from egcs in the base OS. It is installed as f77 but is actually g77 version 0.5.25. Do not assume that g77 is always better than f2c/cc. There are some cases where g77 either does not compile code or produces a broken binary where f2c/cc will both compile and run the same code just fine. In general, g77 compiled code is faster than f2c/cc compiled code but there are cases where the f2c/cc compiled code is faster. The age of the FORTRAN code and the number of f2c specific hacks inserted into the code greatly influence the ability to use g77 successfully. In my case I have to deal with some quite old FORTRAN programs that are far from being actively maintained. Generally, problems with g77 compiled code can be traced back to the FORTRAN code itself although compiler bugs are possible. While the correct solution would be to fix the FORTRAN code it is sometimes easier to use f2c/cc if that works. It just depends on how much your time is worth and how CPU intensive the application is. Hope that helps. -- Glenn Johnson glennpj@bayouhome.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000817002255.A14277>