Hi Andy --
In rewriting to Chapel, could you just defer the declarations of the
arrays until the point in the Fortran code where the dynamic allocations
take place? While I understand the desire for a 1:1 translation, for a
pattern that's (in my opinion) as ugly as this in Fortran, you'd just be
unnecessarily propagating that ugliness into the future if you keep it
split between two lines like this... (and I'm guessing that nothing much
is done with the array until it is allocated, which would suggest that
making the second location the declaration point in Chapel shouldn't break
anything?)
Just a thought (I haven't wrestled through your code that much),
-Brad
On Wed, 20 Jun 2018, Andrew Halper wrote:
Hello Takeshi,
On Tue, Jun 19, 2018 at 4:38 PM Takeshi Yamamoto <[email protected]>
wrote:
// While I'm writing this e-mail, I found a reply from Brad,
// so just for some "plus alpha" thing
Yes, thanks very much for your reply. I did suspect that was how it was
done in Chapel.
As I alluded to in my reply to Brad's post, in my specific situation, the
(rather ugly) Fortran "legacy code" declares hundreds of these
<https://github.com/NCAR/wrf_hydro_nwm_public/blob/master/trunk/NDHMS/Data_Rec/rt_include.inc>,
while deferring the actual allocation until much later in the code, so I
think I was dreading having to track down reasonable defaults for all the
array bounds. Still mulling this over at present.
Thanks again,
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