Skip to content

Commit

Permalink
Added version 2022.2
Browse files Browse the repository at this point in the history
  • Loading branch information
timostrunk committed Oct 26, 2023
1 parent 56da6ce commit 2557e37
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 32 deletions.
45 changes: 30 additions & 15 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash
#!/bin/bash -x
set -e

echo "Runing with mpi=$mpi and blas=$blas_impl"

mkdir exts/dbcsr/.git

# select ARCH file and version
if [[ ! -z "$MACOSX_DEPLOYMENT_TARGET" ]]; then
Expand All @@ -12,29 +13,43 @@ else
fi

if [[ "$mpi" == "nompi" ]]; then
VERSION=ssmp
CP2K_USE_MPI=OFF
else
VERSION=psmp
CP2K_USE_MPI=ON
fi

# make
cp ${RECIPE_DIR}/${ARCH}.${VERSION} arch/${ARCH}.${VERSION}
make -j${CPU_COUNT} ARCH=${ARCH} VERSION=${VERSION}

mkdir build
pushd build

cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_FIND_FRAMEWORK=NEVER \
-DCMAKE_FIND_APPBUNDLE=NEVER \
-DPython3_EXECUTABLE="$PYTHON" \
-DCP2K_BUILD_DBCSR=ON \
-DCP2K_USE_MPI=$CP2K_USE_MPI \
-DCP2K_BLAS_VENDOR=OpenBLAS \
-DCP2K_SCALAPACK_VENDOR=GENERIC \
${CMAKE_ARGS} \
..

cmake --build . --config Release

make install
# run regression tests
if [[ "$mpi" == "nompi" ]]; then
make ARCH=${ARCH} VERSION=${VERSION} TESTOPTS="--ompthreads 2" test
make TESTOPTS="--ompthreads 2" test
else
# -mca plm isolated is needed to stop openmpi from looking for ssh
# See https://github.com/open-mpi/ompi/issues/1838#issuecomment-229914599
make ARCH=${ARCH} VERSION=${VERSION} TESTOPTS="--ompthreads 1 --mpiexec 'mpiexec --bind-to none -mca plm isolated'" test
fi

# install
cd ${SRC_DIR}
mkdir -p ${PREFIX}/bin
cp exe/${ARCH}/cp2k.${VERSION} ${PREFIX}/bin/cp2k.${VERSION}
cp exe/${ARCH}/cp2k_shell.${VERSION} ${PREFIX}/bin/cp2k_shell.${VERSION}
#cd ${SRC_DIR}
#mkdir -p ${PREFIX}/bin
#cp exe/${ARCH}/cp2k.${VERSION} ${PREFIX}/bin/cp2k.${VERSION}
#cp exe/${ARCH}/cp2k_shell.${VERSION} ${PREFIX}/bin/cp2k_shell.${VERSION}

exe_size=`du -sh exe/${ARCH}/cp2k.${VERSION}`
echo "Executable size: $exe_size"
#exe_size=`du -sh exe/${ARCH}/cp2k.${VERSION}`
#echo "Executable size: $exe_size"
2 changes: 2 additions & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
mpi:
- openmpi
- nompi
blas_impl:
- openblas

MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
- '10.12' # [osx and x86_64]
Expand Down
34 changes: 17 additions & 17 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "cp2k" %}
{% set version = "9.1.0" %}
{% set version = "2023.2" %}

# Define build matrix for MPI vs. non-mpi
# ensure mpi is defined (needed for conda-smithy recipe-lint)
Expand All @@ -10,56 +10,56 @@
{% set build = build + 1000 %}
{% endif %}

{% set build_string = "py{}_{}_{}".format(environ.get('CONDA_PY', ''), mpi, build) %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/{{ name }}/{{ name }}/releases/download/v{{ version }}/{{ name }}-{{ version[:-2] }}.tar.bz2
sha256: fedb4c684a98ad857cd49b69a3ae51a73f85a9c36e9cb63e3b02320c74454ce6
patches:
- macosxtest.patch # [osx]
- url: https://github.com/{{ name }}/{{ name }}/releases/download/v{{ version }}/{{ name }}-{{ version }}.tar.bz2
sha256: adbcc903c1a78cba98f49fe6905a62b49f12e3dfd7cedea00616d1a5f50550db
patches:
- macosxtest.patch # [osx]
- url: https://github.com/cp2k/dbcsr/releases/download/v2.6.0/dbcsr-2.6.0.tar.gz
sha256: c67b02ff9abc7c1f529af446a9f01f3ef9e5b0574f220259128da8d5ca7e9dc6
folder: exts/dbcsr

build:
number: {{ build }}
string: {{ blas_impl }}_{{ mpi }}_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
# osx build skipped until futher notice:
# - nompi: osx issue introduced in 8.1, fixed in future 8.2
# - openmpi: runtime failures during test suite
skip: true # [not linux]
string: {{ build_string }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }}
- make
- autoconf
- automake
- fypp
- llvm-openmp # [osx]
- libgomp # [linux]
- cmake
- libtool
- python
host:
- {{ mpi }} # [mpi != 'nompi']
- scalapack # [mpi != 'nompi']
- libblas # [osx]
- openblas * *openmp* # [linux]
- liblapack
- llvm-openmp # [osx]
- libgomp # [linux]
- {{ blas_impl }}
- libxsmm
- fftw
- spglib
- libxc >=5.1
- sirius # [mpi != 'nompi']
run:
- {{ mpi }} # [mpi != 'nompi']
- scalapack # [mpi != 'nompi']
- libblas * *{{ blas_impl }}
- libcblas * *{{ blas_impl }}
- liblapack * *{{ blas_impl }}
- scalapack # [mpi != 'nompi' and blas_impl != 'mkl']
- __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64]
- libblas * *openblas # [linux]
- openblas * *openmp* # [linux]

test:
commands:
Expand Down

0 comments on commit 2557e37

Please sign in to comment.