build_software_rc-build_user 856 Bytes
Newer Older
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
# This script builds the softwares listed in ebinput.txt by
# creating a slurm script for it's build using EasyBuild.
# This also creates a general directory structure for the project


#!/bin/bash

cd ../..
for software in `cat $1`
do
mkdir `echo "$software" | awk -F'-' '{print $1}'`
cd `echo "$software" | awk -F'-' '{print $1}'`
cat > build-$software.job <<EOF
#!/bin/bash
#SBATCH --share
#SBATCH --partition=medium
#SBATCH --job-name=build-`echo "$software" | awk -F'-' '{print $1}'`
#SBATCH --output=out.txt
#SBATCH --error=`echo "$software" | awk -F'-' '{print $1}'`.err
#SBATCH --ntasks=4
#SBATCH --time=08:00:00
#SBATCH --mem-per-cpu=1024
#SBATCH --mail-type=END
#SBATCH --mail-type=FAIL
#SBATCH --mail-user=rc-build@vo.uabgrid.uab.edu

eb $software -r >> `echo "$software" | awk -F'-' '{print $1}'`.out
EOF

sbatch build-$software.job
cd ..
done