Xref: utzoo comp.lang.fortran:3856 comp.sys.super:234 comp.unix.cray:186 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!ucsfcgl!seibel From: seibel@cgl.ucsf.edu (George Seibel) Newsgroups: comp.lang.fortran,comp.sys.super,comp.unix.cray Subject: Re: Wanted: Cray Fortran -> Sun Fortran filter Message-ID: <15533@cgl.ucsf.EDU> Date: 27 Sep 90 08:44:00 GMT References: <415@kaos.MATH.UCLA.EDU> Sender: daemon@cgl.ucsf.edu Reply-To: seibel@cgl.ucsf.edu (George Seibel) Distribution: na Organization: Computer Graphics Lab, UCSF Lines: 38 barry@pico.math.ucla.edu (Barry Merriman) writes: >I'm trying to port a Cray Fortran code to Sun Fortran (f77) >(the direction of the future? -). Is there a filter available >to do this? >There is a filter to convert from Vax VMS Fortran to Sun, so >a Cray -> VMS filter would be enough. >The Cray code runs under the CTSS op sys, on the NERSC Crays >(formerly MFE) by the way. Cray Research has only recently started putting a lot of extensions in their compiler, so there's a good chance that what you have is mostly standard fortran. If you are real lucky, all you'll have to do is comment out the "call dropfile()" that CTSS insists all programs contain. You probably won't be quite that lucky, though. If the code was tweaked for the cray, there's a good chance you'll find some calls to library routines, like the CVMGx() series. You'll need to provide fortran (or whatever) versions of all those, or recode the program. Now that the cray compilers are a lot smarter than they used to be, some of the old library routines are no longer required for good performance. You might find that the software is relying on ints and reals being the same size, which is ok on a cray where they are both 64 bits; but if the software is not numerically stable in 32 bit precision, you might have some trouble making it double precision. Or maybe not. It all depends on whether or not the original programmer knew what he was doing, or cared. At any rate, I kinda doubt that you need a filter, (or that a robust/complete one exists) rather I suspect a fortran version of any library routines your code calls is what you'll need, if anything. Of course, if the code is really bizarre, all bets are off... Your VMStran converter would probably clean up some extensions that might be found in "Cray" fortran. Wouldn't it be nice if people just wrote portable code? If we'd gotten a new ANSI standard around 1983 that just added the simple extensions that have become almost-de facto standards? blah blah blah... oh well. good luck. George Seibel, UCSF seibel@cgl.ucsf.edu