Skip to content

Commit

Permalink
Merge pull request #148 from kpwelsh/main
Browse files Browse the repository at this point in the history
Add Github Actions for CI/CD
  • Loading branch information
kpwelsh committed Dec 18, 2023
2 parents e086020 + f1fbbc6 commit dd89c37
Show file tree
Hide file tree
Showing 66 changed files with 729 additions and 201 deletions.
168 changes: 168 additions & 0 deletions .conda/README.md

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions .conda/build_variants.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# These "# [...]" comments are functional.
# They enable the line when the thing in [...] is a valid python expression that
# evaluates to True. linux and osx are variables provided to us and set to True if
# we are running conda-build on a Linux OS or MacOS, respectively.
c_compiler:
- gcc # [linux]
- clang # [osx]
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
target_platform:
- linux-64 # [linux]
- linux-aarch64 # [linux]
- linux-ppc64le # [linux]
- osx-64 # [osx]
- osx-arm64 # [osx]
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

CMAKE_PLATFORM_FLAGS+=(-DCMAKE_TOOLCHAIN_FILE="${SCRIPT_DIR}/cross-linux.cmake")
source "${SCRIPT_DIR}/patch_conda_cxxflags.sh"

# Make sure the MPI wrappers find the right compilers
export OMPI_CC=$GCC
export OMPI_CXX=$GXX
export OMPI_FC=$F90
export OMPI_CC=$CC
export OMPI_CXX=$CXX
export OMPI_FC=$FC
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ $(uname) == Linux ]; then
export MPI_FLAGS="$MPI_FLAGS;-mca;plm;isolated"
fi

source "$RECIPE_DIR/../../add-compiler-flags.sh"
source "$RECIPE_DIR/../cross-compile-setup.sh"

cmake -D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D CMAKE_INSTALL_PREFIX:PATH=$PREFIX \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% set version = "1.0.0" %}
{% set compiler_version = "10.4.0" %}
{% set linux_compiler_version = "10.4.0" %}
{% set macos_compiler_version = "12" %}

package:
name: elements
Expand All @@ -13,13 +14,13 @@ build:
number: 1
noarch: False
script_env:
- PLATFORM={{ target_platform }}
- PLATFORM={{ target_platform }} # [linux]

requirements:
build:
- cmake >=3.10.0
- {{ compiler('c') }} ={{ compiler_version }}
- {{ compiler('cxx') }} ={{ compiler_version }}
- {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('cxx') }}={{ macos_compiler_version }} # [osx]

about:
home: https://github.com/lanl/Fierro
Expand Down
3 changes: 3 additions & 0 deletions .conda/empty.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file exists for the build-conda-package github action.
empty:
- 0
37 changes: 37 additions & 0 deletions .conda/evpfft-dev/cpu/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{% set version = "1.0.0" %}
{% set linux_compiler_version = "10.4.0" %}
{% set macos_compiler_version = "12" %}

package:
name: evpfft-dev
version: {{ version }}

build:
number: 1
noarch: generic
skip: True # [not (linux and x86_64)]
script_env:
- PLATFORM={{ target_platform }}

requirements:
run:
- {{ compiler('c') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('c') }}={{ macos_compiler_version }} # [osx]
- {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('cxx') }}={{ macos_compiler_version }} # [osx]
- openmpi
- fierro-heffte
- fftw=*=mpi_openmpi_*
- kokkos=4.1
- hdf5=*=mpi_openmpi_*
- elements

about:
home: https://github.com/lanl/Fierro
summary: This is a metapackage for EVPFFT developers. Installing this package gives you all the dependencies necessary to build EVPFFT from source.
description:
dev_url: https://github.com/lanl/Fierro

extra:
recipe-maintainers:
- kwelsh-lanl
32 changes: 32 additions & 0 deletions .conda/evpfft-gui/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package:
name: evpfft_gui
version: 2

source:
path: ../../
# - git_url: https://github.com/lanl/Fierro.git
# depth: 1

build:
number: 0
script: cd python/EVPFFT-GUI/; pip install .
noarch: python # This is a pure python package. So build for noarch on linux64
entry_points:
- evpfft-gui = evpfft_gui.gui:main
skip: true # [not (linux and x86_64)]
skip: false # [linux and x86_64]

requirements:
host:
- python
- setuptools
run:
- paraview=5.11.2
- evpfft
- fierro-voxelizer
- python
- pyside6=6.5

test:
imports:
- evpfft_gui
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Patch the cxx variables for cross-compilation
source "$RECIPE_DIR/../../add-compiler-flags.sh"
source "$RECIPE_DIR/../../cross-compile-setup.sh"

cd src/EVPFFT
mkdir build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{% set version = "1.0.0" %}
{% set compiler_version = "10.4.0" %}
{% set linux_compiler_version = "10.4.0" %}
{% set macos_compiler_version = "12" %}

package:
name: fierro-evpfft
name: evpfft
version: {{ version }}

source:
Expand All @@ -17,21 +18,23 @@ build:
requirements:
build:
- cmake >=3.17.0
- {{ compiler('c') }} ={{ compiler_version }}
- {{ compiler('cxx') }} ={{ compiler_version }}
- {{ compiler('c') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('c') }}={{ macos_compiler_version }} # [osx]
- {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('cxx') }}={{ macos_compiler_version }} # [osx]
- openmpi
host:
- openmpi
- fierro-heffte
- fftw=*=mpi_openmpi_*
- kokkos
- kokkos=4.1
- hdf5=*=mpi_openmpi_*
- elements
run:
- openmpi
- fierro-heffte
- fftw=*=mpi_openmpi_*
- kokkos
- kokkos=4.1
- hdf5=*=mpi_openmpi_*
- elements

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
####

# Patch the cxx variables for cross-compilation
source "$RECIPE_DIR/../../add-compiler-flags.sh"
source "$RECIPE_DIR/../../cross-compile-setup.sh"

# MPICXX -> nvcc_wrapper -> nvcc -> $GXX
# ^ Passes $NVCC_WRAPPER_DEFAULT_COMPILER as the host compiler to nvcc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{% set version = "1.0.0" %}
{% set compiler_version = "10.4.0" %}
{% set linux_compiler_version = "10.4.0" %}
{% set macos_compiler_version = "12" %}

package:
name: fierro-evpfft-cuda
name: evpfft-cuda
version: {{ version }}

source:
Expand All @@ -17,8 +18,8 @@ build:
requirements:
build:
- cmake >=3.17.0
- {{ compiler('c') }} ={{ compiler_version }}
- {{ compiler('cxx') }} ={{ compiler_version }}
- {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('cxx') }}={{ macos_compiler_version }} # [osx]
- cuda-compiler
- openmpi
host:
Expand All @@ -28,7 +29,6 @@ requirements:
- hdf5=*=mpi_openmpi_h457a7a6_3
- fierro-trilinos-cuda # Statically linked against Kokkos CUDA kernels from here.
- elements

run:
- openmpi
- fierro-heffte-cuda
Expand Down
33 changes: 33 additions & 0 deletions .conda/fierro-dev/cpu/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% set version = "1.0.0" %}
{% set compiler_version = "10.4.0" %}

package:
name: fierro-dev
version: {{ version }}

build:
number: 1
noarch: generic
skip: True # [not (linux and x86_64)]
script_env:
- PLATFORM={{ target_platform }}

requirements:
run:
- cmake >=3.17
- {{ compiler('cxx') }}={{ compiler_version }}
- fierro-trilinos-cpu
- mpi
- elements

about:
home: https://github.com/lanl/Fierro
license: BSD-3-Clause
license_family: BSD
summary:
Metapackage for consolidating development dependencies for fierro.
dev_url: https://github.com/lanl/Fierro

extra:
recipe-maintainers:
- kwelsh-lanl
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ $(uname) == Linux ]; then
fi

# These flag variables are set by anaconda.
source "$RECIPE_DIR/../../add-compiler-flags.sh"
source "$RECIPE_DIR/../../cross-compile-setup.sh"

cmake -D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D CMAKE_INSTALL_PREFIX:PATH=$PREFIX \
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ if [ $(uname) == Linux ]; then
export MPI_FLAGS="$MPI_FLAGS;-mca;plm;isolated"
fi

source "$RECIPE_DIR/../../add-compiler-flags.sh"
source "$RECIPE_DIR/../../cross-compile-setup.sh"

# I don't know why, but I couldn't compile for osx-arm64 from osx-64 with shared libs.
cmake -D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D BUILD_SHARED_LIBS=ON \
-D BUILD_SHARED_LIBS=OFF \
-D CMAKE_INSTALL_PREFIX:PATH=$PREFIX \
-D CMAKE_CXX_STANDARD:STRING=17 \
-D Heffte_ENABLE_FFTW=ON \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% set version = "1.0.0" %}
{% set compiler_version = "10.4.0" %}
{% set linux_compiler_version = "10.4.0" %}
{% set macos_compiler_version = "12" %}

package:
name: fierro-heffte
Expand All @@ -18,8 +19,8 @@ build:
requirements:
build:
- cmake >=3.17.0
- {{ compiler('c') }} ={{ compiler_version }}
- {{ compiler('cxx') }} ={{ compiler_version }}
- {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('cxx') }} # [osx]
- openmpi
host:
- openmpi
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ if [ $(uname) == Linux ]; then
export MPI_FLAGS="$MPI_FLAGS;-mca;plm;isolated"
fi

source "$RECIPE_DIR/../../add-compiler-flags.sh"
source "$RECIPE_DIR/../../cross-compile-setup.sh"

export OMPI_CXX=nvcc
# Only do this for cross compiling
if [ "$PLATFORM" != "linux-64" ] ; then
export NVCC_PREPEND_FLAGS="-ccbin $CXX";
fi
# These things need to be set for certain cmake versions.
# The cmake CUDA compiler tests need to see the host env libs
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH $PREFIX/lib"
export LIBRARIES="$LIBRARIES \"-L$PREFIX/lib\""

cmake -D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D BUILD_SHARED_LIBS=ON \
Expand All @@ -21,9 +29,11 @@ cmake -D CMAKE_BUILD_TYPE:STRING=RELEASE \
-D Heffte_DISABLE_GPU_AWARE_MPI=ON \
$CMAKE_ARGS \
$SRC_DIR \
-D CMAKE_CXX_FLAGS=$PATCHED_CXXFLAGS \
-D CMAKE_CXX_FLAGS="$PATCHED_CXXFLAGS" \
-D MPI_C_COMPILER="$BUILD_PREFIX/bin/mpicc" \
-D MPI_CXX_COMPILER="$BUILD_PREFIX/bin/mpicxx" \
-D CMAKE_CUDA_HOST_LINK_LAUNCHER=$CXX \
-D CMAKE_CUDA_COMPILER=$(which nvcc) \

make -j 10 install

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% set version = "1.0.0" %}
{% set compiler_version = "10.4.0" %}
{% set linux_compiler_version = "10.4.0" %}
{% set macos_compiler_version = "12" %}
{% set cuda_version = "12.3" %}

package:
name: fierro-heffte-cuda
Expand All @@ -14,18 +16,27 @@ build:
noarch: False
script_env:
- PLATFORM={{ target_platform }}
skip: True # [osx]
skip: False # [linux]

requirements:
build:
- cmake >=3.17.0
- {{ compiler('c') }} ={{ compiler_version }}
- {{ compiler('cxx') }} ={{ compiler_version }}
- cuda-toolkit
- cmake=3.24
- {{ compiler('c') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('c') }}={{ macos_compiler_version }} # [osx]
- {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('cxx') }}={{ macos_compiler_version }} # [osx]
- {{ compiler('fortran') }}={{ linux_compiler_version }}
- openmpi
- cuda-toolkit={{ cuda_version }}
# These host CUDA dependencies are definitely overspecified.
# Not sure which ones are totally necessary.
host:
- cuda-cudart-dev
- libcublas-dev
- cuda-cudart-static={{ cuda_version }} # Make sure your nvcc version and cudart versions are the same
- libcusolver-dev
- libcufft-dev
- libcublas-dev
- libcusparse-dev
- openmpi
run:
- cuda-cudart
Expand Down
File renamed without changes.
Loading

0 comments on commit dd89c37

Please sign in to comment.