Translator

Richard Tran Mills rmills at ornl.gov
Thu Dec 22 12:10:34 CST 2005


Matt,

I agree with Barry that this might cause more grief than it would save, and it 
would also be quite difficult to do this correctly with Fortran.  That said 
=), I am a minor participant in an LDRD project here that is working on 
developing and applying source-to-source translation tools (e.g., stuff like 
ROSE -- http://www.llnl.gov/CASC/rose/).  This might be something that I could 
try under the auspices of that project.  I'll discuss this with the other 
folks on the project.

There are some other areas wher source-to-source translation tools might be 
useful as well.  To port the PFLOTRAN code to machines where the compiler 
doesn't support VeGetArrayF90() interfaces, I ended up hacking together a very 
crude Python program to convert those calls into the F77-style VecGetArray() 
ones.  Doing it using real parsing tools would be much better, though.

Cheers,
Richard

Matthew Knepley wrote:
>        It seems many problems could be fixed if we could just get people to
> translate their code to the next version. Is it worth it to invest time in
> a Python translator that would try to auto-upgrade software to the newest
> interface? I was thinking a sed-like thing at first, but we do have a partial
> C parser available as well. However, that version is somewhat bad in that it
> blows away spaces.
> 
>       Matt




More information about the petsc-dev mailing list