-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup_env.sh
56 lines (50 loc) · 1.95 KB
/
setup_env.sh
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
unset LD_LIBRARY_PATH
unset PYTHONPATH
if [ -d "/sdf/group/lcls/" ]
then
# for s3df
# sdf conda envs seem to mangle the ps1 badly
PS1_BACKUP="${PS1}"
source /sdf/group/lcls/ds/ana/sw/conda2/inst/etc/profile.d/conda.sh
export CONDA_ENVS_DIRS=/sdf/group/lcls/ds/ana/sw/conda2/inst/envs
export DIR_PSDM=/sdf/group/lcls/ds/ana/
export SIT_PSDM_DATA=/sdf/data/lcls/ds/
else
# for psana
source /cds/sw/ds/ana/conda2-v2/inst/etc/profile.d/conda.sh
export CONDA_ENVS_DIRS=/cds/sw/ds/ana/conda2/inst/envs/
export DIR_PSDM=/cds/group/psdm
export SIT_PSDM_DATA=/cds/data/psdm
fi
conda activate ps-4.6.3
if [ -n "${PS1_BACKUP}" ]; then
PS1="(${CONDA_ENV_NAME}) ${PS1_BACKUP}"
unset PS1_BACKUP
fi
AUTH_FILE=$DIR_PSDM"/sw/conda2/auth.sh"
if [ -f "$AUTH_FILE" ]; then
source $AUTH_FILE
else
echo "$AUTH_FILE file is missing"
fi
RELDIR="$( cd "$( dirname $(readlink -f "${BASH_SOURCE[0]}") )" && pwd )"
export PATH=$RELDIR/install/bin:${PATH}
pyver=$(python -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))")
export PYTHONPATH=$RELDIR/install/lib/python$pyver/site-packages
# for procmgr
export TESTRELDIR=$RELDIR/install
export PROCMGR_EXPORT=RDMAV_FORK_SAFE=1,RDMAV_HUGEPAGES_SAFE=1 # See fi_verbs man page regarding fork()
export PROCMGR_EXPORT=$PROCMGR_EXPORT,OPENBLAS_NUM_THREADS=1,PS_PARALLEL='none'
# cpo: seems that in more recent versions blas is creating many threads
export OPENBLAS_NUM_THREADS=1
# cpo: getting intermittent file-locking issue on ffb, so try this
export HDF5_USE_FILE_LOCKING=FALSE
# for libfabric. decreases performance a little, but allows forking
export RDMAV_FORK_SAFE=1
export RDMAV_HUGEPAGES_SAFE=1
# cpo: workaround a qt bug which may no longer be there (dec 5, 2022)
if [ ! -d /usr/share/X11/xkb ]; then
export QT_XKB_CONFIG_ROOT=${CONDA_PREFIX}/lib
fi
# needed by Ric to get correct libfabric man pages
export MANPATH=$CONDA_PREFIX/share/man${MANPATH:+:${MANPATH}}