chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 418 forks source link

Make good use of delete-free features in release/examples #10947

Open bradcray opened 6 years ago

bradcray commented 6 years ago

This epic relates to getting the release/examples directory to the point that it's using delete-free features as we'd like it from a "best practices" perspective. I believe that in most of the following cases, unmanaged is currently being used simply because it was the most expedient way to get the feature in. A few cases also use new borrowed and should be double-checked.

In some sort of priority-sorted order:

In the list above, I've skipped primers/classes.chpl, assuming that it's written to use all flavors as part of its teaching of them.

bradcray commented 6 years ago

I've got a start on the shootout and hpcc cases in PR #10945 and will also take on the users guide.

@daviditen : Would you have time to look at LCALS in this sprint?

daviditen commented 6 years ago

Yes, I can take LCALS.

ronawho commented 6 years ago

Close https://github.com/chapel-lang/chapel/issues/10598 in favor of this?

mppf commented 6 years ago

Code that actually wants to manage its own memory should use unmanaged and if that's what the code is doing we should be OK with that. There might be 1 or 2 of the above cases that fall into this category.

bradcray commented 6 years ago

Michael's point is a good one. I don't mean to imply that no codes should ever use unmanaged again, more that we should use what's most appropriate for the code and make sure we're not just using unmanaged because it was the quickest way to keep the program working for this release.

mppf commented 6 years ago

I poked around a bit and don't see anything else that isn't covered above.

bradcray commented 6 years ago

For the 1.18 release, I didn't come up with rewrites of the programs/ files that I was sufficiently happy with to merge (and found myself mostly wondering if that directory should just be removed. It's ancient and doesn't necessarily represent code that we care deeply about.

I essentially timed out on SSCA2, but figured it was a sufficiently large / long-lived code that that didn't feel concerning to me (though I'd like to return to it post-release).

mppf commented 6 years ago

@bradcray - see PR #11086 moving programs