Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add script that creates singularity image for UWLCM with GPU support #77

Merged
merged 4 commits into from
Jul 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions singularity/README_singularity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Use Singularity: https://sylabs.io/singularity/ to create image for UWLCM

Build the image remotely here: https://cloud.sylabs.io/builder

```bash
$ singularity build --remote sng_ubuntu_18_04_cuda_10_0.sif sng_ubuntu_18_04_cuda_10_0
```

The image works with CUDA Driver Version: 410.79 and CUDA Version: 10.0

To run the image with GPU support use --nv flag:
```bash
$ singularity shell --nv sng_ubuntu_18_04_cuda_10_0.sif
```

Follow the libmpdata and libcloud readme on how to compile them and run tests.

Install both libraries in a local_folder:
```bash
$ cmake -DCMAKE_INSTALL_PREFIX=/local_folder/
$ make install
```

When compiling UWLCM tell cmake where to find the two locally installed libraries:
```bash
$ cmake .. -Dlibmpdata++_DIR=/local_folder/usr/local/share/libmpdata++ -Dlibcloudph++_DIR=/local_folder/usr/local/lib/cmake/libcloudph++
$ make
```

Prepare to wait as UWLCM and libcloudph++ take long time to compile.
After that youre done.
53 changes: 53 additions & 0 deletions singularity/sng_ubuntu_18_04_cuda_10_0
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Bootstrap: docker
From: nvidia/cuda:10.0-devel-ubuntu18.04

%post
export DEBIAN_FRONTEND=noninteractive
export TZ=America/Los_Angeles
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

apt-get update -qq \
&& apt-get install -yq --no-install-recommends \
sudo \
apt-utils \
build-essential \
pkg-config \
git \
cmake \
ca-certificates \
software-properties-common \
vim \
curl \
language-pack-en-base

add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update

add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update -qq \
&& apt-get install -yq --no-install-recommends \
wget \
gnuplot-nox \
libgnuplot-iostream-dev \
libhdf5-dev \
hdf5-tools \
python-dev \
python-h5py \
python-numpy \
python-scipy \
python-matplotlib \
python-pytest \
libthrust-dev \
libboost-all-dev

git clone --depth=1 git://github.com/thrust/thrust.git
sudo ln -s `pwd`/thrust/thrust /usr/local/include/thrust

git clone --depth=1 git://github.com/blitzpp/blitz.git
cd blitz
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
cd ../../