Skip to content

Commit

Permalink
Add heFFTe
Browse files Browse the repository at this point in the history
Add the heFFTe library, a Highly Efficient FFT for Exascale.
  • Loading branch information
ax3l committed Jun 12, 2024
1 parent 5035617 commit dfdd5be
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 0 deletions.
37 changes: 37 additions & 0 deletions recipes/heffte/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@echo on

:: configure
cmake ^
-S %SRC_DIR% -B build ^
%CMAKE_ARGS% ^
-G "Ninja" ^
-DBUILD_SHARED_LIBS=ON ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_C_COMPILER=clang-cl ^
-DCMAKE_CXX_COMPILER=clang-cl ^
-DCMAKE_INSTALL_LIBDIR=lib ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_LINKER=lld-link ^
-DCMAKE_NM=llvm-nm ^
-DCMAKE_VERBOSE_MAKEFILE=ON ^
-DHeffte_DISABLE_GPU_AWARE_MPI=ON ^
-DHeffte_ENABLE_AVX=ON ^
-DHeffte_ENABLE_AVX512=OFF ^
-DHeffte_ENABLE_FFTW=ON ^
-DHeffte_ENABLE_CUDA=OFF ^
-DHeffte_ENABLE_ROCM=OFF ^
-DHeffte_ENABLE_ONEAPI=OFF ^
-DHeffte_ENABLE_MKL=OFF ^
-DHeffte_ENABLE_DOXYGEN=OFF ^
-DHeffte_SEQUENTIAL_TESTING=ON ^
-DHeffte_ENABLE_TESTING=ON ^
-DHeffte_ENABLE_TRACING=OFF ^
-DHeffte_ENABLE_PYTHON=OFF ^
-DHeffte_ENABLE_FORTRAN=OFF ^
-DHeffte_ENABLE_SWIG=OFF ^
-DHeffte_ENABLE_MAGMA=OFF
if errorlevel 1 exit 1

:: build, pack & install
cmake --build build --config Release --parallel %CPU_COUNT% --target install
if errorlevel 1 exit 1
41 changes: 41 additions & 0 deletions recipes/heffte/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

# avoid side-injection of -std=c++14 flag in some toolchains
if [[ ${CXXFLAGS} == *"-std=c++14"* ]]; then
echo "14 -> 17"
export CXXFLAGS="${CXXFLAGS} -std=c++17"
fi
# Darwin modern C++
# https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
if [[ ${target_platform} =~ osx.* ]]; then
export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
fi

# configure
cmake \
-S ${SRC_DIR} -B build \
${CMAKE_ARGS} \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DHeffte_DISABLE_GPU_AWARE_MPI=ON \
-DHeffte_ENABLE_AVX=ON \
-DHeffte_ENABLE_AVX512=OFF \
-DHeffte_ENABLE_FFTW=ON \
-DHeffte_ENABLE_CUDA=OFF \
-DHeffte_ENABLE_ROCM=OFF \
-DHeffte_ENABLE_ONEAPI=OFF \
-DHeffte_ENABLE_MKL=OFF \
-DHeffte_ENABLE_DOXYGEN=OFF \
-DHeffte_SEQUENTIAL_TESTING=ON \
-DHeffte_ENABLE_TESTING=ON \
-DHeffte_ENABLE_TRACING=OFF \
-DHeffte_ENABLE_PYTHON=OFF \
-DHeffte_ENABLE_FORTRAN=OFF \
-DHeffte_ENABLE_SWIG=OFF \
-DHeffte_ENABLE_MAGMA=OFF

# build, pack & install
cmake --build build --parallel ${CPU_COUNT} --target install
3 changes: 3 additions & 0 deletions recipes/heffte/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mpi:
- mpich # [unix]
- openmpi # [unix]
70 changes: 70 additions & 0 deletions recipes/heffte/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{% set name = "heFFTe" %}
{% set version = "2.4.0" %}
{% set build = 0 %}

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

source:
url: https://github.com/icl-utk-edu/heffte/archive/refs/tags/v{{ version }}.tar.gz
sha256: 02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d

build:
number: {{ build }}

# heFFTe depends on MPI, but we do not yet build a Windows-MPI that we trust
skip: true # [win]

# add build string so packages can depend on
# mpi or nompi variants
# dependencies:
# `pkg * mpi_mpich_*` for mpich
# `pkg * mpi_*` for any mpi
{% set mpi_prefix = "mpi_" + mpi %}
string: {{ mpi_prefix }}_h{{ PKG_HASH }}_{{ build }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ stdlib("c") }}
- cmake
- make # [unix]
- pkgconfig
host:
- fftw * mpi_{{ mpi }}_*
- {{ mpi }}
run:
- {{ mpi }}

test:
requires:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ stdlib("c") }}
- cmake
- {{ mpi }}
- make # [unix]

about:
home: https://icl.utk.edu/publications/fft-ecp-fast-fourier-transform
license: BSD-3-Clause
license_family: BSD
license_file: LICENSE
summary: Distributed fast-Fourier transforms in on a heterogeneous systems.

description: |
The Highly Efficient FFT for Exascale (heFFTe) library is being developed
as part of the Exascale Computing Project (ECP), which is a joint project
of the U.S. Department of Energy's Office of Science and National Nuclear
Security Administration (NNSA). HeFFTe delivers algorithms for distributed
fast-Fourier transforms in on a heterogeneous systems, targeting the
upcoming exascale machines.
doc_url: https://icl-utk-edu.github.io/heffte/
dev_url: https://github.com/icl-utk-edu/heffte

extra:
recipe-maintainers:
- ax3l
9 changes: 9 additions & 0 deletions recipes/heffte/run_test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@echo on

set "OMP_NUM_THREADS=2"

cmake -S %PREFIX%\share\heffte\testing -B build_test
if errorlevel 1 exit 1

cmake --build build_test --target test
if errorlevel 1 exit 1
8 changes: 8 additions & 0 deletions recipes/heffte/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -eu -x -o pipefail

export OMP_NUM_THREADS=2

cmake -S ${PREFIX}/share/heffte/testing -B build_test
cmake --build build_test --target test

0 comments on commit dfdd5be

Please sign in to comment.