Skip to content

Commit

Permalink
Merge pull request #5 from sponce24/develop
Browse files Browse the repository at this point in the history
Adding the test-suite for Wannier90 (only 4 tests at present).
  • Loading branch information
giovannipizzi authored Sep 13, 2016
2 parents 81d5f2d + 74115a5 commit 03281d3
Show file tree
Hide file tree
Showing 61 changed files with 438,040 additions and 0 deletions.
1 change: 1 addition & 0 deletions test-suite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
userconfig
17 changes: 17 additions & 0 deletions test-suite/ENVIRONMENT
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) 2001-2016 Quantum ESPRESSO group
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License. See the file `License' in the root directory
# of the present distribution.
#
####################################################################################


export WANNIER_ROOT=${PWD}/../

export TESTCODE_DIR=${WANNIER_ROOT}/test-suite/testcode

# SP: Number of processor when run-tests-parallel
export TESTCODE_NPROCS=4
75 changes: 75 additions & 0 deletions test-suite/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Copyright (C) 2001-2016 Quantum ESPRESSO group
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License. See the file `License' in the root directory
# of the present distribution.
#
# Original: Filippo Spiga (filippo.spiga@quantum-espresso.org)
# Maintainer: Samuel Ponce
#
# Makefile to run regression numerical tests. Simple is good

include ./ENVIRONMENT

default :
@echo 'To run Wannier90 test-suite, type at the shell prompt:'
@echo ' '
@echo ' make target'
@echo ' '
@echo 'where <target> identifies an action'
@echo ' run-tests : run-tests-serial (default)'
@echo ' run-tests-serial : run all tests in SERIAL'
@echo ' run-tests-parallel : run all tests in PARALLEL (4 MPI)'
@echo ' compare : compare last output generated with reference'
@echo ' clean : clean output (our/err files) of all tests'
@echo ' '
@echo 'For additional advanced commands and settings please manually inspect'
@echo 'ENVIRONMENT and Makefile files'

prolog :
# @if [ ! -f userconfig ]; then \
sed "s|XXXXXX|$(WANNIER_ROOT)|g" < userconfig.tmp > userconfig; fi
@sed "s|XXXXXX|$(WANNIER_ROOT)|g" < userconfig.tmp > userconfig

run-tests : run-tests-serial

run-tests-serial : run-tests-wannier-serial

run-tests-parallel : run-tests-wannier-parallel

run-custom-test : run-custom-test-serial

run-tests-wannier-serial : prolog
env QE_USE_MPI=0 ${TESTCODE_DIR}/bin/testcode.py --verbose --category=wannier_all

run-tests-wannier-parallel : prolog
env QE_USE_MPI=1 ${TESTCODE_DIR}/bin/testcode.py --verbose --category=wannier_all

run-custom-test-serial : prolog
@if test -d $(testdir); then \
env QE_USE_MPI=0 ${TESTCODE_DIR}/bin/testcode.py --verbose --category=$(testdir) ; fi

run-custom-test-parallel : prolog
@if test -d $(testdir); then \
env QE_USE_MPI=1 ${TESTCODE_DIR}/bin/testcode.py --verbose --category=$(testdir) ; fi


compare : compare-cp compare-pw compare-epw

# All comparison outputs are, so far, generated only in SERIAL
create-reference : prolog
env QE_USE_MPI=0 ${TESTCODE_DIR}/bin/testcode.py --category=_default_ make-benchmarks

compare-wannier : prolog
${TESTCODE_DIR}/bin/testcode.py --category=wannier_all --verbose compare 2>&1 | tee out.WANNIER90.`date +%Y%m%d_%H%M%S`

clean:
@for x in `find pw_* -name "test*"`; do rm -rf $$x; done
@for x in `find cp_* -name "test*"`; do rm -rf $$x; done

# Calling 'purge' means remove all reference outputs... be careful!
purge: clean
@for x in `find pw_* -name "benchmark*"`; do rm -rf $$x; done
@for x in `find cp_* -name "benchmark*"`; do rm -rf $$x; done
35 changes: 35 additions & 0 deletions test-suite/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2001-2020 Quantum ESPRESSO Foundation
# Created by Filippo Spiga (filippo.spiga@quantum-espresso.org)
# Maintainer: Samuel Ponce

TEST-SUITE v1.0.0
------------------

Type 'make' for the list of possible

You can run make with several options:

A) Run all PW and CP tests in serial and show a final report

$ make run-tests

If 'run-tests-parallel', it runs the custom test in parallel (4 MPI)


B) Run the test that is in a single directory and show a final report

$ make run-custom-test testdir=name_of_directory

For example, the following runs only the tests in the pw_spinorbit directory
$ make run-custom-test testdir=example01

If 'run-custom-test-parallel', it runs the specified test in parallel (4 MPI)

$ make run-custom-test-parallel testdir=example01




REFERENCE OUTPUTS
-----------------

Loading

0 comments on commit 03281d3

Please sign in to comment.