<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr">Hi Maksim,<div><br></div><div>Much is up to you and how you like to do things. People will message the user-list when they've encountered a specific error, and often they will post the standard output, as well as a detailed explanation for what happened upon encountering said error. You'll see below that I describe a workflow, and those aforementioned messages to the user-list usually come up with people who are struggling between steps (2)-(4).</div><div><br></div><div>When it comes to debugging any executable, personally I am a fan of using <font face="monospace">gdb</font> (<a href="https://www.gnu.org/software/gdb/">https://www.gnu.org/software/gdb/</a>). However you may want to make a certificate for <font face="monospace">gdb</font> to work on your system (thinking of Mac OS here). It depends what you like. I find this debugger to be the most natural one to use. </div><div><br></div><div>The workflow for this is quite simple at a glance, but the process can take anywhere from a couple minutes to months depending on your problem: </div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>(0) all the things that go into writing the code </div><div><br></div><div>(1) set it up using the pertinent set up commands for <font face="monospace">flash4</font> (there is also the <font face="monospace">-debug</font> setup command and the <font face="monospace">-verbose=DEBUG </font>(see user manual*)) and make sure you have the relevant flags in your <i>Makefile.h.</i></div><div><i><br></i></div><div>(2) <font face="monospace">make</font> the executable in the "object" directory </div><div><br></div><div>(3) debug the errors from the <font face="monospace">make</font> if there are any </div><div><br></div><div>(4) run the <font face="monospace">flash4</font> executable... if there are errors at runtime, this is where <font face="monospace">gdb</font> comes into play, and the cycle (0)-(4) repeats itself until there are no errors at runtime. At runtime you'll see the time steps, as well as the location of the cell that is causing the code to work the hardest (i.e. smallest time step), when a file is outputted, as well as when refinement is done, among other things. You can also code in prints at (0), for instance, by using the <i>Simulation_adjustEvolution.F90</i> routine. If there are no errors during runtime, </div><div><br></div><div>(5) I track my output to see if it looks as expected using VisIt (<a href="https://wci.llnl.gov/simulation/computer-codes/visit">https://wci.llnl.gov/simulation/computer-codes/visit</a>) or whatever visualization software I use that I feel most comfortable with. Errors in (5) aren't "errors" in the computational sense, but require physical & numerical understanding of what your routines are doing and whether or not the output is reasonable, and to what extent. Depending on what you see, you may need to start from (0) again. This is a method of observing the variables you are calculating. There are also the integrated factors that get spit out for each time step in a log file.</div></blockquote><div><br></div><div>Overall it's a long and iterative process, so don't get discouraged. It's good to ask questions and ask for help as needed and just try your best.</div><div><br></div><div>Apologies if my email is too general, feel free to get more specific and more people may be able to chim in too.<br><br>Best,<br>Marissa</div><div><br></div><div>* If you're overwhelmed by the user manual, which is understandable, I recommend just cmd+F-ing the PDF document for whatever you're interested in. For instance if I do so with the word, "debug" there are 58 hits for that string.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 8, 2021 at 11:59 PM Maksim Kozlov <<a href="mailto:maksim.kozlov@nu.edu.kz">maksim.kozlov@nu.edu.kz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Friends,<div>I am very new to Flash code so my questions could be naive. Yet I was not able to find any information on this in user's guide and so would really appreciate your help on this. My question is how do I debug Flash application. I know that I need to use -debug option during setup but then what? How can I track execution, current values of variables and so on?</div><div>many thanks</div><div>MAksim</div></div><div id="gmail-m_4109206401418273965DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid rgb(211,212,222)">
<tbody><tr>
<td style="width:55px;padding-top:18px"><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.avast.com_sig-2Demail-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Dwebmail&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=wlIj2Wk5AYR_utqRRqN2OpI1nykd7sy-UZesSWABUiw&m=XKtD_5m3-Vq_V1kvzg6BgwDNHYM5MFVk7Vq1IIK0vZk&s=v2EANEgZ6ocfQOI4Xfc4bJUBfuIcQTDcfSqbQP2-JTQ&e=" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
<td style="width:470px;padding-top:17px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Без вирусов. <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.avast.com_sig-2Demail-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Dwebmail&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=wlIj2Wk5AYR_utqRRqN2OpI1nykd7sy-UZesSWABUiw&m=XKtD_5m3-Vq_V1kvzg6BgwDNHYM5MFVk7Vq1IIK0vZk&s=v2EANEgZ6ocfQOI4Xfc4bJUBfuIcQTDcfSqbQP2-JTQ&e=" style="color:rgb(68,83,234)" target="_blank">www.avast.com</a> </td>
</tr>
</tbody></table>
<a href="#m_4109206401418273965_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>
</blockquote></div></div>