Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daniel #242

Closed
wants to merge 14 commits into from
17 changes: 14 additions & 3 deletions .conda/evpfft-dev/cpu/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ build:
- PLATFORM={{ target_platform }}

requirements:
run:
- {{ compiler('c') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('c') }}={{ macos_compiler_version }} # [osx]
host:
# - {{ 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
Expand All @@ -25,6 +25,17 @@ requirements:
- kokkos=4.1
- hdf5=*=mpi_openmpi_*
- elements
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
Expand Down
7 changes: 4 additions & 3 deletions .conda/evpfft/cuda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ requirements:
- cuda-toolkit
- openmpi
- fierro-heffte-cuda
- hdf5=*=mpi_openmpi_h457a7a6_3
- fierro-trilinos-cuda # Statically linked against Kokkos CUDA kernels from here.
- hdf5=*=mpi_openmpi_*
- kokkos=4.1
- elements
run:
- openmpi
- fierro-heffte-cuda
- hdf5=*=mpi_openmpi_h457a7a6_3
- kokkos=4.1
- hdf5=*=mpi_openmpi_*
- elements

about:
Expand Down
6 changes: 3 additions & 3 deletions .conda/heffte/cuda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build:

requirements:
build:
- cmake=3.24
- cmake >=3.17.0
- {{ compiler('c') }}={{ linux_compiler_version }} # [linux]
- {{ compiler('c') }}={{ macos_compiler_version }} # [osx]
- {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux]
Expand All @@ -37,12 +37,12 @@ requirements:
- libcufft-dev
- libcublas-dev
- libcusparse-dev
- openmpi
- openmpi >=4.1.6,<5.0a0
run:
- cuda-cudart
- libcufft
- libcublas
- openmpi
- openmpi >=4.1.6,<5.0a0

about:
home: https://github.com/lanl/Fierro
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/publish-evpfft-gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Publish EVPFFT-GPU'

on:
push:
paths:
- .conda/evpfft/**
- src/EVPFFT/src/**
- .github/workflows/publish-evpfft-gpu.yaml
workflow_dispatch:

jobs:
publish:
uses: ./.github/workflows/build-conda-package.yaml
with:
recipe_dir: .conda/evpfft/cuda
secrets: inherit
36 changes: 28 additions & 8 deletions scripts/build-fierro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ show_help() {
echo " --kokkos_build_type=<serial|openmp|pthreads|cuda|hip>. Default is 'serial'"
echo " --build_action=<full-app|set-env|install-trilinos|install-hdf5|install-heffte|fierro>. Default is 'full-app'"
echo " --machine=<darwin|chicoma|linux|mac>. Default is 'linux'"
echo " --build_cores=<Integers greater than 0>. Default is set 1"
echo " --heffte_build_type=<fftw|cufft|rocfft>. Default is set 'fftw'"
echo " --build_cores=<Integers greater than 0>. Default is 1"
echo " --build_type=<source|anaconda>. Default is 'source'"
echo " --heffte_build_type=<fftw|cufft|rocfft>. Default is 'fftw'"
echo " --help: Display this help message"
echo " "
echo " "
Expand All @@ -22,6 +23,11 @@ show_help() {
echo " install-uncrustify builds and installs uncrustify. Only necessary for developers"
echo " fierro Generates CMake files and builds Fierro only (none of the dependencies)."
echo " "
echo " --build_type The build type of the applications. Specifies whether we're building from source or using pre-built anaconda libraries"
echo " "
echo " source builds Fierro and libraries from source codes."
echo " anaconda builds Fierro using anaconda pre-built libraries."
echo " "
echo " --solver Builds the desired solver to run. The default action is 'explicit'"
echo " "
echo " all builds both the explicit (non EVPFFT) and implicit solvers. Generally for debugging purposes"
Expand Down Expand Up @@ -63,12 +69,14 @@ machine="linux"
kokkos_build_type="serial"
heffte_build_type="fftw"
build_cores="1"
fierro_build_type="source"

# Define arrays of valid options
valid_build_action=("full-app" "set-env" "install-trilinos" "install-hdf5" "install-heffte" "install-uncrustify" "fierro")
valid_solver=("all" "explicit" "explicit-evpfft" "explicit-ls-evpfft" "implicit")
valid_kokkos_build_types=("serial" "openmp" "pthreads" "cuda" "hip")
valid_heffte_build_types=("fftw" "cufft" "rocfft")
valid_fierro_build_types=("source" "anaconda")
valid_machines=("darwin" "chicoma" "linux" "mac" "msu")

# Parse command line arguments
Expand Down Expand Up @@ -134,6 +142,16 @@ for arg in "$@"; do
return 1
fi
;;
--build_type=*)
option="${arg#*=}"
if [[ " ${valid_fierro_build_types[*]} " == *" $option "* ]]; then
fierro_build_type="$option"
else
echo "Error: Invalid --build_type specified."
show_help
return 1
fi
;;
--help)
show_help
return 1
Expand Down Expand Up @@ -184,12 +202,14 @@ source setup-env.sh ${machine} ${kokkos_build_type} ${build_cores}
# Next, do action based on args
if [ "$build_action" = "full-app" ]; then
source uncrustify-install.sh
source trilinos-install.sh ${kokkos_build_type} ${machine}
if [ "$solver" = "explicit-evpfft" ] || [ "${solver}" = "explicit-ls-evpfft" ]; then
source hdf5-install.sh
source heffte-install.sh ${heffte_build_type} ${machine}
if [ "$fierro_build_type" = "source" ]; then
source trilinos-install.sh ${kokkos_build_type} ${machine}
if [ "$solver" = "explicit-evpfft" ] || [ "${solver}" = "explicit-ls-evpfft" ]; then
source hdf5-install.sh
source heffte-install.sh ${heffte_build_type} ${machine}
fi
fi
source cmake_build.sh ${solver} ${heffte_build_type} ${kokkos_build_type}
source cmake_build.sh ${solver} ${heffte_build_type} ${kokkos_build_type} ${fierro_build_type}
elif [ "$build_action" = "install-trilinos" ]; then
source trilinos-install.sh ${kokkos_build_type} ${machine}
elif [ "$build_action" = "install-hdf5" ]; then
Expand All @@ -199,7 +219,7 @@ elif [ "$build_action" = "install-heffte" ]; then
elif [ "$build_action" = "install-uncrustify" ]; then
source uncrustify-install.sh
elif [ "$build_action" = "fierro" ]; then
source cmake_build.sh ${solver} ${heffte_build_type} ${kokkos_build_type}
source cmake_build.sh ${solver} ${heffte_build_type} ${kokkos_build_type} ${fierro_build_type}
else
echo "No build action, only setup the environment."
fi
Expand Down
4 changes: 3 additions & 1 deletion scripts/cmake_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
solver="${1}"
heffte_build_type="${2}"
kokkos_build_type="${3}"
fierro_build_type="${4}"

#inititialize submodules if they aren't downloaded
[ -d "${libdir}/Elements/elements" ] && echo "Elements submodule exists"
Expand All @@ -22,7 +23,8 @@ else
fi

# Install Elements
if [ ! -d "${ELEMENTS_INSTALL_DIR}/lib" ]; then
if { [ ! -d "${ELEMENTS_INSTALL_DIR}/lib" ] && [ "$fierro_build_type" = "source" ] ;}
then
echo "Installing Elements..."
cmake -D CMAKE_INSTALL_PREFIX="$ELEMENTS_INSTALL_DIR" -D Trilinos_DIR="${Trilinos_DIR}" -D Matar_ENABLE_KOKKOS=ON -D Matar_KOKKOS_PACKAGE=Trilinos -B "${ELEMENTS_BUILD_DIR}" -S "${ELEMENTS_SOURCE_DIR}"
make -C "${ELEMENTS_BUILD_DIR}" -j${FIERRO_BUILD_CORES}
Expand Down
14 changes: 0 additions & 14 deletions src/CLI/CMakeLists.txt

This file was deleted.

168 changes: 0 additions & 168 deletions src/CLI/README.md

This file was deleted.

Loading
Loading