Installation Issues


In Environ v 1.0 there is an issue with the installation procedure for codes different from pw.x. The problem seems to depend on the compiler, actually on the linker, but it is present with the most common Intel Fortran compiler. The solution for this problem requires some more work, which is described here. This issue is going to be fixed in the next releases.


The issue is due to the fact that modules in the code will depend on Environ modules, that are stored in the Modules directory. On the other hand, Environ modules may also depend on PW/src modules. The modules are all there, but some linkers only look for dependencies inside the libraries that are written afterward. In this case, since we have this circular dependence, the best solution that we found is to have the PW/src modules both before and after the Modules/ modules when linking. 


In practical terms this means the following. In the Makefiles of the codes for which the compilation with Environ fails there will be these variables:


PWOBJS = some-path/PW/src/libpw.a
QEMODS = some-path/Modules/libquemod.a  some-more-libraries.a


To fix the fact that Environ modules depend on PW modules, the solution is to add at the end of the QEMODS variable the same line as the PWOBJS variable


QEMODS = some-path/Modules/libquemod.a  some-more-libraries.a  some-path/PW/src/libpw.a


This hack is probably needed for many codes, if you want to compile all the tools. In particular, I guess you need to do this trick for 


PHonon/FD/Makefile
PHonon/Gamma/Makefile
PHonon/PH/Makefile
PWCOND/src/Makefile
TDDFPT/src/Makefile
XSpectra/src/Makefile
GWW/bse/Makefile
GWW/head/Makefile
GWW/pw4gww/Makefile


In CPV/src/Makefile the trick is slightly different, as CP does not depend on PW/src modules and it has its own versions of the modules that are searched by Environ. In this case the modification is the following


QEMODS=../../Modules/libqemod.a


should become 


QEMODS=../../Modules/libqemod.a libcp.a
‚Äč