-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment_variables
102 lines (87 loc) · 3.62 KB
/
environment_variables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# environment_variables -- settings for running Quantum ESPRESSO examples
LC_ALL=C
export LC_ALL
######## YOU MAY NEED TO EDIT THIS FILE TO MATCH YOUR CONFIGURATION ########
# BIN_DIR = path of compiled executables
# Usually this is $PREFIX/bin, where $PREFIX is the root of the
# Quantum ESPRESSO source tree.
# PSEUDO_DIR = path of pseudopotentials required by the examples
# if required pseudopotentials are not found in $PSEUDO_DIR,
# example scripts will try to download them from NETWORK_PSEUDO
# TMP_DIR = temporary directory to be used by the examples
# Make sure that it is writable by you and that it doesn't contain
# any valuable data (EVERYTHING THERE WILL BE DESTROYED)
# The following should be good for most cases
PREFIX=`cd ../../.. ; pwd`
BIN_DIR=$PREFIX/bin
PSEUDO_DIR=$PREFIX/pseudo
# Beware: everything in $TMP_DIR will be destroyed !
TMP_DIR=$PREFIX/tempdir
# There should be no need to change anything below this line
NETWORK_PSEUDO=http://www.quantum-espresso.org/wp-content/uploads/upf_files/
# 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.
# 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
PARA_PREFIX=" "
PARA_PREFIX="mpirun -np 4"
#
# available flags:
# -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)
#
PARA_POSTFIX=" -nk 1 -nd 1 -nb 1 -nt 1 "
#
# The following variables are used for image parallelization of PHonon
# (see example in PHonon/examples/Image_example)
# 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
#
PARA_IMAGE_POSTFIX="-ni 2 $PARA_POSTFIX"
PARA_IMAGE_PREFIX="mpirun -np 4"
#
# In case of mixed MPI / OpenMP parallelization you may want to limit the maximum
# number to OpenMP threads so that the number of threads per MPI process times the
# number of MPI processes equals the number of available cores to avoid hyperthreading
#
# OpenMP parallelization max number of threads
#
export OMP_NUM_THREADS=1
# function to test the exit status of a job
check_failure () {
# usage: check_failure $?
if test $1 != 0
then
echo "Error condition encountered during test: exit status = $1"
echo "Aborting"
exit 1
fi
}