I couldn't find instructions that were 100% complete, so I put this together.
These instructions worked fine for me. Follow each step carefully.
Download Ubuntu Desktop 20.04 LTS from here.
#!/bin/bash | |
rm -rf /tmp/overlay | |
mkdir -p /tmp/overlay/.hidden | |
pushd /tmp/overlay | |
# this wrapper ensures that we use our dynamic linker and preload our libc version | |
cat >.hidden/wrapper.sh <<'EOF' | |
#!/bin/bash |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"log" | |
"regexp" | |
"os/exec" | |
"strings" | |
"unicode" |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/time.h> | |
// Perform CYCLES simple in-order operations | |
unsigned loop(int CYCLES) | |
{ | |
unsigned a = rand(), b = rand(), x = rand(); | |
for (int i=0; i < CYCLES/10; i++) |
#!/bin/bash | |
KUBE_VERSION=1.21.0 | |
TF_VERSION=0.13.7 | |
# only amd64 is supported due to terraform-libvirt | |
ARCH=amd64 | |
POOL=/mnt/pool | |
apps=( qemu-system-x86_64 virsh curl jq wget lbzip2 unzip ) | |
pkgs=( libvirt-daemon-system qemu-system-x86 curl jq wget lbzip2 unzip ) |
I couldn't find instructions that were 100% complete, so I put this together.
These instructions worked fine for me. Follow each step carefully.
Download Ubuntu Desktop 20.04 LTS from here.
#!/bin/bash | |
set -xe | |
systemctl enable docker | |
modprobe br_netfilter | |
cat <<EOF | tee /etc/modules-load.d/k8s.conf | |
br_netfilter | |
EOF |
#include <iostream> | |
#include <fstream> | |
template <typename... Ts> | |
void ignore(Ts&&...) {} | |
template <class Stream, typename T> | |
void write(Stream& s, T&& t) | |
{ | |
s.write(reinterpret_cast<const char *>(&t), sizeof(T)); |
-O3 # enable various code gen optimizations incl. vectorization | |
-march=native # enable all instructions sets supp. on curr. machine | |
-mtune=native # tune for the caches of the curr. machine | |
-flto # enable link time optimization - cross translation unit - AWESOME! | |
-fprofile-generate # enable code instrumentation to generate profile of program exec. | |
-fprofile-use # use profile of program exec. to tune branches and stuff | |
-ffunction-sections # place functions in separate sections that can be discarded by linker | |
-fdata-sections # ^^same but for data | |
-Wl,--gc-sections # garbage collect unused sections during linking | |
-Wl,-O1 # perform linker optimizations (not very significant) |
#!/usr/bin/env python3 | |
import itertools as it | |
import operator as op | |
from datetime import date, timedelta | |
import calendar as cal | |
def dates_in_year(year): | |
day = timedelta(days=1) | |
curr = date(year, 1, 1) |
__global__ void three_syncs(int *data, int size, int thresh) | |
{ | |
__shared__ int flag; | |
int tid = threaIdx.x; | |
do { | |
__syncthreads(); | |
if (!tid) | |
flag = 0; | |
__syncthreads(); | |
if (tid < size) { |