-
Notifications
You must be signed in to change notification settings - Fork 1
/
Singularity.v1.0.0-nompi
105 lines (88 loc) · 3.12 KB
/
Singularity.v1.0.0-nompi
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
94
95
96
97
98
99
100
101
102
103
104
# NOTE: this definition file depends on features only available in
# Singularity 3.2 and later.
BootStrap: docker
From: ubuntu:18.04
Stage: build
%post
. /.singularity.d/env/10-docker*.sh
# GNU compiler
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
g++ \
gcc \
gfortran
rm -rf /var/lib/apt/lists/*
# CMake version 3.16.3
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
make \
wget
rm -rf /var/lib/apt/lists/*
%post
cd /
mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.16/cmake-3.16.3-Linux-x86_64.sh
mkdir -p /usr/local
/bin/sh /var/tmp/cmake-3.16.3-Linux-x86_64.sh --prefix=/usr/local --skip-license
rm -rf /var/tmp/cmake-3.16.3-Linux-x86_64.sh
%environment
export PATH=/usr/local/bin:$PATH
%post
export PATH=/usr/local/bin:$PATH
# Python
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3
rm -rf /var/lib/apt/lists/*
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
patch
rm -rf /var/lib/apt/lists/*
# http://github.com/MRChemSoft/mrchem/archive/v1.0.0.tar.gz
%post
cd /
mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp http://github.com/MRChemSoft/mrchem/archive/v1.0.0.tar.gz
mkdir -p /var/tmp && tar -x -f /var/tmp/v1.0.0.tar.gz -C /var/tmp -z
mkdir -p /var/tmp/mrchem-1.0.0/build && cd /var/tmp/mrchem-1.0.0/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mrchem -D CMAKE_BUILD_TYPE=Release -D ENABLE_MPI=OFF -D ENABLE_OPENMP=ON -D ENABLE_ARCH_FLAGS=OFF /var/tmp/mrchem-1.0.0
cmake --build /var/tmp/mrchem-1.0.0/build --target all -- -j$(nproc)
cmake --build /var/tmp/mrchem-1.0.0/build --target install -- -j$(nproc)
rm -rf /var/tmp/mrchem-1.0.0 /var/tmp/v1.0.0.tar.gz
BootStrap: docker
From: ubuntu:18.04
%post
. /.singularity.d/env/10-docker*.sh
# GNU compiler runtime
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libgfortran4 \
libgomp1
rm -rf /var/lib/apt/lists/*
# Python
%post
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3
rm -rf /var/lib/apt/lists/*
# http://github.com/MRChemSoft/mrchem/archive/v1.0.0.tar.gz
%files from build
/usr/local/mrchem /usr/local/mrchem
%environment
export PATH=$PATH:/usr/local/mrchem/bin
%post
export PATH=$PATH:/usr/local/mrchem/bin
%runscript
exec mrchem "$@"
%labels
Author Stig Rune Jensen <[email protected]>
Description MRChem program (OpenMP version)
Version v1.0.0
%help
Shared memory parallel (OpenMP) build of MRChem on a Ubuntu-18.04 base image.
For a pure OpenMP run (n threads on one process) you can run the container
just as the regular mrchem executable, here with input file molecule.inp:
$ export OMP_NUM_THREADS=n
$ ./<image-name>.sif molecule