Skip to content

Commit 5a29e82

Browse files
committed
Make Laika compile on GCC 7. Add setup scripts.
1 parent 308ea42 commit 5a29e82

File tree

4 files changed

+37
-10
lines changed

4 files changed

+37
-10
lines changed

Dockerfile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1-
FROM gcc:5
2-
ADD . /usr/src/laika
3-
WORKDIR /usr/src/laika
1+
FROM ubuntu:18.04
2+
# Ubuntu 18.04 ships with GCC 7, which is sufficiently new for Laika to work.
3+
4+
ADD ./scripts /laika/scripts
5+
RUN chmod +x /laika/scripts/aws_setup.sh && \
6+
/laika/scripts/aws_setup.sh && \
7+
chmod +x /laika/scripts/download_input_data.sh && \
8+
/laika/scripts/download_input_data.sh
9+
10+
ADD . /laika
11+
12+
WORKDIR /laika

scripts/aws_setup.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#!/usr/bin/env bash
2-
add-apt-repository -y ppa:ubuntu-toolchain-r/test
2+
3+
# Fail on first error, on undefined variables, and on failures in a pipeline.
4+
set -euo pipefail
5+
6+
# Print each executed line.
7+
set -x
8+
39
apt-get update
4-
apt-get install -y build-essential openssl htop curl wget make vim git gitk gcc-5 g++-5 linux-tools-common linux-tools-generic keychain mpich libmpich-dev mosh
510

6-
pushd /usr/bin
7-
rm g++
8-
ln -s g++-5 g++
9-
popd
11+
apt-get install -y \
12+
build-essential openssl htop curl wget make vim git \
13+
linux-tools-common linux-tools-generic keychain mosh \
14+
python python3.6

scripts/download_input_data.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
# Fail on first error, on undefined variables, and on failures in a pipeline.
4+
set -euo pipefail
5+
6+
# Print each executed line.
7+
set -x
8+
9+
wget -O /tmp/mesh_inputs.tar.gz https://www.dropbox.com/s/zhzzhfc5kx31lpi/mesh_inputs.tar.gz?dl=1
10+
11+
mkdir -p /laika/input_data
12+
13+
tar -xf /tmp/mesh_inputs.tar.gz --directory /laika/input_data

src/graph_compute/numa_scheduling.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ inline T logBaseTwoRoundUp(T x) {
8383
__attribute__((target("sse4.2")))
8484
inline uint32_t randomValue(const uint32_t seed,
8585
const unsigned int randVal = 0xF1807D63) {
86-
return _mm_crc32_u32(randVal, seed);
86+
return __builtin_ia32_crc32si(randVal, seed);
8787
}
8888

8989
static inline bool samePhase(vid_t v, vid_t w, chunkdata_t * const chunkdata) {

0 commit comments

Comments
 (0)