diff --git a/recipes/heffte/bld.bat b/recipes/heffte/bld.bat new file mode 100755 index 0000000000000..6479e46da819f --- /dev/null +++ b/recipes/heffte/bld.bat @@ -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 diff --git a/recipes/heffte/build.sh b/recipes/heffte/build.sh new file mode 100755 index 0000000000000..ba81650cfbdae --- /dev/null +++ b/recipes/heffte/build.sh @@ -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 diff --git a/recipes/heffte/conda_build_config.yaml b/recipes/heffte/conda_build_config.yaml new file mode 100644 index 0000000000000..b1189a6e71695 --- /dev/null +++ b/recipes/heffte/conda_build_config.yaml @@ -0,0 +1,3 @@ +mpi: + - mpich # [unix] + - openmpi # [unix] diff --git a/recipes/heffte/meta.yaml b/recipes/heffte/meta.yaml new file mode 100644 index 0000000000000..80d80c91770ae --- /dev/null +++ b/recipes/heffte/meta.yaml @@ -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 diff --git a/recipes/heffte/run_test.bat b/recipes/heffte/run_test.bat new file mode 100755 index 0000000000000..82a83963c1791 --- /dev/null +++ b/recipes/heffte/run_test.bat @@ -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 diff --git a/recipes/heffte/run_test.sh b/recipes/heffte/run_test.sh new file mode 100755 index 0000000000000..2bddaf3a1c193 --- /dev/null +++ b/recipes/heffte/run_test.sh @@ -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