diff --git a/.conda/elements/cuda/LICENSE b/.conda/elements/cuda/LICENSE new file mode 100644 index 000000000..698d6edf2 --- /dev/null +++ b/.conda/elements/cuda/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2021, Los Alamos National Laboratory +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/.conda/elements/cuda/build.sh b/.conda/elements/cuda/build.sh new file mode 100755 index 000000000..9bda39cb4 --- /dev/null +++ b/.conda/elements/cuda/build.sh @@ -0,0 +1,23 @@ +export SRC_DIR=$(pwd) +echo ${SRC_DIR} +mkdir -p build +cd build + +export MPI_FLAGS="--allow-run-as-root" + +if [ $(uname) == Linux ]; then + export MPI_FLAGS="$MPI_FLAGS;-mca;plm;isolated" +fi + +source "$RECIPE_DIR/../../cross-compile-setup.sh" + +cmake -D CMAKE_BUILD_TYPE:STRING=RELEASE \ + -D CMAKE_INSTALL_PREFIX:PATH=$PREFIX \ + -D CMAKE_CXX_STANDARD:STRING=17 \ + -D VECTOR_ARCH_FLAGS="$VECTOR_ARCH_FLAGS" \ + -D Matar_ENABLE_KOKKOS=ON \ + $CMAKE_ARGS \ + $SRC_DIR \ + -D CMAKE_CXX_FLAGS="$PATCHED_CXXFLAGS" \ + +make install diff --git a/.conda/elements/cuda/meta.yaml b/.conda/elements/cuda/meta.yaml new file mode 100644 index 000000000..0e47c1102 --- /dev/null +++ b/.conda/elements/cuda/meta.yaml @@ -0,0 +1,54 @@ +{% set version = "1.0.0" %} +{% set linux_compiler_version = "10.4.0" %} +#{% set macos_compiler_version = "16" %} + +package: + name: elements-cuda + version: {{ version }} + +source: + - git_url: https://github.com/lanl/ELEMENTS.git + git_depth: 1 + +build: + number: 1 + noarch: False + script_env: + - PLATFORM={{ target_platform }} # [linux] + skip: True # [osx] + skip: False # [linux] + +requirements: # [linux] + build: + - cmake >=3.17.0 + - {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux] + #- {{ compiler('cxx') }}={{ macos_compiler_version }} # [osx] + - cuda-toolkit + - matar-cuda + - openmpi + host: + - openmpi + - matar-cuda + - kokkos=4.1 + run: + - openmpi + - matar-cuda + - kokkos=4.1 + +about: + home: https://github.com/lanl/ELEMENTS + license: BSD-3-Clause + license_family: BSD + license_file: LICENSE + summary: + LANL's for lagrangian mesh libraries. + description: + The C++ ELEMENTS library is a collection of sub-libraries to support implementing a diverse range + of numerical methods on low and high-order meshes. The ELEMENTS library can be used for research + and development of both continuous and discontinuous finite element methods, as well as, + finite volume methods to solve a diverse range of partial differential equations. + dev_url: https://github.com/lanl/Fierro + +extra: + recipe-maintainers: + - fierromechanics diff --git a/.conda/matar/cuda/meta.yaml b/.conda/matar/cuda/meta.yaml index 1e9b000a6..e7df4f34e 100644 --- a/.conda/matar/cuda/meta.yaml +++ b/.conda/matar/cuda/meta.yaml @@ -14,7 +14,7 @@ build: number: 1 noarch: False script_env: - - PLATFORM={{ target_platform }} + - PLATFORM={{ target_platform }} # [linux] skip: True # [osx] skip: False # [linux] diff --git a/.github/workflows/publish-elements-cuda.yaml b/.github/workflows/publish-elements-cuda.yaml new file mode 100644 index 000000000..1023d331e --- /dev/null +++ b/.github/workflows/publish-elements-cuda.yaml @@ -0,0 +1,15 @@ +name: 'Publish Elements-Cuda' + +on: + push: + paths: + - .conda/elements/** + - .github/workflows/publish-elements-cuda.yaml + workflow_dispatch: + +jobs: + publish: + uses: ./.github/workflows/build-conda-package.yaml + with: + recipe_dir: .conda/elements/cuda + secrets: inherit