[Flash-X-users] Some guidelines for Physics Unit Authors
Dubey, Anshu
adubey at anl.gov
Tue Jul 5 17:53:24 CDT 2022
All:
In the meeting today people wanted to know general guidelines for ensuring that their code needs minimal refactoring to work with runtime and recipes. They will be in the developer’s guide, but while that is work in progress, here is a minimal set.
1. Keep track of all scalars and data structures that will need to be included for offloading computation to devices other than CPU. Put them in the Unit_data modules with comments attached for each data item that indicate whether data item is to be:
* Allocated on device and reused on device as needed
* Sent once and reused without need to return
* Sent and updated but not returned
* Nothing to send, only returned
* Sent and returned
2. Think about the functionality of your unit that you wish to expose to Driver_evolveAll, put that functionality in the unit level API
3. Localize code that is likely to need refactoring later to use performance portability tools.
4. Whatever naming convention you are using internally, make it so that search-and-replace can easily make it compatible with the overall naming convention since that is still work in progress.
5. As long as your code is not kosher for outsiders to use, put keyword UNOFFICIAL in your config file. This will give an error during setup if someone tries to use it. If you wish to bypass the check you can include the option –with-unofficial=path
These are what I could think of. If others remember or think of something please add.
Best,
Anshu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cels.anl.gov/pipermail/flash-x-users/attachments/20220705/d904fa61/attachment.html>
More information about the Flash-X-users
mailing list