<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I would talk to the system administrators about that. There is
      definitely something wrong with your compiler install if you can't
      find math.h.</p>
    <p>--Steve<br>
    </p>
    <div class="moz-cite-prefix">On 5/11/2023 2:02 AM, Shamim Haque
      1910511 wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHrQTHX37Y3Vqf8dK5frZU=O0nMyfBV3-mpFuVwv36XKpoAPmA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div class="gmail_default" style="color:#000000">Dear Steve,</div>
        <div class="gmail_default" style="color:#000000"><br>
        </div>
        <div class="gmail_default" style="color:#000000">I just
          rechecked the cpp program to output M_PI in the computing
          nodes, and that is not working right now, which was somehow
          working fine a few days ago. I also tried different gcc
          versions (4.8, 10.2, 11.1, gnu8/8.3) available in the cluster.
          All report similar issue:</div>
        <div class="gmail_default" style=""><font color="#a64d79"><br>
          </font></div>
        <div class="gmail_default" style=""><font color="#a64d79">prog.cpp:1:18:
            fatal error: math.h: No such file or directory<br>
             #include <math.h><br>
                              ^<br>
            compilation terminated.</font><br>
        </div>
        <div class="gmail_default" style="color:#000000"><br>
        </div>
        <div class="gmail_default" style="color:#000000">----OR-----</div>
        <div class="gmail_default" style="color:#000000"><br>
        </div>
        <font color="#741b47">/home/apps/gcc-10.2.0/include/c++/10.2.0/x86_64-pc-linux-gnu/bits/os_defines.h:39:10:
          fatal error: features.h: No such file or directory<br>
             39 | #include <features.h><br>
                |          ^~~~~~~~~~~~<br>
        </font>
        <div class="gmail_default" style=""><font color="#741b47">compilation
            terminated. </font></div>
        <div class="gmail_default" style="color:#000000"><br>
        </div>
        <div class="gmail_default" style="color:#000000">The cpp code
          seems to work fine in login node, as it gives out the value of
          pi upon execution. I am contacting the hpc admin to resolve
          this issue.<br>
        </div>
        <div class="gmail_default" style="color:#000000"><br>
        </div>
        <div class="gmail_default" style="color:#000000">I am attaching
          the test code (prog.cpp), the sbatch jobscript (prog.sh) and
          the output file (slurn-117473.out), if you would like to have
          a look at it. </div>
        <div class="gmail_default" style="color:#000000"><br>
        </div>
        <div class="gmail_default" style="color:#000000">Please let me
          know if I should try something different to get this working.</div>
        <div class="gmail_default" style="color:#000000"><br>
        </div>
        <div class="gmail_default" style="color:#000000">Regards</div>
        <div>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div>
                        <div dir="ltr"><font color="#666666">Shamim
                            Haque</font></div>
                        <div dir="ltr"><font color="#666666">Senior
                            Research Fellow (SRF)<br>
                          </font>
                          <div><font color="#666666">Department of
                              Physics</font></div>
                          <div><font color="#666666">IISER Bhopal</font></div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br>
      </div>
      <div hspace="streak-pt-mark" style="max-height:1px"><img alt=""
          style="width:0px;max-height:0px;overflow:hidden"
src="https://mailfoogae.appspot.com/t?sender=ac2hhbWltc0BpaXNlcmIuYWMuaW4%3D&type=zerocontent&guid=0ca27c5f-755d-404e-b557-4e273af4c438"
          moz-do-not-send="true"><font size="1" color="#ffffff">ᐧ</font></div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, May 8, 2023 at 7:25 PM
          Shamim Haque 1910511 <<a href="mailto:shamims@iiserb.ac.in"
            moz-do-not-send="true" class="moz-txt-link-freetext">shamims@iiserb.ac.in</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">
            <div class="gmail_default" style="color:rgb(0,0,0)">Thanks
              Steve. I'll make the changes and try again. I'll let you
              know the outcome.</div>
            <div class="gmail_default" style="color:rgb(0,0,0)"><br>
            </div>
            <div class="gmail_default" style="color:rgb(0,0,0)">Regards</div>
            <div>
              <div dir="ltr">
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div>
                            <div dir="ltr"><font color="#666666">Shamim
                                Haque</font></div>
                            <div dir="ltr"><font color="#666666">Senior
                                Research Fellow (SRF)<br>
                              </font>
                              <div><font color="#666666">Department of
                                  Physics</font></div>
                              <div><font color="#666666">IISER Bhopal</font></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <br>
          </div>
          <div hspace="streak-pt-mark" style="max-height:1px"><img
              alt="" style="width: 0px; max-height: 0px; overflow:
              hidden;"
src="https://mailfoogae.appspot.com/t?sender=ac2hhbWltc0BpaXNlcmIuYWMuaW4%3D&type=zerocontent&guid=8300c5fb-d33c-4fc6-99fc-de1349e8d3a7"
              moz-do-not-send="true"><font size="1" color="#ffffff">ᐧ</font></div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Mon, May 8, 2023 at
              7:21 PM Steven R. Brandt <<a
                href="mailto:sbrandt@cct.lsu.edu" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">sbrandt@cct.lsu.edu</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>
                <p>That tends to make me think you aren't using the
                  compiler you think you're using. You could put full
                  paths in the .cfg files and recompile from scratch.</p>
                <p>i.e.</p>
                <p>CXX = /full/path/to/icc<br>
                </p>
                <p>--Steve<br>
                </p>
                <div>On 5/3/2023 3:26 PM, Shamim Haque 1910511 wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_default" style="color:rgb(0,0,0)">Yes,
                      this gives the value of Pi successfully, before
                      starting the compilation:</div>
                    <div class="gmail_default" style="color:rgb(0,0,0)"><br>
                    </div>
                    <div class="gmail_default"><i><font color="#741b47">/home/vkerni.iitr/sam/trial<br>
                          3.141593<br>
                          Current machine: paramganga3<br>
                          Using configuration: sim<br>
                          Reconfiguring sim<br>
                          Writing configuration to:
                          /home/vkerni.iitr/sam/ET_debug/Cactus/configs/sim/OptionList<br>
                          Cactus - version: 4.12.0<br>
                          Reconfiguring sim.<br>
                        </font></i></div>
                    <div class="gmail_default"><i><font color="#741b47">.</font></i></div>
                    <div class="gmail_default"><i><font color="#741b47">.</font></i></div>
                    <div class="gmail_default"><i><font color="#741b47">.</font></i></div>
                    <div class="gmail_default"><i><font color="#741b47">checking
                          for M_PI... no<br>
                          configure: error: M_PI not defined. Try adding
                          -D_XOPEN_SOURCE to CPPFLAGS.<br>
                          <br>
                          Error reconfiguring sim-config<br>
                          make: *** [sim-config] Error 2<br>
                        </font></i></div>
                    <div class="gmail_default" style="color:rgb(0,0,0)"><br>
                    </div>
                    <div class="gmail_default" style="color:rgb(0,0,0)"><br>
                    </div>
                    <div>
                      <div dir="ltr">
                        <div dir="ltr">
                          <div>
                            <div dir="ltr">
                              <div>
                                <div dir="ltr">
                                  <div>
                                    <div dir="ltr"><font color="#666666">Shamim
                                        Haque</font></div>
                                    <div dir="ltr"><font color="#666666">Senior
                                        Research Fellow (SRF)<br>
                                      </font>
                                      <div><font color="#666666">Department
                                          of Physics</font></div>
                                      <div><font color="#666666">IISER
                                          Bhopal</font></div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <br>
                  </div>
                  <div hspace="streak-pt-mark" style="max-height:1px"><img
                      alt="" style="width: 0px; max-height: 0px;
                      overflow: hidden;"
src="https://mailfoogae.appspot.com/t?sender=ac2hhbWltc0BpaXNlcmIuYWMuaW4%3D&type=zerocontent&guid=28bde246-ec6f-40d6-a14a-db5a69e43648"
                      moz-do-not-send="true"><font size="1"
                      color="#ffffff">ᐧ</font></div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">On Thu, May 4,
                      2023 at 12:29 AM Steven Brandt <<a
                        href="mailto:sbrandt@cct.lsu.edu"
                        target="_blank" moz-do-not-send="true"
                        class="moz-txt-link-freetext">sbrandt@cct.lsu.edu</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>
                        <p>So, sanity check, can you compile the
                          following program outside of Cactus?<br>
                        </p>
                        <p>#include <math.h><br>
                          #include <stdio.h><br>
                          <br>
                          int main() {<br>
                              printf("%f\n", M_PI);<br>
                              return 0;<br>
                          }</p>
                        <div>On 5/3/2023 1:50 PM, Shamim Haque 1910511
                          wrote:<br>
                        </div>
                        <blockquote type="cite">
                          <div dir="ltr">
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)">Dear Steve,</div>
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)"><br>
                            </div>
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)">I tried gcc (10
                              and 11) as well and I am stuck with the
                              following error:</div>
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)"><i>configure:
                                error: M_PI not defined. Try adding
                                -D_XOPEN_SOURCE to CPPFLAGS.</i><br>
                            </div>
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)"><i><br>
                              </i></div>
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)">This also
                              happened for Intel (2020 and 2019). I
                              have attached both the output files here. </div>
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)"><br>
                            </div>
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)">Please ignore the
                              out file in the first email, I have
                              uploaded another out file by mistake. The
                              rest of the files are correct in the first
                              mail.</div>
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)"><br>
                            </div>
                            <div class="gmail_default"
                              style="color:rgb(0,0,0)">Regards</div>
                            <div>
                              <div dir="ltr">
                                <div dir="ltr">
                                  <div>
                                    <div dir="ltr">
                                      <div>
                                        <div dir="ltr">
                                          <div>
                                            <div dir="ltr"><font
                                                color="#666666">Shamim
                                                Haque</font></div>
                                            <div dir="ltr"><font
                                                color="#666666">Senior
                                                Research Fellow (SRF)<br>
                                              </font>
                                              <div><font color="#666666">Department
                                                  of Physics</font></div>
                                              <div><font color="#666666">IISER
                                                  Bhopal</font></div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                            <br>
                          </div>
                          <div hspace="streak-pt-mark"
                            style="max-height:1px"><img alt=""
                              style="width: 0px; max-height: 0px;
                              overflow: hidden;"
src="https://mailfoogae.appspot.com/t?sender=ac2hhbWltc0BpaXNlcmIuYWMuaW4%3D&type=zerocontent&guid=d9c5b90b-da99-4e24-9a38-d462462c4010"
                              moz-do-not-send="true"><font size="1"
                              color="#ffffff">ᐧ</font></div>
                          <br>
                          <div class="gmail_quote">
                            <div dir="ltr" class="gmail_attr">On Wed,
                              May 3, 2023 at 8:04 PM Steven Brandt <<a
                                href="mailto:sbrandt@cct.lsu.edu"
                                target="_blank" moz-do-not-send="true"
                                class="moz-txt-link-freetext">sbrandt@cct.lsu.edu</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>
                                <p>I notice from the output that your
                                  compiler claims "limits.h" is missing.
                                  Possibly there's something wrong with
                                  your icc setup? Maybe you should try
                                  using gcc / gfortran instead.</p>
                                <p>--Steve<br>
                                </p>
                                <div>On 5/3/2023 8:20 AM, Shamim Haque
                                  1910511 wrote:<br>
                                </div>
                                <blockquote type="cite">
                                  <div dir="ltr">
                                    <div class="gmail_default"
                                      style="color:rgb(0,0,0)">Dear
                                      Frank,</div>
                                    <div class="gmail_default"
                                      style="color:rgb(0,0,0)"><br>
                                    </div>
                                    <div class="gmail_default"
                                      style="color:rgb(0,0,0)">I added
                                      the alias pattern for the
                                      computing nodes and now ETK can
                                      detect the cluster (checked by
                                      asking "whoami") during the batch
                                      queuing. I'll get in touch with
                                      the admins to include 'patch'.</div>
                                    <div class="gmail_default"
                                      style="color:rgb(0,0,0)"><br>
                                    </div>
                                    <div class="gmail_default"
                                      style="color:rgb(0,0,0)">However,
                                      the problem still persists, having
                                      assured that the correct machine
                                      file and option list are being
                                      used during the compilation.</div>
                                    <div class="gmail_default"
                                      style="color:rgb(0,0,0)"><br>
                                    </div>
                                    <div class="gmail_default"
                                      style="color:rgb(0,0,0)">Regards</div>
                                    <div>
                                      <div dir="ltr">
                                        <div dir="ltr">
                                          <div>
                                            <div dir="ltr">
                                              <div>
                                                <div dir="ltr">
                                                  <div>
                                                    <div dir="ltr"><font
                                                        color="#666666">Shamim
                                                        Haque</font></div>
                                                    <div dir="ltr"><font
                                                        color="#666666">Senior
                                                        Research Fellow
                                                        (SRF)<br>
                                                      </font>
                                                      <div><font
                                                          color="#666666">Department
                                                          of Physics</font></div>
                                                      <div><font
                                                          color="#666666">IISER
                                                          Bhopal</font></div>
                                                    </div>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                    <br>
                                  </div>
                                  <div hspace="streak-pt-mark"
                                    style="max-height:1px"><img alt=""
                                      style="width: 0px; max-height:
                                      0px; overflow: hidden;"
src="https://mailfoogae.appspot.com/t?sender=ac2hhbWltc0BpaXNlcmIuYWMuaW4%3D&type=zerocontent&guid=b5fe154b-caf8-4a63-ba13-0a414354c237"
                                      moz-do-not-send="true"><font
                                      size="1" color="#ffffff">ᐧ</font></div>
                                  <br>
                                  <div class="gmail_quote">
                                    <div dir="ltr" class="gmail_attr">On
                                      Wed, May 3, 2023 at 3:49 PM Frank
                                      Loeffler <<a
                                        href="mailto:frank.loeffler@uni-jena.de"
                                        target="_blank"
                                        moz-do-not-send="true"
                                        class="moz-txt-link-freetext">frank.loeffler@uni-jena.de</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">Hi
                                      Shamim<br>
                                      <br>
                                      On Wed, May 03, 2023 at 03:11:49PM
                                      +0530, Shamim Haque 1910511 wrote:<br>
                                      >We are trying to compile ETK
                                      on ParamGanga at IIT Roorkee. The
                                      <br>
                                      >compilation<br>
                                      >stops at a very initial step
                                      and gives out the error:<br>
                                      ><br>
                                      >*checking whether the Fortran
                                      compiler (gfortran  ) works...
                                      yeschecking<br>
                                      >whether the Fortran compiler
                                      (gfortran  ) is a
                                      cross-compiler... nochecking<br>
                                      >whether the Fortran compiler
                                      (gfortran  ) supports TYPE(*) for<br>
                                      >CCTK_PointerTo... yeschecking
                                      how to run the C preprocessor...
                                      cppchecking<br>
                                      >for ANSI C header files...
                                      nochecking for C99 features...
                                      yeschecking for<br>
                                      >M_PI... noconfigure: error:
                                      M_PI not defined. Try adding
                                      -D_XOPEN_SOURCE to<br>
                                      >CPPFLAGS.*<br>
                                      ><br>
                                      >We tried adding
                                      -D_XOPEN_SOURCE to CPPFLAGS, but
                                      it does not help. This<br>
                                      >error is consistent if we set
                                      up using Intel Compiler (2020 or
                                      2019), or<br>
                                      >gcc (11 or 10). I have
                                      attached the outfile, error file,
                                      machine script,<br>
                                      >and option lists for both
                                      cases (Intel and gcc) for any
                                      reference.<br>
                                      ><br>
                                      >Secondly, we are not allowed
                                      to compile ETK on login nodes. So
                                      we are<br>
                                      >queuing a job script, which
                                      upon execution, enters the Cactus
                                      directory,<br>
                                      >does "setup-silent", and then
                                      executes the build command. Is
                                      this the right<br>
                                      >way to compile ETK using the
                                      batch script? Or should we do
                                      something<br>
                                      >different? I have attached the
                                      shell script (compile.sh) used for
                                      sbatch<br>
                                      >queue for reference.<br>
                                      <br>
                                      I might be wrong, but setup-silent
                                      will not use your machine file
                                      which <br>
                                      contains all the compiler flags,
                                      but will setup something "from
                                      scratch" <br>
                                      instead. According to the logs,
                                      this will be, e.g., in<br>
                                      <br>
/home/shamims.iiserb/ET_debug/Cactus/repos/simfactory2/mdb/machines/cn139.iitr.ac.in.ini<br>
                                      <br>
                                      My guess would be that this misses
                                      the compiler flags necessary to
                                      have <br>
                                      M_PI defined. The best way to get
                                      this working might be to let <br>
                                      simfactory also detect the cluster
                                      configuration on the compute nodes
                                      <br>
                                      (where you compile), such that
                                      setup-silent is not needed, but
                                      instead <br>
                                      the correct cluster configuration
                                      is found and used automatically.
                                      In <br>
                                      order to do that, look at examples
                                      of 'aliaspattern' in the
                                      mdb/machines <br>
                                      directory. An alternative would be
                                      to tell simfactory specifically
                                      that <br>
                                      you want to use your machine
                                      configuration file.<br>
                                      <br>
                                      As a side-note: I noticed the
                                      command 'patch' is missing too.
                                      This is a <br>
                                      tool so common that it should be
                                      installed everywhere. Your admin
                                      is <br>
                                      probably the best person to ask
                                      for advise here. It should not be
                                      too <br>
                                      hard to install yourself, but that
                                      should not be necessary either, <br>
                                      especially when you are told to
                                      compile on compute nodes.<br>
                                      <br>
                                      Frank<br>
                                      <br>
                                    </blockquote>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@einsteintoolkit.org" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">Users@einsteintoolkit.org</a>
<a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">http://lists.einsteintoolkit.org/mailman/listinfo/users</a>
</pre>
                                </blockquote>
                              </div>
_______________________________________________<br>
                              Users mailing list<br>
                              <a href="mailto:Users@einsteintoolkit.org"
                                target="_blank" moz-do-not-send="true"
                                class="moz-txt-link-freetext">Users@einsteintoolkit.org</a><br>
                              <a
                                href="http://lists.einsteintoolkit.org/mailman/listinfo/users"
                                rel="noreferrer" target="_blank"
                                moz-do-not-send="true"
                                class="moz-txt-link-freetext">http://lists.einsteintoolkit.org/mailman/listinfo/users</a><br>
                            </blockquote>
                          </div>
                        </blockquote>
                      </div>
                    </blockquote>
                  </div>
                </blockquote>
              </div>
            </blockquote>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>