<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>That <font color="#ff6600">warning message</font> which occurs
      in WIEN2k 18.2 (and 18.1) with the ifort compiler means the -lm
      flag should not come before the object (.o) files:<br>
    </p>
    <p>username@computername:~$ cd $WIENROOT/SRC_cif2struct<br>
      username@computername:~/WIEN2k/SRC_cif2struct$ tail -2 compile.msg
      <br>
      ifort -o ./cif2struct  -O1 -FR -mp1 -w -prec_div -pc80 -pad -ip
      -DINTEL_VML -traceback -assume buffered_io
      -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include
      -L/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/ -lpthread <font
        color="#ff0000">-lm</font> -ldl -liomp5 <font color="#ff0000">module.o
        spacegroup.o getlattype.o getsgnum.o getsgname.o  getzz.o
        structgen.o scan_cif.o ciftbx.o hash_funcs.o test_sgname.o
        scan_in.o</font><br>
      <font color="#ff6600">ifort: warning #10315: specifying -lm before
        files may supersede the Intel(R) math library and affect
        performance</font><br>
    </p>
    <p>If you swap "$(LDFLAGS) $(OBJS)" and "$(OBJS) $(LDFLAGS)" in the
      Makefile.orig in the SRC_cif2struct folder using the following
      WIEN2k 18.2 patch file (and update the Makefile with siteconfig),
      it should fix it so that -lm comes after the object files and
      remove the warning:</p>
    <p>username@computername:~/WIEN2k/SRC_cif2struct$ wget
<a class="moz-txt-link-freetext" href="https://raw.githubusercontent.com/gsabo/WIEN2k-Patches/master/18.2/Makefile.orig.patch">https://raw.githubusercontent.com/gsabo/WIEN2k-Patches/master/18.2/Makefile.orig.patch</a><br>
      ...<br>
      username@computername:~/WIEN2k/SRC_cif2struct$ patch -b
      Makefile.orig Makefile.orig.patch <br>
      patching file Makefile.orig<br>
      username@computername:~/WIEN2k/SRC_cif2struct$ cd ..<br>
      username@computername:~/WIEN2k$ ./siteconfig<br>
      ...<br>
        Selection: O<br>
      ...<br>
      Selection: S<br>
      ...<br>
        Selection: R<br>
      ...<br>
           Selection: S<br>
         Which program to recompile? cif2struct<br>
      ...<br>
        Selection: Q<br>
      ...<br>
      username@computername:~/WIEN2k$ cd SRC_cif2struct/<br>
      username@computername:~/WIEN2k/SRC_cif2struct$ tail -2 compile.msg
      <br>
      ifort -c -O1 -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML
      -traceback -assume buffered_io
      -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include scan_in.f<br>
      ifort -o ./cif2struct  <font color="#006600">module.o
        spacegroup.o getlattype.o getsgnum.o getsgname.o  getzz.o
        structgen.o scan_cif.o ciftbx.o hash_funcs.o test_sgname.o
        scan_in.o</font> -O1 -FR -mp1 -w -prec_div -pc80 -pad -ip
      -DINTEL_VML -traceback -assume buffered_io
      -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include
      -L/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/ -lpthread <font
        color="#006600">-lm</font> -ldl -liomp5<br>
    </p>
    <div class="moz-cite-prefix">On 7/7/2018 1:29 PM, Dr. K. C. Bhamu
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJYci+RhkMwBLk_QUX+DaBoBQvOE63KciofvKYBKmV09oxnBsg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div>Now, I tried to install latest version of Wien2k on a
          cluster with mpiifort and fftw3 and getting below warning
          during installation:</div>
        <div><br>
        </div>
        <div><b>ifort: warning #10315: specifying -lm before files may
            supersede the Intel(R) math library and affect performance</b></div>
        <div><br>
        </div>
        <div>I have below setting.</div>
        <div><br>
        </div>
        <div class="gmail_extra">$(FOPT)
          -L$(MKLROOT)/lib/$(MKL_TARGET_ARCH) -lpthread -lm -ldl -liomp5</div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">Should I remove -lm or can continue?</div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">I do not see any warning or error
          message at the  end of installation.</div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">mkl version is 2013.<br>
        </div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">Kind regards</div>
        <div class="gmail_extra">Bhamu<br>
        </div>
      </div>
    </blockquote>
  </body>
</html>