<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<ul>
<li>Physics units no longer contain high-level code, such as Hydro.F90, that iterates over blocks. Iteration over blocks is moved out to Driver_evolveAll and physics units typically consists of static Fortran routines that work of a per-block basis. Static
Fortran routines, therefore, do not know that tile/block iterators exist.</li><li>Static Fortran routines should not take a tile/block descriptor as an argument. Rather they should accept tile metadata as arguments.</li><li>Static Fortran code shall be written such that it will work if tile metadata (e.g., lo, hi, data pointers) are specified with respect to a local index space or global index space.</li><li>Static Fortran routines shall not dynamically allocate memory. All necessary scratch/intermediate data shall be passed in as arguments.</li></ul>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Flash-X-users <flash-x-users-bounces@lists.cels.anl.gov> on behalf of Dubey, Anshu <adubey@anl.gov><br>
<b>Sent:</b> Tuesday, July 5, 2022 6:55 PM<br>
<b>To:</b> flash-x-users@lists.cels.anl.gov <flash-x-users@lists.cels.anl.gov><br>
<b>Subject:</b> Re: [Flash-X-users] developer's documentation</font>
<div> </div>
</div>
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Menlo}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
p.x_MsoListParagraph, li.x_MsoListParagraph, div.x_MsoListParagraph
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
span.x_EmailStyle20
{font-family:"Calibri",sans-serif;
color:windowtext}
p.x_p1, li.x_p1, div.x_p1
{margin:0in;
font-size:8.5pt;
font-family:Menlo;
color:black}
span.x_s1
{}
span.x_apple-converted-space
{}
.x_MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
{}
ol
{margin-bottom:0in}
ul
{margin-bottom:0in}
-->
</style>
<div lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_MsoNormal">I have added following files into the source for sphinx in Flash-X-docs which will not show up on the web interface, but have some relevant text as promised. Some have very little, but I am working on them fairly regularly.</p>
<p class="x_p1"><span class="x_apple-converted-space"> </span><span class="x_s1">create mode 100644 sphinx/source/CodingStandards.rst</span></p>
<p class="x_p1"><span class="x_apple-converted-space"> </span><span class="x_s1">create mode 100644 sphinx/source/FLASH-to-Flash-x.rst</span></p>
<p class="x_p1"><span class="x_apple-converted-space"> </span><span class="x_s1">create mode 100644 sphinx/source/developer_section.rst</span></p>
<p class="x_p1"><span class="x_apple-converted-space"> </span><span class="x_s1">create mode 100644 sphinx/source/namingConventions.rst</span></p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"> </p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b><span style="font-size:12.0pt; color:black">From: </span>
</b><span style="font-size:12.0pt; color:black">Flash-X-users <flash-x-users-bounces@lists.cels.anl.gov> on behalf of "Dubey, Anshu" <adubey@anl.gov><br>
<b>Date: </b>Tuesday, July 5, 2022 at 5:53 PM<br>
<b>To: </b>"flash-x-users@lists.cels.anl.gov" <flash-x-users@lists.cels.anl.gov><br>
<b>Subject: </b>[Flash-X-users] Some guidelines for Physics Unit Authors</span></p>
</div>
<div>
<p class="x_MsoNormal"> </p>
</div>
<p class="x_MsoNormal">All:</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">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.</p>
<p class="x_MsoNormal"> </p>
<ol start="1" type="1" style="margin-top:0in">
<li class="x_MsoListParagraph" style="margin-left:0in">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:</li><ol start="1" type="a" style="margin-top:0in">
<li class="x_MsoListParagraph" style="margin-left:0in">Allocated on device and reused on device as needed</li><li class="x_MsoListParagraph" style="margin-left:0in">Sent once and reused without need to return</li><li class="x_MsoListParagraph" style="margin-left:0in">Sent and updated but not returned</li><li class="x_MsoListParagraph" style="margin-left:0in">Nothing to send, only returned</li><li class="x_MsoListParagraph" style="margin-left:0in">Sent and returned</li></ol>
<li class="x_MsoListParagraph" style="margin-left:0in">Think about the functionality of your unit that you wish to expose to Driver_evolveAll, put that functionality in the unit level API</li><li class="x_MsoListParagraph" style="margin-left:0in">Localize code that is likely to need refactoring later to use performance portability tools.</li><li class="x_MsoListParagraph" style="margin-left:0in">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.</li><li class="x_MsoListParagraph" style="margin-left:0in">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 </li></ol>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">These are what I could think of. If others remember or think of something please add.
</p>
<p class="x_MsoNormal">Best,</p>
<p class="x_MsoNormal">Anshu</p>
<p class="x_MsoNormal"> </p>
</div>
</div>
</body>
</html>