-
Notifications
You must be signed in to change notification settings - Fork 0
/
hacc-centos.conf
74 lines (56 loc) · 2.5 KB
/
hacc-centos.conf
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
BootStrap: yum
OSVersion: 7
#MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
MirrorURL: http://linux-ftp.jf.intel.com/pub/mirrors/centos/7.4.1708/os/$basearch/
Include: yum
# If you want the updates (available at the bootstrap date) to be installed
# inside the container during the bootstrap instead of the General Availability
# point release (7.x) then uncomment the following line
#UpdateURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/updates/$basearch/
%help
echo "this is a container to run HACC binarie on SKL machine. just type ./hacc.img and it should run"
echo "If you want to increase/decrease the runtime, you can edit N_STEPS in this parameter file: ./params/indat.params.10steps"
echo "For the results, In the output printed, look for this line at the end: That gives the runtime."
echo "ACCUMULATED STATS"
echo "total max 6.765e+01 s avg 6.765e+01 s min 6.765e+01 s"
%setup
echo $PWD
echo "Looking in the directory '$SINGULARITY_ROOTFS'"
echo "Copying the dist files into '$SINGULARITY_ROOTFS'"
mkdir -p $SINGULARITY_ROOTFS/tempdir
if [ ! -x "$SINGULARITY_ROOTFS/tempdir" ]; then
echo "failed to create tempdir directory..."
exit 1
fi
DIR="/localdisk/sdouyeb/hacc/"
cp -r $DIR. $SINGULARITY_ROOTFS/tempdir
if [ "$(ls -A $SINGULARITY_ROOTFS/tempdir/)" ]; then
echo "Files are copies here $SINGULARITY_ROOTFS/tempdir"
ls $SINGULARITY_ROOTFS/tempdir/
fi
chmod -R 777 $SINGULARITY_ROOTFS/tempdir/*
exit 0
%post
echo "Hello from inside the post container"
export http_proxy="http://proxy-us.intel.com:911"
export https_proxy="http://proxy-us.intel.com:912"
rpm --import https://yum.repos.intel.com/2018/setup/RPM-GPG-KEY-intel-psxe-runtime-2018
rpm -Uhv https://yum.repos.intel.com/2018/setup/intel-psxe-runtime-2018-reposetup-1-0.noarch.rpm
echo "installing runtime libs for virtual machines"
yum install intel-psxe-runtime -y
echo "installing gcc"
yum install gcc -y
yum install bc -y
%runscript
echo "This is what happens when you run the container..."
echo "Run HACC"
cd $SINGULARITY_ROOTFS/tempdir/
source ./sourceMe.sh
source env/bashrc.skl.generic
BIN="$SINGULARITY_ROOTFS/tempdir/runme_skl"
echo "current dir"
pwd
haccResults="$SINGULARITY_ROOTFS/tempdir/hacc.skl.result.log"
./$BIN |tee $haccResults
echo "parse HACC results to $SINGULARITY_ROOTFS/tempdir"
grep "total max" $haccResults