Unverified Commit 4e6f83ce authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1726 from akohlmey/singularity

Add Singularity definition files suitable for compiling and debugging LAMMPS
parents 437c0e59 645df22e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ Miscellaneous tools :h3
"emacs"_#emacs,
"i-pi"_#ipi,
"kate"_#kate,
"singularity"_#singularity_tool,
"vim"_#vim :tb(c=5,ea=c,a=l)

:line
@@ -542,6 +543,15 @@ Ivanov, at University of Iceland (ali5 at hi.is).

:line

singularity tool :h4,link(singularity_tool)

The singularity sub-directory contains container definitions files
that can be used to build container images for building and testing
LAMMPS on specific OS variants using the "Singularity"_https://sylabs.io
container software. Contributions for additional variants are welcome.

:line

vim tool :h4,link(vim)

The files in the tools/vim directory are add-ons to the VIM editor
+28 −0
Original line number Diff line number Diff line
# 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.

Here is a workflow for testing a compilation of LAMMPS with a CentOS 7.x container.

```
cd some/work/directory
git clone --depth 500  git://github.com/lammps/lammps.git lammps
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
make
```

| Currently available: |     |
| --- | --- |
| centos7.def | CentOS 7.x with EPEL enabled |
| ubuntu18.04.def | Ubuntu 18.04LTS with default MPI == OpenMPI |
+10 −0
Original line number Diff line number Diff line
BootStrap: library
From: centos:7

%post
	yum -y install epel-release
        yum -y update
	yum -y install vim-enhanced ccache gcc-c++ gcc-gfortran clang gdb valgrind-openmpi make cmake cmake3 patch which file git libpng-devel libjpeg-devel openmpi-devel mpich-devel python-devel python-virtualenv fftw-devel voro++-devel eigen3-devel gsl-devel openblas-devel enchant

%labels
	Author akohlmey
+9 −0
Original line number Diff line number Diff line
BootStrap: docker
From: ubuntu:18.04

%post
	apt-get update -y
	env DEBIAN_FRONTEND=noninteractive apt-get install -y make cmake git 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 ccache voro++-dev

%labels
	Author akohlmey