-
Notifications
You must be signed in to change notification settings - Fork 3
/
fare_build.sh.1
executable file
·93 lines (80 loc) · 2.6 KB
/
fare_build.sh.1
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
OUT=fare_build.log
ix=1
if [ "x$2" = "x" ]
then
echo "Usage: ${0} [slurm_dir to build] [installation dir]"
exit
else
slurm_dir=${1}
install_dir=${2}
fi
if [ "x$3" = "xsim" ]
then
echo "Building Slurm in Workload Simulator Mode."
config_opt=" --enable-simulator"
else
config_opt=" "
fi
echo "slurm_dir = ${slurm_dir}"
echo "install_dir = ${install_dir}"
while [ -f ${OUT}.${ix} ]
do
(( ix = ix + 1 ))
done
script -x
(
cd $slurm_dir
echo "Executing: configure"
./configure \
--exec-prefix=${install_dir}/slurm_programs \
--bindir=${install_dir}/slurm_programs/bin \
--sbindir=${install_dir}/slurm_programs/sbin \
--datadir=${install_dir}/slurm_varios/share \
--includedir=${install_dir}/slurm_varios/include \
--libdir=${install_dir}/slurm_varios/lib \
--libexecdir=${install_dir}/slurm_varios/libexec \
--localstatedir=${install_dir}/slurm_varios \
--sharedstatedir=${install_dir}/slurm_varios \
--mandir=${install_dir}/slurm_varios/man \
--infodir=${install_dir}/slurm_varios/share/info \
--prefix=${install_dir}/slurm_programs \
--sysconfdir=${install_dir}/slurm_conf \
--localstatedir=${install_dir}/slurm_varios/var/ \
--enable-pam \
--with-proctrack \
--with-ssl=${install_dir}/slurm_varios/lib/slurm \
--with-munge=/opt/munge/default \
--enable-front-end \
--with-mysql-config=/usr/bin/ ${config_opt}
# --enable-simulator
echo "Now compiling ... (It will take some minutes)"
make
echo "... and installing ..."
make install
# Let's check compilation and installation was successful
echo "Let's check compilation and installation was successful..."
echo "${install_dir}/slurm_programs/sbin/slurmctld"
if [ -f "${install_dir}/slurm_programs/sbin/slurmctld" ]
then
echo "I got a slurmctld binary!"
else
echo "Something was wrong during slurm building"
exit
fi
echo "It seems fine."
printf "\tNow you must also build/install the contribs/simulator directory.\n\n"
printf "\tThere are some parameters in slurm_conf/slurm.conf to adjust before slurm can run:\n"
printf "\n\t\tSlurmUser\n"
printf "\n\t\tSlurmdUser\n"
printf "\n\t\tControlMachine\n"
printf "\n\t\tControlAddr\n"
printf "\n\t\tClusterName\n"
printf "\n\t\tFrontendName\n"
printf "\n\t Also check slurm_conf/slurm.nodes and set NodeHostName and NodeAddr if they are wrong\n"
printf "\n\nDO NOT FORGET IT!\n\n"
printf "\There are some parameters at slurm_conf/ to adjust before slurmdbd can run::\n"
printf "\n\t\tStorageUser\n"
printf "\n\t\tStoragePass\n"
printf "\n\t\tSlurmUser\n"
printf "\n\nDO NOT FORGET IT!\n\n"
) 2>&1 | tee ${OUT}.${ix}