Test suite for pw2wannier90.x program of Quantum ESPRESSO.
- Modify file
environment_variables
(program paths and run commands)- In the first run, set
GENERATE_REFERENCE
to true to generate reference data. - In later runs, set
GENERATE_REFERENCE
to false to skip reference data generation.
- In the first run, set
- Run tests by
./run_tests.sh
- All tests (except library mode test) are run by default
- Specific tests can be run by passing the folder names (e.g.
./run_tests.sh fe gaas
) - SCDM tests can be run by calling
./run_tests.sh scdm
)
- To run the library mode tests, both the reference (
QE_REF
) and test (QE_TEST
) QE should be linked to the wannier library. (The instructions below are taken and modified based on https://gitlab.com/QEF/q-e/-/blob/develop/PP/examples/WAN90_example/README)- Type
make lib
in the Wannier90 root directory. - In the QE root directory, run
./configure
and modifymake.inc
as follows:
- Add
-D__WANLIB
to theMANUAL_DFLAGS
variable - Add a new variable
WANLIB
to specify location of Wannier library:WANLIB = -L/path/wannier90 -lwannier
- Add
$(WANLIB)
to theQELIBS
variable:QELIBS = $(MBD_LIBS) ... $(WANLIB)
- Compile QE
- Type
- I had to change
character(len=*)
in line 83 ofwannier_lib.F90
tocharacter(len=3)
to make QE run. I do not understand why this change is needed...
- To compute the coverage, follow these steps. Note that you should use GNU compilers.
- Add
-fprofile-arcs -ftest-coverage
to the compilation command and add-lgcov --coverage
to the linking command (only forpw2wannier90
). Compile the program. - Run tests.
- To obtain coverage for reference QE, one needs to set
GENERATE_REFERENCE=true
- Go to directory
coverage
and run./create_coverage.sh
. - Inspect
output/index.html
.
- Add
- Code coverage for my refactoring of pw2wannier90.x (https://gitlab.com/jmlihm/q-e/-/tree/pw2wan) is available here.
- ref QE (QE develop branch as of 2021.11.23)
- new QE (my refactoring of pw2wannier90.x (https://gitlab.com/jmlihm/q-e/-/tree/pw2wan))
- new QE serial (my refactoring of pw2wannier90.x compiled without MPI (https://gitlab.com/jmlihm/q-e/-/tree/pw2wan))
- The source HTML file is
coverage/output/index.html
andcoverage/output_ref/index.html
.
- Requires python3 and python3 modules fortio and termcolor.
- I cound not run library mode with gcc (even after the change noted above) due to the error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7f081d03e2ed in ???
#1 0x7f081d03d503 in ???
#2 0x7f081c49bf1f in ???
#3 0x7f081c5ebcf4 in ???
#4 0x55714363e11a in wannier_setup_
at ../wannier_lib.F90:114
#5 0x55714308213b in setup_nnkp_
at /home/jmlihm/program/qe-dev-gcc/PP/src/pw2wannier90.f90:605
#6 0x5571430a6e4d in pw2wannier90
at /home/jmlihm/program/qe-dev-gcc/PP/src/pw2wannier90.f90:470
#7 0x55714306f48e in main
at /home/jmlihm/program/qe-dev-gcc/PP/src/pw2wannier90.f90:102