Hello Damian,

On Sat, Jun 23, 2018 at 6:11 PM Damian McGuckin <[email protected]> wrote:

Andy - I can appreciate your terror at tweaking legacy code.
>

hah! Yes. Thanks. I imagine it's a pervasive problem.


> I have found that the key point is thst you need avoid the 1:1 translation
> rule as this ties your hands.
>

I do appreciate the merits of this, and I have taken that approach in the
past on other projects at various times. Here however, there are some
circumstances outside my control which have caused me to be so conservative:

   1. The Fortran is still under (somewhat) active development. A
   modification to the code might indicate a change in the underlying
   conceptual model (which I have no collaboration with, or input into), so I
   would need to update the Chapel translation accordingly (yes, I do realize
   the near-futility of this).
   2. Despite working with hydrologists my entire career, I have
   effectively no experience with Fortran. In college, the engineers were
   divided into two groups by discipline: one group went to the Fortran class,
   the other (including me) went to the C class.
   3. I have effectively no training in the "problem domain" of the
   software. i.e., even where I can (barely) read the code, I have next to no
   idea what the intent is.

That said, the *1:1*-ness is inevitably diverging, and I expect it to do so
further.

I prefer to simplify the Fortran 90 first and introduce break points into
> the cleaner Fortran code that allows you to compare data, item by item, at
> these break points within the older rubbish and the newer cleaner code. So
> make sure your cleaner Fortran version works before you start refactoring
> into Chapel. Your Chapel code should include the same breakpoints. Do not
> go overboard in your Fortran cleanup!
>

Good advice, and I have considered doing that a few times. Again though, I
know next to nothing about Fortran (nor am I much inclined to), so in a
way, the translated Chapel is easier for me to comprehend.


> Have you hit the Fortran code with something like Eclipse with Photran or
> Cleanscape, or even K-scope/K-graph or fortesg/fortrancallgraph. Run such
> a tool to see what pops out to help. There is also Intel Parallel Studio
> XE which has some static analysis tools but I have never used it.
>

No I haven't tried that yet, but thank you for the IDE references (it's
good to narrow the choices down a bit). About the fanciest thing I've tried
with analyzing the Fortran is GDB-in-Emacs, which with the MPI complication
is fairly cumbersome.

Thanks again, and Cheers,

Andy
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to