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

Try for a reproducer of a host code's build environment failure #1188

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions scripts/spack/configs/blueos_3_ppc64le_ib_p9/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,22 @@ spack:
f77: /usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/bin/xlf
spec: [email protected]
target: ppc64le
- compiler:
environment: {}
extra_rpaths: []
flags:
cflags: --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1
cxxflags: --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1
fflags: --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1
modules: []
operating_system: rhel7
paths:
cc: /usr/tce/packages/clang/clang-ibm-14.0.5/bin/clang
cxx: /usr/tce/packages/clang/clang-ibm-14.0.5/bin/clang++
fc: /usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/bin/xlf2003
f77: /usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/bin/xlf
spec: [email protected]
target: ppc64le
packages:
all:
compiler: [gcc, intel, pgi, clang, xl, nag]
Expand All @@ -118,8 +134,8 @@ spack:
cuda:
buildable: false
externals:
- spec: cuda@11.2.0
prefix: /usr/tce/packages/cuda/cuda-11.2.0
- spec: cuda@11.7.0
prefix: /usr/tce/packages/cuda/cuda-11.7.0

# LLNL blueos mpi
mpi:
Expand All @@ -139,6 +155,8 @@ spack:
prefix: /usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/
- spec: spectrum-mpi@release%[email protected]
prefix: /usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/
- spec: spectrum-mpi@release%[email protected]
prefix: /usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-14.0.5/

# blas is a bit more complicated because its a virtual package so fake it with
# the following per spack docs
Expand All @@ -157,8 +175,8 @@ spack:
# These do not have trailing underscores in their symbols
- spec: [email protected]%[email protected]
prefix: /usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/
- spec: [email protected]%[email protected]
prefix: /usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/
- spec: [email protected]%[email protected]
prefix: /usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-11.2.1/

# System level packages to not build
autoconf:
Expand Down
1 change: 1 addition & 0 deletions scripts/spack/specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"blueos_3_ppc64le_ib_p9":
[ "[email protected]~openmp+devtools+mfem+c2c",
"[email protected]~openmp+devtools+mfem+c2c+cuda cuda_arch=70",
"[email protected]~openmp~devtools~mfem+c2c+cuda cuda_arch=70 ^cuda+allow-unsupported-compilers",
"[email protected]+devtools~mfem+c2c",
"[email protected]+devtools~mfem+c2c+cuda cuda_arch=70",
"[email protected]~openmp+devtools+mfem+c2c",
Expand Down
1 change: 1 addition & 0 deletions src/axom/primal/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ set( primal_tests
primal_hexahedron.cpp
primal_in_sphere.cpp
primal_intersect.cpp
primal_intersect_reproducer.cpp
primal_intersect_impl.cpp
primal_numeric_array.cpp
primal_orientation.cpp
Expand Down
69 changes: 69 additions & 0 deletions src/axom/primal/tests/primal_intersect_reproducer.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Copyright (c) 2017-2023, Lawrence Livermore National Security, LLC and
// other Axom Project Developers. See the top-level LICENSE file for details.
//
// SPDX-License-Identifier: (BSD-3-Clause)

#include "gtest/gtest.h"

#include "axom/config.hpp"

#include "axom/core/execution/execution_space.hpp"
#include "axom/core/memory_management.hpp"

#include "axom/primal/geometry/Hexahedron.hpp"
#include "axom/primal/geometry/Tetrahedron.hpp"

#include "axom/primal/operators/intersection_volume.hpp"

// RAJA
#ifdef AXOM_USE_RAJA
#include "RAJA/RAJA.hpp"
#endif

#include <cmath>

namespace primal = axom::primal;

namespace
{
// #if defined(AXOM_USE_UMPIRE) && defined(AXOM_USE_RAJA) && defined(AXOM_USE_CUDA)
#if defined(AXOM_USE_CUDA) && defined(AXOM_USE_RAJA)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


void reproducer() {
constexpr int BLOCK_SIZE = 256;
using exec = axom::CUDA_EXEC<BLOCK_SIZE>;

RAJA::ReduceMin<RAJA::cuda_reduce, int> reducer(0) ;

axom::for_all<exec>(
4,
AXOM_LAMBDA(int i) {
// RAJA::forall<RAJA::cuda_exec<256, true>>(RAJA::TypedRangeSegment<int>(0, 1), [=] __device__ (int i) {
axom::primal::Hexahedron<double, 3> hex {};
axom::primal::Tetrahedron<double, 3> tet {};
axom::primal::intersection_volume(hex, tet, 1.0e-11);

reducer.min(i);
});
}


AXOM_CUDA_TEST(primal_intersect_reproducer, tet_hex_intersect_reproducer)
{
reproducer();
}

#endif /* AXOM_USE_RAJA && AXOM_USE_UMPIRE */

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------

int main(int argc, char* argv[])
{
::testing::InitGoogleTest(&argc, argv);
axom::slic::SimpleLogger logger(axom::slic::message::Warning);

int result = RUN_ALL_TESTS();
return result;
}
}