From 1ddf75b176bf7896deec60580b1b8eda4252d49e Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 6 Dec 2023 08:44:45 -0700 Subject: [PATCH 1/5] CI: add intel build on ubuntu --- .../continuous-integration-workflow.yml | 1 + ubuntu | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 32aa7ba..afc06a2 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -22,6 +22,7 @@ jobs: - {dockerfile: 'fedora', tag: 'gmxpkg'} - {dockerfile: 'fedora', tag: 'rawhide', build_args: 'TAG=rawhide,PYTHON=python3.12', continue-on-error: 'true'} - {dockerfile: 'ubuntu', tag: 'latest'} + - {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=22.04,INTEL=yes', continue-on-error: 'true'} - {dockerfile: 'ubuntu', tag: 'rolling', build_args: 'TAG=rolling'} - {dockerfile: 'ubuntu', tag: 'devel', build_args: 'TAG=devel', continue-on-error: 'true'} - {dockerfile: 'opensuse', tag: 'latest', continue-on-error: 'true'} diff --git a/ubuntu b/ubuntu index a6e14a6..a2607c4 100644 --- a/ubuntu +++ b/ubuntu @@ -3,6 +3,7 @@ FROM ubuntu:${TAG} ARG GMX_BRANCH ARG GMX_DOUBLE +ARG INTEL ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ @@ -12,19 +13,30 @@ RUN apt-get update && \ wget libhdf5-dev graphviz pkg-config psmisc libeigen3-dev libxc-dev sudo curl clang-tidy ninja-build libclang-dev llvm-dev libomp-dev \ clang-format software-properties-common zstd libint2-dev libecpint-dev python3-rdkit python3-h5py python3-pytest pybind11-dev python3-xmltodict ase && \ apt-get purge --autoremove -y && \ - rm -rf /var/lib/apt/lists/* + apt-get clean # install ubuntu's gromacs RUN if [ -z "${GMX_BRANCH}" ]; then \ apt-get update && \ - apt-get install -y libgromacs-dev gromacs-openmpi; \ + apt-get install -y libgromacs-dev gromacs-openmpi && \ apt-get purge --autoremove -y && \ - rm -rf /var/lib/apt/lists/*; \ + apt-get clean; \ +fi + +RUN if [ "${INTEL}" = "yes" ]; then \ + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list && \ + apt-get update && \ + apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mkl-devel && \ + apt-get purge --autoremove -y && \ + apt-get clean; \ fi RUN useradd -m -G sudo -u 1001 votca RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers USER votca +ENV PATH=${INTEL:+/opt/intel/oneapi/compiler/latest/linux/bin:/opt/intel/oneapi/compiler/latest/linux/bin/intel64}${PATH:+:}${PATH} +ENV LD_LIBRARY_PATH=${INTEL:+/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64:/opt/intel/oneapi/mkl/latest/lib/intel64}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH} ENV CCACHE_MAXSIZE=250M WORKDIR /home/votca From a40da7a08156ee08fcec688a61a4bc711c591c95 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 6 Dec 2023 15:14:30 -0700 Subject: [PATCH 2/5] ubuntu: fix gromacs install --- ubuntu | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ubuntu b/ubuntu index a2607c4..988f1d2 100644 --- a/ubuntu +++ b/ubuntu @@ -16,9 +16,13 @@ RUN apt-get update && \ apt-get clean # install ubuntu's gromacs -RUN if [ -z "${GMX_BRANCH}" ]; then \ +RUN source /etc/os-release && if [ -z "${GMX_BRANCH}" ]; then \ apt-get update && \ - apt-get install -y libgromacs-dev gromacs-openmpi && \ + if [ "${VERSION_ID}" -ge 22.04 ]; then \ + apt-get install -y libgromacs-dev gromacs-openmpi; \ + else \ + apt-get install -y libgromacs-dev gromacs-nmpi; \ + fi && \ apt-get purge --autoremove -y && \ apt-get clean; \ fi From 886f9d8226ae8ae8a1d983a22d15dd7114c6a371 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 6 Dec 2023 15:26:11 -0700 Subject: [PATCH 3/5] ubuntu: fix syntax --- ubuntu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu b/ubuntu index 988f1d2..fcdd733 100644 --- a/ubuntu +++ b/ubuntu @@ -16,7 +16,7 @@ RUN apt-get update && \ apt-get clean # install ubuntu's gromacs -RUN source /etc/os-release && if [ -z "${GMX_BRANCH}" ]; then \ +RUN . /etc/os-release && if [ -z "${GMX_BRANCH}" ]; then \ apt-get update && \ if [ "${VERSION_ID}" -ge 22.04 ]; then \ apt-get install -y libgromacs-dev gromacs-openmpi; \ From 19588772591917c3520de2c209ae8197b2bd9547 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 6 Dec 2023 15:33:03 -0700 Subject: [PATCH 4/5] ubuntu: fix syntax --- ubuntu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ubuntu b/ubuntu index fcdd733..44ccbf4 100644 --- a/ubuntu +++ b/ubuntu @@ -18,10 +18,10 @@ RUN apt-get update && \ # install ubuntu's gromacs RUN . /etc/os-release && if [ -z "${GMX_BRANCH}" ]; then \ apt-get update && \ - if [ "${VERSION_ID}" -ge 22.04 ]; then \ - apt-get install -y libgromacs-dev gromacs-openmpi; \ + if [ "${VERSION_ID}" = "22.04" ]; then \ + apt-get install -y libgromacs-dev gromacs-mpi; \ else \ - apt-get install -y libgromacs-dev gromacs-nmpi; \ + apt-get install -y libgromacs-dev gromacs-openmpi; \ fi && \ apt-get purge --autoremove -y && \ apt-get clean; \ From 936ca1d2e39dad6ff32dcee2a0b4363f280b641c Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Thu, 7 Dec 2023 17:56:09 -0700 Subject: [PATCH 5/5] ubuntu: install right gromacs packages --- ubuntu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu b/ubuntu index 44ccbf4..7e5055e 100644 --- a/ubuntu +++ b/ubuntu @@ -21,7 +21,7 @@ RUN . /etc/os-release && if [ -z "${GMX_BRANCH}" ]; then \ if [ "${VERSION_ID}" = "22.04" ]; then \ apt-get install -y libgromacs-dev gromacs-mpi; \ else \ - apt-get install -y libgromacs-dev gromacs-openmpi; \ + apt-get install -y libgromacs-dev gromacs; \ fi && \ apt-get purge --autoremove -y && \ apt-get clean; \