2012-02-20 16:33:16 +08:00
|
|
|
# environment_variables -- settings for running Quantum ESPRESSO examples
|
|
|
|
|
2014-10-16 22:43:05 +08:00
|
|
|
LC_ALL=C
|
|
|
|
export LC_ALL
|
|
|
|
|
2013-08-10 18:16:29 +08:00
|
|
|
######## YOU MAY NEED TO EDIT THIS FILE TO MATCH YOUR CONFIGURATION ########
|
2012-02-20 16:33:16 +08:00
|
|
|
|
|
|
|
# BIN_DIR = path of compiled executables
|
2013-08-10 18:41:57 +08:00
|
|
|
# Usually this is $PREFIX/bin, where $PREFIX is the root of the
|
2012-02-20 16:33:16 +08:00
|
|
|
# Quantum ESPRESSO source tree.
|
|
|
|
# PSEUDO_DIR = path of pseudopotentials required by the examples
|
2013-08-10 18:41:57 +08:00
|
|
|
# if required pseudopotentials are not found in $PSEUDO_DIR,
|
2013-08-10 18:16:29 +08:00
|
|
|
# example scripts will try to download them from NETWORK_PSEUDO
|
2012-02-20 16:33:16 +08:00
|
|
|
# TMP_DIR = temporary directory to be used by the examples
|
2013-08-10 18:16:29 +08:00
|
|
|
# Make sure that it is writable by you and that it doesn't contain
|
|
|
|
# any valuable data (EVERYTHING THERE WILL BE DESTROYED)
|
2012-02-20 16:33:16 +08:00
|
|
|
|
2013-08-10 18:16:29 +08:00
|
|
|
# The following should be good for most cases
|
2012-02-20 16:33:16 +08:00
|
|
|
|
|
|
|
PREFIX=`cd ../../.. ; pwd`
|
|
|
|
BIN_DIR=$PREFIX/bin
|
|
|
|
PSEUDO_DIR=$PREFIX/pseudo
|
|
|
|
# Beware: everything in $TMP_DIR will be destroyed !
|
2015-09-16 18:34:26 +08:00
|
|
|
TMP_DIR=$PREFIX/tempdir
|
2012-02-20 16:33:16 +08:00
|
|
|
|
2013-08-10 18:41:57 +08:00
|
|
|
# There should be no need to change anything below this line
|
|
|
|
|
|
|
|
NETWORK_PSEUDO=http://www.quantum-espresso.org/wp-content/uploads/upf_files/
|
|
|
|
|
|
|
|
|
2012-02-20 16:33:16 +08:00
|
|
|
# wget or curl needed if some PP has to be downloaded from web site
|
|
|
|
# script wizard will surely find a better way to find what is available
|
|
|
|
if test "`which curl`" = "" ; then
|
|
|
|
if test "`which wget`" = "" ; then
|
|
|
|
echo "wget or curl not found: will not be able to download missing PP"
|
|
|
|
else
|
|
|
|
WGET="wget -O"
|
|
|
|
# echo "wget found"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
WGET="curl -o"
|
|
|
|
# echo "curl found"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# To run the ESPRESSO programs on a parallel machine, you may have to
|
|
|
|
# add the appropriate commands (poe, mpirun, mpprun...) and/or options
|
|
|
|
# (specifying number of processors, pools...) before and after the
|
|
|
|
# executable's name. That depends on how your machine is configured.
|
|
|
|
# For example on an IBM SP4:
|
|
|
|
#
|
|
|
|
# poe pw.x -procs 4 < file.in > file.out
|
|
|
|
# ^^^ PARA_PREFIX ^^^^^^^^ PARA_POSTFIX
|
|
|
|
#
|
|
|
|
# To run on a single processor, you can usually leave them empty.
|
2012-07-25 02:59:07 +08:00
|
|
|
# BEWARE: most tests and examples are devised to be run serially or on
|
|
|
|
# a small number of processors; do not use tests and examples to benchmark
|
|
|
|
# parallelism, do not run on too many processors
|
2012-02-20 16:33:16 +08:00
|
|
|
|
2013-10-13 21:36:46 +08:00
|
|
|
PARA_PREFIX=" "
|
KS_Solvers directory has been created with three subdirectories:
KS_Solvers/CG, KS_Solvers/Davidson, KS_Solvers/Davidson_RCI.
Two are currently used by QE, the third one implements the Davidson
diagonalization within the Reverse Communication Interface paradigm,
courtesy of Micael Oliveira.
KS_Solvers routines depend only on lower level libraries, notably UtilXlib,
LAXlib, (SCA)LAPACK, and BLAS.
reorganization can be improved. For instance some duplicated routines like
cdiaghg and rdiaghg could/should be moved in LAXlib. This could reduce the need
to include KS_Solvers directories in the link step of many codes.
Minimal changes to calling sequence have been made, essentially just adding
h_psi,s_psi,g_psi and h_1psi,s_1psi routines names as arguments (with a
specific calling sequence ihardcode inside the routines that agree with PWSCF one).
This could be avoided adopting the RCI paradigm.
Compiled in serial and parallel, 177/182 pw tests passed (3 that were failing
even before on my laptop pw-berry, pw-langevin, pw-pawatom + 2 unknown==not tested),
12 /17 cp tests passed (some o2-us-para-pbe-X fail but the same was for the
original version)
I assume the modified calling procedure is working and the problem lies somewhere else.
Randomly tested some examples in pw, ph, pwcond and it seams to work.
Please report any problem.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13644 c92efa57-630b-4861-b058-cf58834340f0
2017-07-29 20:19:19 +08:00
|
|
|
PARA_PREFIX="mpirun -np 4"
|
2012-10-10 22:45:51 +08:00
|
|
|
#
|
|
|
|
# available flags:
|
2013-01-20 05:52:32 +08:00
|
|
|
# -ni n number of images (or -nimage)
|
|
|
|
# (only for NEB; for PHonon, see below)
|
|
|
|
# -nk n number of pools (or -npool, -npools)
|
|
|
|
# -nb n number of band groups (or -nbgrp,-nband_group)
|
|
|
|
# -nt n number of task groups (or -ntg, -ntask_groups)
|
|
|
|
# -nd n number of processors for linear algebra
|
|
|
|
# (or -ndiag, -northo)
|
2012-10-10 22:45:51 +08:00
|
|
|
#
|
2013-02-26 18:03:47 +08:00
|
|
|
PARA_POSTFIX=" -nk 1 -nd 1 -nb 1 -nt 1 "
|
2012-08-05 20:39:44 +08:00
|
|
|
#
|
2013-01-16 20:53:40 +08:00
|
|
|
# The following variables are used for image parallelization of PHonon
|
|
|
|
# (see example in PHonon/examples/Image_example)
|
2012-08-05 20:39:44 +08:00
|
|
|
# NB: the number of processors in PARA_IMAGE_PREFIX is the product of the
|
|
|
|
# number of processors in PARA_PREFIX and the number of images in
|
|
|
|
# PARA_IMAGE_POSTFIX
|
|
|
|
#
|
2013-01-20 05:52:32 +08:00
|
|
|
PARA_IMAGE_POSTFIX="-ni 2 $PARA_POSTFIX"
|
2013-01-16 20:53:40 +08:00
|
|
|
PARA_IMAGE_PREFIX="mpirun -np 4"
|
2012-02-20 16:33:16 +08:00
|
|
|
|
|
|
|
# function to test the exit status of a job
|
|
|
|
check_failure () {
|
|
|
|
# usage: check_failure $?
|
|
|
|
if test $1 != 0
|
|
|
|
then
|
2018-04-26 04:48:12 +08:00
|
|
|
echo "Error condition encountered during test: exit status = $1"
|
|
|
|
echo "Aborting"
|
2012-02-20 16:33:16 +08:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|