<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div>Hi Tristan,<div class=""><br class=""></div><div class="">I second Marissa’s suggestion to use the ‘FromFile’ unit for turbulence driving. It has been extensively tested and was used in a number of previous works (most recently in <a href="https://ui.adsabs.harvard.edu/abs/2021NatAs...5..365F/abstract" class="">https://ui.adsabs.harvard.edu/abs/2021NatAs...5..365F/abstract</a>). There were some issues in the ‘generate’ unit when I first started using it in FLASH (was still FLASH v3 then :-), which I used as a template to make the ‘FromFile’ unit, and fixed some bugs and added some functionality, such as the decomposition into solenoidal and compressive parts, and the restarting issues you discovered. Using ‘FromFile’ is explained in detail in the flash user guide, but please let me know if you have any questions about it.</div><div class=""><br class=""></div><div class="">Best regards,</div><div class="">Christoph</div><div class=""><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 25 May 2021, at 11:24, Tristan <<a href="mailto:juwj@mail2.sysu.edu.cn" class="">juwj@mail2.sysu.edu.cn</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,everyone:<div class=""><br class=""></div><div class="">I tried to add the two runtime parameters in my flash.par</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>```</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>st_saveReproducible = .true.</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>st_reproducible = .true.</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>```</div><div class=""> It could generate the “saved_random_numbers” in the object directory, but when I want to restart from the generated seed file, It didn’t wrong as same as before. It says "Attempt to DEALLOCATE unallocated ‘st_randseed’ “. </div><div class=""><br class=""></div><div class="">Also, I took your advice and tried the FromFile unit, it works well.</div><div class="">But We have used the StirTurb unit for two months, our work is also based on the StirTurb, Is there any difference between the two units? Because my boss may not be willing to turn to a new unit. Because he used the StirTurb unit during his PhD career 15 years ago. We are working on the characteristic of the high Mach turbulence, If FromFile behaves better in this aspect, I will turn on it.</div><div class=""><div class=""><blockquote type="cite" class=""><div class="">Begin forwarded message:</div><br class="Apple-interchange-newline"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">From: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">"Marissa B. P. Adams" <<a href="mailto:madams@pas.rochester.edu" class="">madams@pas.rochester.edu</a>><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">Subject: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">Re: [EXT] [FLASH-USERS] Fwd: Some Problem when restart the </b><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">Date: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">May 25, 2021 at 5:05:58 AM GMT+8<br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">Tristan <<a href="mailto:juwj@mail2.sysu.edu.cn" class="">juwj@mail2.sysu.edu.cn</a>><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">Cc: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">flash-users <<a href="mailto:flash-users@flash.uchicago.edu" class="">flash-users@flash.uchicago.edu</a>><br class=""></span></div><br class=""><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="ltr" class=""><div dir="ltr" class="">Hi Tristan,<div class=""><br class=""></div><div class="">I will admit I did not look at your log file, however I can assume based on the error you're using the Stir unit's "<font face="monospace" class="">generate</font>" unit. I would recommend trying the Stir "<font face="monospace" class="">FromFile</font>" implementation instead for now. </div><div class=""><br class=""></div><div class="">The <font face="monospace" class="">generate</font> sub-unit seems to have issues with restarts/reading in the random seed from the file you can generate to store the random seeds in (take a look at the <i class="">Config</i> file in the sub-unit). I've attempted to think of a fix for this but came to the conclusion it'd take some time to renovate (I could be wrong though ofc!).</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Marissa</div><div class=""><br class=""></div><div class=""><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 24, 2021 at 12:25 PM Tristan <<a href="mailto:juwj@mail2.sysu.edu.cn" class="">juwj@mail2.sysu.edu.cn</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">Additionally, I may not receive the mail from the flash-user mail list. I try to join the mail list. If you have any idea about the question, please CC to me at <a href="mailto:juwj@mail2.sysu.edu.cn" target="_blank" class="">juwj@mail2.sysu.edu.cn</a>. Thanks everyone !<div class="">Best wishes! <br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">Begin forwarded message:</div><br class=""><div style="margin:0px" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">From: </b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif" class="">Tristan <<a href="mailto:juwj@mail2.sysu.edu.cn" target="_blank" class="">juwj@mail2.sysu.edu.cn</a>><br class=""></span></div><div style="margin:0px" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">Subject: </b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif" class=""><b class="">Some Problem when restart the StirTurb</b><br class=""></span></div><div style="margin:0px" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">Date: </b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif" class="">May 25, 2021 at 12:18:44 AM GMT+8<br class=""></span></div><div style="margin:0px" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">To: </b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif" class=""><a href="mailto:flash-users@flash.uchicago.edu" target="_blank" class="">flash-users@flash.uchicago.edu</a><br class=""></span></div><br class=""><div class=""><div style="word-wrap:break-word;line-break:after-white-space" class="">Hello, everyone:<div class=""><span style="white-space:pre-wrap" class=""> </span>When I run the Flash code with the StirTrub unit for my turbulence simulation, it works well.But when I want to restart from a checkpointfile , something went wrong.</div><div class=""><span style="white-space:pre-wrap" class=""> </span>To restart from a CheckPointFile, I changed my flash.par :</div><div class=""><span style="white-space:pre-wrap" class=""> </span>```</div><div class=""><span style="white-space:pre-wrap" class=""> </span>restart = .true.</div><div class=""><span style="white-space:pre-wrap" class=""> </span>checkpointFileNumber = 5</div><div class=""><span style="white-space:pre-wrap" class=""> </span>plotFileNumber = 10</div><div class=""><span style="white-space:pre-wrap" class=""> </span>```</div><div class="">The total number of CheckPointFile is 10, and for plotfile is 20 when I run the code first time. So I just want to restart from half the number</div><div class="">That is the error I met :</div><div class="">```</div><div class=""><div class=""> [io_readData] Opening driventurb_3d_hdf5_chk_0005 for restart</div><div class=""> Progress: seed length = 0</div><div class=""> Random seed =</div><div class=""> nmodes = 188</div><div class=""> Source terms initialized</div><div class=""> Finished with Grid_initDomain, restart</div><div class=""> Ready to call Hydro_init</div><div class=""> Hydro initialized</div><div class=""> Gravity initialized</div><div class=""> Initial dt verified</div><div class=""> *** Wrote plotfile to driventurb_3d_forced_hdf5_plt_cnt_0000 ****</div><div class=""> Initial plotfile written</div><div class=""> Driver init all done</div><div class=""> n t dt ( x, y, z) |</div><div class=""> 106 2.5417E+00 4.9986E-02 ( 999. , 999. , 999. ) |</div><div class=""> 107 2.5917E+00 9.9972E-02 ( 999. , 999. , 999. ) |</div><div class=""> 108 2.6916E+00 1.9994E-01 ( 999. , 999. , 999. ) |</div><div class=""> *** Wrote plotfile to driventurb_3d_hdf5_plt_cnt_0010 ****</div><div class=""> 109 2.8916E+00 3.9989E-01 ( 999. , 999. , 999. ) |</div><div class=""> *** Wrote plotfile to driventurb_3d_hdf5_plt_cnt_0011 ****</div><div class=""> 110 3.2915E+00 7.9977E-01 ( 999. , 999. , 999. ) |</div><div class=""> *** Wrote checkpoint file to driventurb_3d_hdf5_chk_0006 ****</div><div class=""> *** Wrote plotfile to driventurb_3d_hdf5_plt_cnt_0012 ****</div><div class=""> 111 4.0912E+00 1.5995E+00 ( 999. , 999. , 999. ) |</div><div class=""> *** Wrote checkpoint file to driventurb_3d_hdf5_chk_0007 ****</div><div class=""> *** Wrote plotfile to driventurb_3d_hdf5_plt_cnt_0013 ****</div><div class=""> 112 5.6908E+00 3.1991E+00 ( 999. , 999. , 999. ) |</div><div class=""> *** Wrote checkpoint file to driventurb_3d_hdf5_chk_0008 ****</div><div class=""> *** Wrote plotfile to driventurb_3d_hdf5_plt_cnt_0014 ****</div><div class=""> 113 8.8899E+00 6.3982E+00 ( 999. , 999. , 999. ) |</div><div class=""> *** Wrote checkpoint file to driventurb_3d_hdf5_chk_0009 ****</div><div class=""> *** Wrote plotfile to driventurb_3d_hdf5_plt_cnt_0015 ****</div><div class=""> 114 1.5288E+01 1.2796E+01 ( 999. , 999. , 999. ) |</div><div class=""> *** Wrote checkpoint file to driventurb_3d_hdf5_chk_0010 ****</div><div class=""> exiting: reached max SimTime</div><div class=""> *** Wrote plotfile to driventurb_3d_forced_hdf5_plt_cnt_0001 ****</div><div class="">At line 25 of file Stir_finalize.F90</div><div class="">Fortran runtime error: Attempt to DEALLOCATE unallocated 'st_randseed'</div><div class="">At line 25 of file Stir_finalize.F90</div><div class="">Fortran runtime error: Attempt to DEALLOCATE unallocated 'st_randseed'</div><div class="">At line 25 of file Stir_finalize.F90</div><div class="">Fortran runtime error: Attempt to DEALLOCATE unallocated 'st_randseed'</div><div class="">At line 25 of file Stir_finalize.F90</div><div class="">Fortran runtime error: Attempt to DEALLOCATE unallocated 'st_randseed'</div><div class="">At line 25 of file Stir_finalize.F90</div><div class="">Fortran runtime error: Attempt to DEALLOCATE unallocated 'st_randseed'</div><div class="">At line 25 of file Stir_finalize.F90</div><div class="">Fortran runtime error: Attempt to DEALLOCATE unallocated 'st_randseed'</div><div class="">At line 25 of file Stir_finalize.F90</div><div class="">Fortran runtime error: Attempt to DEALLOCATE unallocated 'st_randseed'</div><div class="">At line 25 of file Stir_finalize.F90</div><div class="">Fortran runtime error: Attempt to DEALLOCATE unallocated ‘st_randseed'</div></div><div class="">```</div><div class="">The file <span class="">Stir_finalize.F90 is below:</span></div><div class=""><span class=""><br class=""></span></div><div class=""><div class=""><font class=""><span class="">!!****if* source/physics/sourceTerms/Stir/StirMain/Generate/Stir_finalize</span></font></div><div class=""><font class=""><span class=""> !!</span></font></div><div class=""><font class=""><span class=""> !! NAME</span></font></div><div class=""><font class=""><span class=""> !!</span></font></div><div class=""><font class=""><span class=""> !! Stir_finalize</span></font></div><div class=""><font class=""><span class=""> !!</span></font></div><div class=""><font class=""><span class=""> !! SYNOPSIS</span></font></div><div class=""><font class=""><span class=""> !!</span></font></div><div class=""><font class=""><span class=""> !! call Stir_finalize()</span></font></div><div class=""><font class=""><span class=""> !!</span></font></div><div class=""><font class=""><span class=""> !! ARGUMENTS</span></font></div><div class=""><font class=""><span class=""> !!</span></font></div><div class=""><font class=""><span class=""> !! none</span></font></div><div class=""><font class=""><span class=""> !!</span></font></div><div class=""><font class=""><span class=""> !! DESCRIPTION</span></font></div><div class=""><font class=""><span class=""> !!</span></font></div><div class=""><font class=""><span class=""> !! Clean up the Stir unit</span></font></div><div class=""><font class=""><span class=""> !!</span></font></div><div class=""><font class=""><span class=""> !!***</span></font></div><div class=""><font class=""><span class=""><br class=""></span></font></div><div class=""><font class=""><span class=""> subroutine Stir_finalize()</span></font></div><div class=""><font class=""><span class=""> use Stir_data, ONLY : st_randseed, st_reproducible, &</span></font></div><div class=""><font class=""><span class=""> st_saveReproducible, st_randomSaveUnit</span></font></div><div class=""><font class=""><span class=""> implicit none</span></font></div><div class=""><font class=""><span class=""> deallocate(st_randseed) !!!!!!!! This is the 25th line.</span></font></div><div class=""><font class=""><span class=""> if(st_reproducible.or.st_saveReproducible)&</span></font></div><div class=""><font class=""><span class=""> close(unit=st_randomSaveUnit)</span></font></div><div class=""><font class=""><span class=""> return</span></font></div><div class=""><font class=""><span class=""> end subroutine Stir_finalize</span></font></div></div><div class=""><font class=""><span class=""><br class=""></span></font></div><div class=""><font class=""><span class=""><br class=""></span></font></div><div class=""><font class=""><span class="">I have updated the log file for you to check my work. If someone met the some questions, let me know. </span></font></div><div class=""></div></div></div></blockquote></div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""></div></div></div></blockquote></div><br class=""></div></div></blockquote></div></div>
</div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>