Commit b7b58a51 authored by Marco Govoni's avatar Marco Govoni
Browse files

Merge branch 'moretests' into 'master'

Moretests

See merge request west-devel/West!5
parents 759e0a23 ee1e904a
......@@ -46,5 +46,5 @@ west_test_gamma:
- git clone -b $CI_COMMIT_REF_NAME $CI_REPOSITORY_URL West
- cd West
- make > /dev/null
- cd tests
- cd test-suite
- make NP=28 NI=1 NT=1
# Makefile
#
testdirs:= test001 test002 test003 test003
default: title all
all:
for d in $(testdirs); do (cd $$d; $(MAKE)); done
clean:
for d in $(testdirs); do (cd $$d; $(MAKE) clean); done
title :
@echo " "
@echo "################"
@echo "## Test-suite ##"
@echo "################"
@echo " "
WEST test-suite
1) Edit the file maketest.inc
2) make
#
# Parallel execution knobs
#
NP = 2 # Number of MPI processes
NI = 1 # NUmber of images
NT = 1 # Number of OPENMP threads
#
# Commands needed by the scripts
#
# Directory where the executables (*.x) are located
BINDIR = ../../../bin
# How to run in a parallel executable with MPI
PARA_PREFIX = mpirun -np ${NP} --allow-run-as-root
# How to download files
WGET = wget -N -q
###### DO NOT TOUCH BELOW ######
NIMAGE = ${NI}
OMP_NUM_THREADS = ${NT}
......@@ -4,14 +4,10 @@ include ../maketest.inc
default: title all
all: prepare_input run
all: prepare_inputs run
prepare_input:
-wget -N -q http://www.quantum-simulation.org/potentials/sg15_oncv/upf/H_ONCV_PBE-1.0.upf
-wget -N -q http://www.quantum-simulation.org/potentials/sg15_oncv/upf/Si_ONCV_PBE-1.1.upf
-wget -N -q http://www.west-code.org/doc/training/silane/pw.in
-wget -N -q http://www.west-code.org/doc/training/silane/wstat.in
-wget -N -q http://www.west-code.org/doc/training/silane/wfreq.in
prepare_inputs:
-bash prepare_inputs.sh
run:
- ${PARA_PREFIX} ${BINDIR}/pw.x -i pw.in > pw.out
......
#!/bin/bash
${WGET} http://www.quantum-simulation.org/potentials/sg15_oncv/upf/H_ONCV_PBE-1.0.upf
${WGET} http://www.quantum-simulation.org/potentials/sg15_oncv/upf/Si_ONCV_PBE-1.1.upf
cat > pw.in << EOF
&control
calculation = 'scf'
restart_mode = 'from_scratch'
pseudo_dir = './'
outdir = './'
prefix = 'test'
wf_collect = .TRUE.
/
&system
ibrav = 1
celldm(1) = 20
nat = 5
ntyp = 2
ecutwfc = 25.0
nbnd = 10
assume_isolated ='mp'
/
&electrons
diago_full_acc = .TRUE.
/
ATOMIC_SPECIES
Si 28.0855 Si_ONCV_PBE-1.1.upf
H 1.00794 H_ONCV_PBE-1.0.upf
ATOMIC_POSITIONS bohr
Si 10.000000 10.000000 10.000000
H 11.614581 11.614581 11.614581
H 8.385418 8.385418 11.614581
H 8.385418 11.614581 8.385418
H 11.614581 8.385418 8.385418
K_POINTS {gamma}
EOF
cat > wstat.in << EOF
{
"input_west": {
"qe_prefix": "test",
"west_prefix": "test",
"outdir": "./"
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 50
}
}
EOF
cat > wfreq.in << EOF
{
"input_west": {
"qe_prefix": "test",
"west_prefix": "test",
"outdir": "./"
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 50
},
"wfreq_control": {
"wfreq_calculation": "XWGQ",
"n_pdep_eigen_to_use": 50,
"qp_bandrange": [1,5],
"n_refreq": 300,
"ecut_refreq": 2.0
}
}
EOF
# Makefile
include ../maketest.inc
default: title all
all: prepare_inputs run
prepare_inputs:
-bash prepare_inputs.sh
run:
- ${PARA_PREFIX} ${BINDIR}/pw.x -i pw.in > pw.out
- tail -5 pw.out
- ${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat.in > wstat.out
- tail -5 wstat.out
- ${PARA_PREFIX} ${BINDIR}/wfreq.x -nimage ${NIMAGE} -i wfreq.in > wfreq.out
- tail -5 wfreq.out
clean:
- /bin/rm -rf *out *in *upf *save >& /dev/null
title:
@echo " "
@echo "###############"
@echo "### test002 ###"
@echo "###############"
@echo " "
#!/bin/bash
${WGET} http://www.quantum-simulation.org/potentials/sg15_oncv/upf/H_ONCV_PBE-1.0.upf
${WGET} http://www.quantum-simulation.org/potentials/sg15_oncv/upf/C_ONCV_PBE-1.0.upf
cat > pw.in << EOF
&control
calculation = 'scf'
restart_mode = 'from_scratch'
pseudo_dir = './'
outdir = './'
prefix = 'test'
wf_collect = .TRUE.
/
&system
ibrav = 1
celldm(1) = 20
nat = 5
ntyp = 2
ecutwfc = 25.0
nbnd = 10
assume_isolated ='mp'
/
&electrons
diago_full_acc = .TRUE.
/
ATOMIC_SPECIES
C 12.0107 C_ONCV_PBE-1.0.upf
H 1.00794 H_ONCV_PBE-1.0.upf
ATOMIC_POSITIONS angstrom
C 0.0000 0.0000 0.0000
H 0.6276 -0.6275 0.6276
H -0.6276 0.6276 0.6276
H -0.6276 -0.6276 -0.6276
H 0.6276 0.6276 -0.6276
K_POINTS {gamma}
EOF
cat > wstat.in << EOF
{
"input_west": {
"qe_prefix": "test",
"west_prefix": "test",
"outdir": "./"
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 50
}
}
EOF
cat > wfreq.in << EOF
{
"input_west": {
"qe_prefix": "test",
"west_prefix": "test",
"outdir": "./"
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 50
},
"wfreq_control": {
"wfreq_calculation": "XWGQ",
"n_pdep_eigen_to_use": 50,
"qp_bandrange": [1,5],
"n_refreq": 300,
"ecut_refreq": 2.0
}
}
EOF
# Makefile
include ../maketest.inc
default: title all
all: prepare_inputs run
prepare_inputs:
-bash prepare_inputs.sh
run:
- ${PARA_PREFIX} ${BINDIR}/pw.x -i pw.in > pw.out
- tail -5 pw.out
- ${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat.in > wstat.out
- tail -5 wstat.out
- ${PARA_PREFIX} ${BINDIR}/wfreq.x -nimage ${NIMAGE} -i wfreq.in > wfreq.out
- tail -5 wfreq.out
clean:
- /bin/rm -rf *out *in *upf *save >& /dev/null
title:
@echo " "
@echo "###############"
@echo "### test003 ###"
@echo "###############"
@echo " "
#!/bin/bash
${WGET} http://www.quantum-simulation.org/potentials/sg15_oncv/upf/H_ONCV_PBE-1.0.upf
${WGET} http://www.quantum-simulation.org/potentials/sg15_oncv/upf/C_ONCV_PBE-1.0.upf
cat > pw.in << EOF
&control
calculation = 'scf'
restart_mode = 'from_scratch'
pseudo_dir = './'
outdir = './'
prefix = 'test'
wf_collect = .TRUE.
/
&system
ibrav = 1
celldm(1) = 20
nat = 5
ntyp = 2
nspin = 2
ecutwfc = 25.0
nbnd = 10
assume_isolated ='mp'
/
&electrons
diago_full_acc = .TRUE.
/
ATOMIC_SPECIES
C 12.0107 C_ONCV_PBE-1.0.upf
H 1.00794 H_ONCV_PBE-1.0.upf
ATOMIC_POSITIONS angstrom
C 0.0000 0.0000 0.0000
H 0.6276 -0.6275 0.6276
H -0.6276 0.6276 0.6276
H -0.6276 -0.6276 -0.6276
H 0.6276 0.6276 -0.6276
K_POINTS {gamma}
EOF
cat > wstat.in << EOF
{
"input_west": {
"qe_prefix": "test",
"west_prefix": "test",
"outdir": "./"
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 50
}
}
EOF
cat > wfreq.in << EOF
{
"input_west": {
"qe_prefix": "test",
"west_prefix": "test",
"outdir": "./"
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 50
},
"wfreq_control": {
"wfreq_calculation": "XWGQ",
"n_pdep_eigen_to_use": 50,
"qp_bandrange": [1,5],
"n_refreq": 300,
"ecut_refreq": 2.0
}
}
EOF
# Makefile
include ../maketest.inc
default: title all
all: prepare_inputs run
prepare_inputs:
-bash prepare_inputs.sh
run:
- ${PARA_PREFIX} ${BINDIR}/pw.x -i pw.in > pw.out
- tail -5 pw.out
- ${PARA_PREFIX} ${BINDIR}/wstat.x -nimage ${NIMAGE} -i wstat.in > wstat.out
- tail -5 wstat.out
- ${PARA_PREFIX} ${BINDIR}/wfreq.x -nimage ${NIMAGE} -i wfreq.in > wfreq.out
- tail -5 wfreq.out
clean:
- /bin/rm -rf *out *in *upf *save >& /dev/null
title:
@echo " "
@echo "###############"
@echo "### test004 ###"
@echo "###############"
@echo " "
#!/bin/bash
${WGET} http://www.quantum-simulation.org/potentials/sg15_oncv/upf/Si_ONCV_PBE-1.1.upf
cat > pw.in << EOF
&control
calculation = 'scf'
restart_mode = 'from_scratch'
pseudo_dir = './'
outdir = './'
prefix = 'test'
wf_collect = .TRUE.
/
&SYSTEM
ibrav = 2,
a = 5.43,
nat = 2,
ntyp = 1,
ecutwfc = 30.0,
nbnd = 10
/
&ELECTRONS
diago_full_acc = .true.
conv_thr = 1.D-12
/
ATOMIC_SPECIES
Si 28.085 Si_ONCV_PBE-1.1.upf
ATOMIC_POSITIONS (crystal)
Si 0.0000 0.0000 0.0000
Si 0.2500 0.2500 0.2500
K_POINTS (automatic)
2 2 2 0 0 0
EOF
cat > wstat.in << EOF
{
"input_west": {
"qe_prefix": "test",
"west_prefix": "test",
"outdir": "./"
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 10
}
}
EOF
cat > wfreq.in << EOF
{
"input_west": {
"qe_prefix": "test",
"west_prefix": "test",
"outdir": "./"
},
"wstat_control": {
"wstat_calculation": "S",
"n_pdep_eigen": 10
},
"wfreq_control": {
"wfreq_calculation": "XWGQ",
"n_pdep_eigen_to_use": 10,
"qp_bandrange": [1,5],
"n_refreq": 300,
"ecut_refreq": 2.0
}
}
EOF
2 total processes failed to start
2 total processes failed to start
# Makefile
#
default: title all
all: \
test001_all
run: \
test001_run
clean: \
test001_clean
test001_all:
if test -d test001 ; then \
( cd test001 ; if test "$(MAKE)" = "" ; then make $(MFLAGS) all; \
else $(MAKE) $(MFLAGS) all ; fi ) ; fi
test001_run:
if test -d test001 ; then \
( cd test001 ; if test "$(MAKE)" = "" ; then make $(MFLAGS) run; \
else $(MAKE) $(MFLAGS) run ; fi ) ; fi
test001_clean:
if test -d test001 ; then \
( cd test001 ; if test "$(MAKE)" = "" ; then make clean ; \
else $(MAKE) clean ; fi ) ; fi
title :
@echo " "
@echo "#############"
@echo "## Testing ##"
@echo "#############"
@echo " "
NP = 2
NI = 1
NT = 1
NIMAGE = ${NI}
OMP_NUM_THREADS = ${NT}
PARA_PREFIX = mpirun -np ${NP} --allow-run-as-root
WGET = wget
BINDIR = ../../../bin
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment