Error while compiling Wannier90

This section is dedicated to compilation problems

Moderator: stiwari

Post Reply
Antonius
Posts: 2
Joined: Thu Jun 15, 2017 1:05 am
Affiliation:

Error while compiling Wannier90

Post by Antonius »

Dear all,
I have carefully followed the steps to compile EPW from the qe-6.1 package. However, the compilation stops during the last step (make epw) while trying to compile the wannier90 library. The compilation stops with:

Code: Select all

touch uncompress-w90
cd ../W90 ; \
   if (test -e ../install/make_wannier90.sys) || (test -d ../W90); then \
   (cp ../install/make_wannier90.inc ../W90/make.inc); fi
touch ./configure-w90
if test -d ../W90; then \
   cd ../W90; /Applications/Xcode.app/Contents/Developer/usr/bin/make || exit 1; cd ../bin; ln -fs ../W90/wannier90.x . ; fi
make[5]: *** No targets specified and no makefile found.  Stop.
make[4]: *** [w90] Error 1
make[3]: *** [w90] Error 1
make[3]: *** No rule to make target `lib'.  Stop.
make[2]: *** [wannier] Error 2
make[1]: *** [epw] Error 2
make: *** [epw] Error 1


The directory W90 is a symbolic link that points to the unzipped directory wannier90-2.1.0 . The content of this directory is the following:

Code: Select all

> ls -1 wannier90-2.1.0/
LICENSE
make.inc
pwscf
test-suite
utility


It seems like the build script expected a Makefile in that directory. Any suggestion to fix this?
Thanks.

sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: Error while compiling Wannier90

Post by sponce »

Hello Gab,

Could you try the following during step 4 of http://epw.org.uk/Main/DownloadAndInstall

cd ../../

make pwall

make ph

cd EPW/src

make (so directly inside the src file of EPW)

You can then do

cd ../../

make EPW

to get the binary inside the QE/bin folder if you want or directly use the binary from EPW/src/epw.x

Let me know if this works for you.

Best,

Samuel
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com

Antonius
Posts: 2
Joined: Thu Jun 15, 2017 1:05 am
Affiliation:

Re: Error while compiling Wannier90

Post by Antonius »

Hi Sam,
This procedure did not solve the problem, but I think I found a work around. I downloaded Wannier90 on its own and extracted the package inside qe-6.1, so now the directory wannier90-2.1.0 seems to have all the important files, including the Makefile and the src directory.

The compilation of wannier90 went through, but then I encountered a different problem. The compilation stopped with

Code: Select all

mpif90 -g -pthread -o epw.x \
   epw.o  libepw.a   ../../PHonon/PH/libph.a ../../LR_Modules/liblrmod.a ../../wannier90-2.1.0/libwannier.a  ../../PW/src/libpw.a ../../Modules/libqemod.a ../../FFTXlib/libqefft.a ../../LAXlib/libqela.a ../../clib/clib.a ../../iotk/src/libiotk.a  -llapack  -lblas  -L/usr/local/Cellar/fftw/3.3.6-pl2/lib -lfftw3  -lblas    -L/usr/local/Cellar/hdf5/1.10.1/lib/ -lhdf5 
duplicate symbol _main in:
    epw.o
    libepw.a(epw.o)
ld: 1 duplicate symbol for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [epw.x] Error 1
make[1]: *** [epw] Error 2
make: *** [epw] Error 1


I solved this problem by editing the file EPW/src/Makefile and removing epw.o from the list of EPWOBJS that are used to generate the library. Then the compilation succeded.

Thanks,
Gabriel

sponce
Site Admin
Posts: 616
Joined: Wed Jan 13, 2016 7:25 pm
Affiliation: EPFL

Re: Error while compiling Wannier90

Post by sponce »

Hello,

Something must have gone wrong during the download of the Wannier90 tar file since it should be the same link as when you do a direct download from their website.

Glad to hear that you solved it.

I have removed the duplicated "epw.o" in EPWOJBS. Thank you!.

Best,

Samuel
Prof. Samuel Poncé
Chercheur qualifié F.R.S.-FNRS / Professeur UCLouvain
Institute of Condensed Matter and Nanosciences
UCLouvain, Belgium
Web: https://www.samuelponce.com

Post Reply