<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    Actually, you can increase MAXBLOCK without running setup again. I
    do it all the time. However, what Sean says is of course the more
    proper thing to do.<br>
    <br>
    Still, if you are like me such that it feels like running setup
    again is a ton of work, you can do the following. There are two
    places where you need to change this value in Flash.h and Makefile.
    Do it manually an then recompile, i.e., "make" the code again. It
    will automatically recompile everything as it notices something
    major has changed.<br>
    <br>
    You can also use my script. Just running this script and giving new
    value should change maxblocks. Btw. I am in no way responsible if it
    doesn't work out :)<br>
    <br>
    Best,<br>
    Seyit<br>
    <br>
    <br>
    <br>
    #!/bin/bash<br>
    <br>
    declare filea=Makefile<br>
    declare fileb=Flash.h<br>
    <br>
    read nblocks<br>
    <br>
    echo <br>
    echo <br>
    echo 'Files to be changed:' $filea $fileb<br>
    echo 'new nblocks:' $nblocks<br>
    <br>
    sed -i -e s/"DMAXBLOCKS=[0-9]*"/"DMAXBLOCKS=$nblocks"/g $filea<br>
    sed -i -e s/"define MAXBLOCKS [0-9]*"/"define MAXBLOCKS $nblocks"/g
    $fileb<br>
    <br>
    make clean<br>
    make -j 3<br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 28/08/15 18:02, Slavin, Jonathan
      wrote:<br>
    </div>
    <blockquote
cite="mid:CACcRS=c2C+T2bfmVFMJRruH1iZppeJL080b3EPTypztSOvjzsA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">The issue is
          that "just running setup again" means, I think, that you start
          over with some pre-defined simulation and lose all the bits
          you changed.  Or maybe I'm misunderstanding how setup works. 
          Isn't the reason for having MAXBLOCKS in a header file that it
          can be taken from there for all the files that use it?  If
          not, it would be multiply defined, which would be bad
          practice.</div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif"><br>
        </div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">Jon</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Aug 28, 2015 at 11:55 AM, Sean
          Couch <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:smc@flash.uchicago.edu" target="_blank">smc@flash.uchicago.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div style="word-wrap:break-word">Argh.  Don’t do that. 
              Flash.h should not be edited as it may cause unexpected
              side effects.  AAAND, you will have to recompile the code
              anyway so that the new value of MAXBLOCKS is used.  Since
              MAXBLOCKS appears in a ton of code, the cost of just
              running setup again is not that much more.<span
                class="HOEnZb"><font color="#888888">
                  <div><br>
                  </div>
                  <div>Sean</div>
                </font></span>
              <div>
                <div class="h5">
                  <div><br>
                    <div>
                      <blockquote type="cite">
                        <div>On Aug 28, 2015, at 11:50 AM, Slavin,
                          Jonathan <<a moz-do-not-send="true"
                            href="mailto:jslavin@cfa.harvard.edu"
                            target="_blank">jslavin@cfa.harvard.edu</a>>
                          wrote:</div>
                        <br>
                        <div>
                          <div dir="ltr">
                            <div class="gmail_default"
                              style="font-family:arial,helvetica,sans-serif">Hi
                              Nasiri,</div>
                            <div class="gmail_default"
                              style="font-family:arial,helvetica,sans-serif"><br>
                            </div>
                            <div class="gmail_default"
                              style="font-family:arial,helvetica,sans-serif">I
                              wondered about that.  I saw that it was
                              set there, but wondered if doing that
                              would cause some other problems.  In the
                              User's Guide it says "The Flash.h file is
                              written by the setup script and should not
                              be modified by the user."  I don't know
                              why that should be.</div>
                            <div class="gmail_default"
                              style="font-family:arial,helvetica,sans-serif"><br>
                            </div>
                            <div class="gmail_default"
                              style="font-family:arial,helvetica,sans-serif">Jon</div>
                          </div>
                          <div class="gmail_extra"><br>
                            <div class="gmail_quote">On Fri, Aug 28,
                              2015 at 11:43 AM, Nasiri, Farshad <span
                                dir="ltr"><<a moz-do-not-send="true"
                                  href="mailto:fnasiri@email.gwu.edu"
                                  target="_blank">fnasiri@email.gwu.edu</a>></span>
                              wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex"><font
                                  size="2">You can modify that in
                                  Flash.h.<span></span></font>
                                <div>
                                  <div><br>
                                    <br>
                                    On Friday, August 28, 2015, Slavin,
                                    Jonathan <<a
                                      moz-do-not-send="true"
                                      href="mailto:jslavin@cfa.harvard.edu"
                                      target="_blank">jslavin@cfa.harvard.edu</a>>
                                    wrote:<br>
                                    <blockquote class="gmail_quote"
                                      style="margin:0 0 0
                                      .8ex;border-left:1px #ccc
                                      solid;padding-left:1ex">
                                      <div dir="ltr">
                                        <div class="gmail_default"
                                          style="font-family:arial,helvetica,sans-serif">Hi,</div>
                                        <div class="gmail_default"
                                          style="font-family:arial,helvetica,sans-serif"><br>
                                        </div>
                                        <div class="gmail_default"
                                          style="font-family:arial,helvetica,sans-serif">I'm
                                          pretty new to using FLASH. 
                                          I've run some simulations that
                                          started with the sedov setup,
                                          though I've modified the
                                          Simulation_initBlock.F90 and a
                                          few other files.  I ran into,
                                          what appears to be, a common
                                          problem, which is an MPI_Abort
                                          caused by a PARAMESH ERROR
                                          with the message (in
                                          amr.log): <span
                                            style="font-family:arial,helvetica,sans-serif">New
                                            block location exceeds
                                            MAXBLOCKS limit</span></div>
                                        <div class="gmail_default"
                                          style="font-family:arial,helvetica,sans-serif"> Suggestion:
                                          increase MAXBLOCKS or modify
                                          refinement criteria.</div>
                                        <div class="gmail_default"
                                          style="font-family:arial,helvetica,sans-serif"><br>
                                        </div>
                                        <div class="gmail_default"
                                          style="font-family:arial,helvetica,sans-serif">My
                                          question is, if I just want to
                                          increase MAXBLOCKS, can I do
                                          that without running setup
                                          again?  If so, how?  I'll note
                                          that I've been using flmake,
                                          which allows for use of a
                                          different directory other than
                                          "object".  Thanks in advance
                                          for any help.</div>
                                        <div class="gmail_default"
                                          style="font-family:arial,helvetica,sans-serif"><br>
                                        </div>
                                        <div class="gmail_default"
                                          style="font-family:arial,helvetica,sans-serif">Regards,</div>
                                        <div class="gmail_default"
                                          style="font-family:arial,helvetica,sans-serif">Jon</div>
                                        <div><br>
                                        </div>
                                        -- <br>
                                        <div>
                                          <div dir="ltr">
                                            <div>
                                              <div dir="ltr">________________________________________________________<br>
                                                Jonathan D.
                                                Slavin                
                                                Harvard-Smithsonian CfA<br>
                                                <a
                                                  moz-do-not-send="true">jslavin@cfa.harvard.edu</a>   
                                                   60 Garden Street, MS
                                                83<br>
                                                phone: <a
                                                  moz-do-not-send="true"
href="tel:%28617%29%20496-7981" value="+16174967981" target="_blank">(617)
                                                  496-7981</a>      
                                                Cambridge, MA 02138-1516<br>
                                                cell: <a
                                                  moz-do-not-send="true"
href="tel:%28781%29%20363-0035" value="+17813630035" target="_blank">(781)
                                                  363-0035</a>          
                                                  USA<br>
________________________________________________________<br>
                                                <br>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </blockquote>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                            <br>
                            <br clear="all">
                            <div><br>
                            </div>
                            -- <br>
                            <div>
                              <div dir="ltr">
                                <div>
                                  <div dir="ltr">________________________________________________________<br>
                                    Jonathan D. Slavin                
                                    Harvard-Smithsonian CfA<br>
                                    <a moz-do-not-send="true"
                                      href="mailto:jslavin@cfa.harvard.edu"
                                      target="_blank">jslavin@cfa.harvard.edu</a>   
                                       60 Garden Street, MS 83<br>
                                    phone: <a moz-do-not-send="true"
                                      href="tel:%28617%29%20496-7981"
                                      value="+16174967981"
                                      target="_blank">(617) 496-7981</a>   
                                       Cambridge, MA 02138-1516<br>
                                    cell: <a moz-do-not-send="true"
                                      href="tel:%28781%29%20363-0035"
                                      value="+17813630035"
                                      target="_blank">(781) 363-0035</a>
                                                USA<br>
________________________________________________________<br>
                                    <br>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                    <br>
                  </div>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">________________________________________________________<br>
                Jonathan D. Slavin                 Harvard-Smithsonian
                CfA<br>
                <a moz-do-not-send="true"
                  href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>   
                   60 Garden Street, MS 83<br>
                phone: (617) 496-7981       Cambridge, MA 02138-1516<br>
                cell: (781) 363-0035             USA<br>
                ________________________________________________________<br>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Dr. S. Hocuk
Postdoctoral reseacher
Center for Astrochemical Studies (CAS)
Max-Planck-Institute for Extraterrestrial physics (MPE)
Giessenbachstrasse, 85748 Garching
Tel: +49-8930000-3012
Fax: +49-8930000-3569
Web: <a class="moz-txt-link-abbreviated" href="http://www.mpe.mpg.de/~seyit">www.mpe.mpg.de/~seyit</a></pre>
  </body>
</html>