-
Notifications
You must be signed in to change notification settings - Fork 0
/
milc_centos.conf
66 lines (49 loc) · 2.49 KB
/
milc_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
BootStrap: yum
OSVersion: 7
MirrorURL: http://linux-ftp.jf.intel.com/pub/mirrors/centos/7.4.1708/os/$basearch/
Include: yum
#Commands in the %setup section are executed on the host system outside of the container after the base OS has been installed
%setup
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/milc/run/"
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
#Commands in the %post section are executed within the container after the base OS has been installed at build time
%post
echo "Hello from inside the post container"
#set the proxy in the post script
export http_proxy="http://proxy-us.intel.com:911"
export https_proxy="http://proxy-us.intel.com:912"
#install compiler run time libraries
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"
yum install intel-psxe-runtime -y
yum install gcc -y
yum install bc -y
# Set environment variables to be sourced at runtime
%environment
echo "set the env variable"
OMP_NUM_THREADS=5
KMP_AFFINITY='granularity=fine,scatter'
#The %runscript gets persisted within the container to a file which is the execution driver when the container image is run
%runscript
echo "This is what happens when you run the container..."
source /opt/intel/psxe_runtime_2018.1.161/linux/bin/compilervars.sh intel64
echo "run milc for SKL"
cd $SINGULARITY_ROOTFS/tempdir/
echo "current dir"
mpiexec.hydra -n 8 $SINGULARITY_ROOTFS/tempdir/su3_rhmd_hisq.skx < $SINGULARITY_ROOTFS/tempdir/params.24x24x24x24 |tee $SINGULARITY_ROOTFS/tempdir/milc.su3_rhmd_hisq.log
echo "parse milc results to $SINGULARITY_ROOTFS/tempdir"
$SINGULARITY_ROOTFS/tempdir/parse_milc.sh -l qphix -m flops -r $SINGULARITY_ROOTFS/milc.su3_rhmd_hisq.log