[Wien] wien2k_18 [-lm warning]

Gavin Abo gsabo at crimson.ua.edu
Wed Aug 8 05:43:52 CEST 2018


That warning message 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:

username at computername:~$ cd $WIENROOT/SRC_cif2struct
username at computername:~/WIEN2k/SRC_cif2struct$ tail -2 compile.msg
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 -lm -ldl 
-liomp5 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
ifort: warning #10315: specifying -lm before files may supersede the 
Intel(R) math library and affect performance

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:

username at computername:~/WIEN2k/SRC_cif2struct$ wget 
https://raw.githubusercontent.com/gsabo/WIEN2k-Patches/master/18.2/Makefile.orig.patch
...
username at computername:~/WIEN2k/SRC_cif2struct$ patch -b Makefile.orig 
Makefile.orig.patch
patching file Makefile.orig
username at computername:~/WIEN2k/SRC_cif2struct$ cd ..
username at computername:~/WIEN2k$ ./siteconfig
...
   Selection: O
...
Selection: S
...
   Selection: R
...
      Selection: S
    Which program to recompile? cif2struct
...
   Selection: Q
...
username at computername:~/WIEN2k$ cd SRC_cif2struct/
username at computername:~/WIEN2k/SRC_cif2struct$ tail -2 compile.msg
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
ifort -o ./cif2struct 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 -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 -lm -ldl -liomp5

On 7/7/2018 1:29 PM, Dr. K. C. Bhamu wrote:
> Now, I tried to install latest version of Wien2k on a cluster with 
> mpiifort and fftw3 and getting below warning during installation:
>
> *ifort: warning #10315: specifying -lm before files may supersede the 
> Intel(R) math library and affect performance*
>
> I have below setting.
>
> $(FOPT) -L$(MKLROOT)/lib/$(MKL_TARGET_ARCH) -lpthread -lm -ldl -liomp5
>
>
> Should I remove -lm or can continue?
>
> I do not see any warning or error message at the  end of installation.
>
>
> mkl version is 2013.
>
> Kind regards
> Bhamu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20180807/47f5a25b/attachment.html>


More information about the Wien mailing list