From dbdce3946b4647992330eef62274c0a8ee90c500 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 1 Apr 2020 16:25:09 -0400 Subject: [PATCH 1/6] Update/Sync singularity container definition for Ubuntu 18.04 --- tools/singularity/.gitignore | 1 + tools/singularity/ubuntu18.04.def | 54 +++++++++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 tools/singularity/.gitignore diff --git a/tools/singularity/.gitignore b/tools/singularity/.gitignore new file mode 100644 index 0000000000..6e91d7ef0d --- /dev/null +++ b/tools/singularity/.gitignore @@ -0,0 +1 @@ +*.sif diff --git a/tools/singularity/ubuntu18.04.def b/tools/singularity/ubuntu18.04.def index c87daa8de5..070086a632 100644 --- a/tools/singularity/ubuntu18.04.def +++ b/tools/singularity/ubuntu18.04.def @@ -2,8 +2,56 @@ BootStrap: docker From: ubuntu:18.04 %post - apt-get update -y - env DEBIAN_FRONTEND=noninteractive apt-get install -y make cmake cmake-curses-gui ninja-build git ccache gcc g++ gfortran libfftw3-dev libjpeg-dev libpng-dev libblas-dev liblapack-dev mpi-default-bin mpi-default-dev libeigen3-dev libgsl-dev libopenblas-dev virtualenv python-dev enchant vim-nox voro++-dev + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get upgrade --no-install-recommends -y + apt-get install --no-install-recommends -y \ + bc \ + build-essential \ + ccache \ + clang \ + cmake \ + cmake-curses-gui \ + curl \ + doxygen \ + enchant \ + g++ \ + gcc \ + gfortran \ + git \ + hdf5-tools \ + libblas-dev \ + libeigen3-dev \ + libenchant-dev \ + libfftw3-dev \ + libgsl-dev \ + libhdf5-serial-dev \ + libjpeg-dev \ + liblapack-dev \ + libopenblas-dev \ + libpng-dev \ + libproj-dev \ + libvtk6-dev \ + make \ + mpi-default-bin \ + mpi-default-dev \ + ninja-build \ + python-dev \ + python-pip \ + python-pygments \ + python-virtualenv \ + python3-dev \ + python3-pip \ + python3-pkg-resources \ + python3-setuptools \ + python3-virtualenv \ + rsync \ + ssh \ + vim-nox \ + virtualenv \ + voro++-dev \ + wget \ + xxd %labels - Author akohlmey + Author akohlmey, rbberger From ccdf010ef0f0a8994b837bec90d4b88bee86cab2 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 1 Apr 2020 16:36:42 -0400 Subject: [PATCH 2/6] Add Intel OpenCL Singularity container --- .../singularity/ubuntu18.04_intel_opencl.def | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 tools/singularity/ubuntu18.04_intel_opencl.def diff --git a/tools/singularity/ubuntu18.04_intel_opencl.def b/tools/singularity/ubuntu18.04_intel_opencl.def new file mode 100644 index 0000000000..71ad1274fe --- /dev/null +++ b/tools/singularity/ubuntu18.04_intel_opencl.def @@ -0,0 +1,65 @@ +BootStrap: docker +From: ubuntu:18.04 + +%post + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get upgrade --no-install-recommends -y + apt-get install --no-install-recommends -y software-properties-common + apt-get install --no-install-recommends -y \ + bc \ + build-essential \ + ccache \ + clang \ + clinfo \ + cmake \ + cmake-curses-gui \ + curl \ + doxygen \ + enchant \ + g++ \ + gcc \ + gfortran \ + git \ + hdf5-tools \ + libblas-dev \ + libeigen3-dev \ + libenchant-dev \ + libfftw3-dev \ + libgsl-dev \ + libhdf5-serial-dev \ + libjpeg-dev \ + liblapack-dev \ + libopenblas-dev \ + libpng-dev \ + libproj-dev \ + libvtk6-dev \ + make \ + mpi-default-bin \ + mpi-default-dev \ + ninja-build \ + ocl-icd-libopencl1 \ + ocl-icd-opencl-dev \ + python-dev \ + python-pip \ + python-pygments \ + python-virtualenv \ + python3-dev \ + python3-pip \ + python3-pkg-resources \ + python3-setuptools \ + python3-virtualenv \ + rsync \ + ssh \ + vim-nox \ + virtualenv \ + voro++-dev \ + wget \ + xxd + + add-apt-repository ppa:intel-opencl/intel-opencl + apt-get update + apt-get install -y intel-opencl-icd + +%labels + Author rbberger From 03988a9048998da9972705fe43558bc1755449f1 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 1 Apr 2020 17:29:07 -0400 Subject: [PATCH 3/6] Add ROCm Singularity container --- tools/singularity/ubuntu18.04_amd_rocm.def | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 tools/singularity/ubuntu18.04_amd_rocm.def diff --git a/tools/singularity/ubuntu18.04_amd_rocm.def b/tools/singularity/ubuntu18.04_amd_rocm.def new file mode 100644 index 0000000000..239106b44b --- /dev/null +++ b/tools/singularity/ubuntu18.04_amd_rocm.def @@ -0,0 +1,72 @@ +BootStrap: docker +From: rocm/dev-ubuntu-18.04 + +%environment + export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 + +%post + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get upgrade --no-install-recommends -y + apt-get install --no-install-recommends -y software-properties-common + apt-get install --no-install-recommends -y \ + bc \ + build-essential \ + ccache \ + clang \ + cmake \ + cmake-curses-gui \ + curl \ + doxygen \ + enchant \ + g++ \ + gcc \ + gfortran \ + git \ + hdf5-tools \ + libblas-dev \ + libeigen3-dev \ + libenchant-dev \ + libfftw3-dev \ + libgsl-dev \ + libhdf5-serial-dev \ + libjpeg-dev \ + liblapack-dev \ + libopenblas-dev \ + libnuma-dev \ + libpng-dev \ + libproj-dev \ + libvtk6-dev \ + make \ + mpi-default-bin \ + mpi-default-dev \ + ninja-build \ + python-dev \ + python-pip \ + python-pygments \ + python-virtualenv \ + python3-dev \ + python3-pip \ + python3-pkg-resources \ + python3-setuptools \ + python3-virtualenv \ + rocm-libs \ + rsync \ + ssh \ + vim-nox \ + virtualenv \ + voro++-dev \ + wget \ + xxd + + export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 + git clone https://github.com/ROCmSoftwarePlatform/hipCUB.git + mkdir hipCUB/build + cd hipCUB/build + CXX=hcc cmake -D BUILD_TEST=off .. + make -j4 + make package + make install + +%labels + Author rbberger From 0cf48c37e16caebf2b7afa201e04287e2e5cd525 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Wed, 1 Apr 2020 17:41:40 -0400 Subject: [PATCH 4/6] Add NVIDIA Singularity container --- tools/singularity/ubuntu18.04_nvidia.def | 64 ++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 tools/singularity/ubuntu18.04_nvidia.def diff --git a/tools/singularity/ubuntu18.04_nvidia.def b/tools/singularity/ubuntu18.04_nvidia.def new file mode 100644 index 0000000000..c1c9fcb5f9 --- /dev/null +++ b/tools/singularity/ubuntu18.04_nvidia.def @@ -0,0 +1,64 @@ +BootStrap: docker +From: nvidia/cuda:10.2-devel-ubuntu18.04 + +%post + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get upgrade --no-install-recommends -y + apt-get install --no-install-recommends -y software-properties-common + apt-get install --no-install-recommends -y \ + bc \ + build-essential \ + ccache \ + clang \ + clinfo \ + cmake \ + cmake-curses-gui \ + curl \ + doxygen \ + enchant \ + g++ \ + gcc \ + gfortran \ + git \ + hdf5-tools \ + libblas-dev \ + libeigen3-dev \ + libenchant-dev \ + libfftw3-dev \ + libgsl-dev \ + libhdf5-serial-dev \ + libjpeg-dev \ + liblapack-dev \ + libopenblas-dev \ + libpng-dev \ + libproj-dev \ + libvtk6-dev \ + make \ + mpi-default-bin \ + mpi-default-dev \ + ninja-build \ + ocl-icd-libopencl1 \ + ocl-icd-opencl-dev \ + python-dev \ + python-pip \ + python-pygments \ + python-virtualenv \ + python3-dev \ + python3-pip \ + python3-pkg-resources \ + python3-setuptools \ + python3-virtualenv \ + rsync \ + ssh \ + vim-nox \ + virtualenv \ + voro++-dev \ + wget \ + xxd + + mkdir -p /etc/OpenCL/vendors + echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd + +%labels + Author rbberger From 927b1b05e5a995fc6156452be291a8ed38ed079d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Apr 2020 20:08:00 -0400 Subject: [PATCH 5/6] ignore singularity container files in the entire repo --- .gitignore | 1 + tools/singularity/.gitignore | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 tools/singularity/.gitignore diff --git a/.gitignore b/.gitignore index 52b8212b13..5c90b0f39c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ *.d *.x *.exe +*.sif *.dll *.pyc __pycache__ diff --git a/tools/singularity/.gitignore b/tools/singularity/.gitignore deleted file mode 100644 index 6e91d7ef0d..0000000000 --- a/tools/singularity/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.sif From 2de7e90e58baee962c87f0325e2c15c999bd7faa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 1 Apr 2020 20:21:30 -0400 Subject: [PATCH 6/6] add Fedora 30 definition and update README file --- tools/singularity/README.md | 36 ++++++++++++++++------------ tools/singularity/fedora30_mingw.def | 10 ++++++++ 2 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 tools/singularity/fedora30_mingw.def diff --git a/tools/singularity/README.md b/tools/singularity/README.md index d316e629f3..ac7c64f1fc 100644 --- a/tools/singularity/README.md +++ b/tools/singularity/README.md @@ -1,18 +1,20 @@ # Singularity container definitions for compiling/testing LAMMPS The *.def files in this folder can be used to build container images -for [Singularity](https://sylabs.io) suitable for compiling and testing -LAMMPS on a variety of OS variants with support for most standard packages -and building/spellchecking the manual. This allows to test and debug -LAMMPS code on different OS variants than what is locally installed on -your development workstation, e.g. when bugs are reported that can only -be reproduced on a specific OS or with specific (mostly older) versions -of tools, compilers, or libraries. +for [Singularity](https://sylabs.io), suitable for compiling and testing +LAMMPS on a variety of OS variants with support for most standard +packages and - for some of them - also building/spellchecking the manual +in all supported formats. This allows to test and debug LAMMPS code on +different OS variants than what is locally installed on your development +workstation, e.g. when bugs are reported that can only be reproduced on +a specific OS or with specific (mostly older) versions of tools, +compilers, or libraries. Ready-to-use container images built from these definition files are occasionally uploaded to the container library at sylabs.io. They can be found here: https://cloud.sylabs.io/library/lammps/default/lammps_development# -and will be signed with the key fingerprint: EEA103764C6C633EDC8AC428D9B44E93BF0C375A +and will be signed with a GPG key that has the fingerprint: +EEA103764C6C633EDC8AC428D9B44E93BF0C375A Here is a workflow for testing a compilation of LAMMPS with a locally built CentOS 7.x singularity container. @@ -24,7 +26,7 @@ mkdir build-centos7 cd build-centos7 sudo singularity build centos7.sif ../tools/singularity/centos7.def singularity shell centos7.sif -cmake -C ../cmake/presets/most.cmake -D CMAKE_CXX_FLAGS="-O3 -g -fopenmp -std=c++11" ../cmake +cmake -C ../cmake/presets/most.cmake ../cmake make ``` @@ -42,9 +44,13 @@ cmake -C ../cmake/presets/most.cmake ../cmake make ``` -| Currently available: | | -| --- | --- | -| centos7.def | CentOS 7.x with EPEL enabled | -| centos8.def | CentOS 8.x with EPEL enabled | -| ubuntu16.04.def | Ubuntu 16.04LTS with default MPI == OpenMPI | -| ubuntu18.04.def | Ubuntu 18.04LTS with default MPI == OpenMPI | +| Currently available: | Description | +| ------------------------------ | ---------------------------------------------- | +| centos7.def | CentOS 7.x with EPEL enabled | +| centos8.def | CentOS 8.x with EPEL enabled | +| fedora30_mingw.def | Fedora 30 with MinGW cross-compiler toolchain | +| ubuntu16.04.def | Ubuntu 16.04LTS with default MPI == OpenMPI | +| ubuntu18.04.def | Ubuntu 18.04LTS with default MPI == OpenMPI | +| ubuntu18.04_amd_nvidia.def | Ubuntu 18.04LTS with Nvidia CUDA 10.2 toolkit | +| ubuntu18.04_amd_rocm.def | Ubuntu 18.04LTS with AMD ROCm toolkit | +| ubuntu18.04_intel_opencl.def | Ubuntu 18.04LTS with Intel OpenCL runtime | diff --git a/tools/singularity/fedora30_mingw.def b/tools/singularity/fedora30_mingw.def new file mode 100644 index 0000000000..7d8d3daed8 --- /dev/null +++ b/tools/singularity/fedora30_mingw.def @@ -0,0 +1,10 @@ +BootStrap: docker +From: fedora:30 + +%post + dnf -y update + dnf -y install vim-enhanced ccache gcc-c++ gdb make cmake patch which file git enchant python3-virtualenv valgrind eigen3-devel mingw64-binutils mingw32-crt mingw32-gcc mingw32-libgomp mingw64-filesystem mingw64-libjpeg-turbo mingw32-libjpeg-turbo mingw32-nsis mingw32-libpng mingw64-sqlite-static mingw64-libpng-static mingw32-pkg-config mingw64-crt mingw32-cpp mingw64-expat-static mingw64-libpng mingw32-expat mingw64-winpthreads-static mingw64-zlib-static mingw32-gcc-gfortran mingw64-gcc mingw32-binutils mingw32-expat-static mingw64-gcc-gfortran mingw64-headers mingw-filesystem-base mingw32-libjpeg-turbo-static mingw64-gcc-c++ mingw64-pkg-config mingw64-libjpeg-turbo-static mingw32-winpthreads mingw32-filesystem mingw32-zlib-static mingw64-expat mingw32-gcc-c++ mingw64-zlib mingw32-sqlite-static mingw64-cpp mingw32-libpng-static mingw-binutils-generic mingw32-eigen3 mingw64-eigen3 mingw32-winpthreads-static mingw32-zlib mingw32-headers mingw64-libgomp mingw64-winpthreads texlive-latex-fonts texlive-pslatex texlive-collection-latexrecommended texlive-latex texlive-latexconfig doxygen-latex texlive-collection-latex texlive-latexbug texlive-latex-bin texlive-lualatex-math texlive-fncychap texlive-tabulary texlive-framed texlive-wrapfig texlive-upquote texlive-capt-of texlive-needspace dos2unix findutils rsync + + +%labels + Author akohlmey