For Programmers: Free Programming Magazines  


Home > Archive > Fortran > April 2005 > Re: Free Fortran compiler that handles Cray-style pointers









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Free Fortran compiler that handles Cray-style pointers
Richard Maine

2005-04-06, 12:21 pm

"Pat" <L_Pat_S@hotmail.com> writes:

> Based on what I have read on the Internet, you, Mr. Richard Maine,
> might be a good person to advise me on how to convert Fortran code that
> uses Cray pointers to Fortran code that uses Fortran-'90 pointers.
> Could you please provide with complete advice on how to do this or else
> an Internet reference to help me out with this complete process?


Sorry, but I don't have a cookbook conversion. You just need to look at
each relevant line, understand what it does, and convert it by hand.
Perhaps you can see a pattern of the usage in the code in question so that
you can automate it, but I don't have a handy universal formula or a
reference to one. Any F90 textbook would be good for understanding the
f90 pointers. I don't actually have any handy citations for Cray pointers.

I might second Walt Spector's comments about possibly converting to
something other than f90 pointers. Don't get too hung up on the word
"pointer". Cray pointers can be used to "point" to things
(particularly when interoperating with C). But in an awful lot of cases,
the only reason they are used is to provide a form of dynamic allocation.
In that case, something like allocatable might be a better match, though
pointer can also be made to work. See Walt's posting for a sample of
such a conversion.

Although converting to a standard form has many benefits, I do begin
to wonder in your case whether you might be ahead to just buy a
commercial compiler that supports Cray pointers. Yes, I know they cost
money, but it seems to me that you are investing a fair amount of
money's worth of your time. Of course, that is your call.

--
Richard Maine
email: my last name at domain
domain: summertriangle dot net
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com