llnl / llnl/RAJAPerf

Kokos::Min and Kokkos::Max are not being used as defined

Open
#324 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
135
Forks
55
Avg merge
4d 16h
Merged PRs (30d)
5

Description

Kokkos::Min and Kokkos::Max are defined in kokkos/src/Kokkos_Parallel_Reduce.hpp but they are not used in that context by RAJAPerf, leading to these errors when building.

$ cmake -DENABLE_KOKKOS=On ..
$ make -j
...
Building CXX object src/basic-kokkos/CMakeFiles/basic-kokkos.dir/REDUCE3_INT-Kokkos.cpp.o
"/projects/icapt/dog/kokkos/testing/RAJAPerf/src/basic-kokkos/REDUCE3_INT-Kokkos.cpp", line 58: error: no instance of constructor "Kokkos::Min<Scalar, Space>::Min [with Scalar=rajaperf::Int_type, Space=Kokkos::HostSpace]" matches the argument list
            argument types are: (rajaperf::Int_type, rajaperf::Int_type)
        m_vmin = Kokkos::Min<Int_type>(m_vmin, static_cast<Int_type>(min_value));
                 ^

"/projects/icapt/dog/kokkos/testing/RAJAPerf/src/basic-kokkos/REDUCE3_INT-Kokkos.cpp", line 59: error: no instance of constructor "Kokkos::Max<Scalar, Space>::Max [with Scalar=rajaperf::Int_type, Space=Kokkos::HostSpace]" matches the argument list
            argument types are: (rajaperf::Int_type, rajaperf::Int_type)
        m_vmax = Kokkos::Max<Int_type>(m_vmax, static_cast<Int_type>(max_value));
                 ^

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/basic-kokkos/REDUCE3_INT-Kokkos.cpp, especially the failing uses at lines 58-59, and compare them with the Kokkos::Min and Kokkos::Max definitions in kokkos/src/Kokkos_Parallel_Reduce.hpp. Re-run the shown CMake configuration and make command; done means the Kokkos build completes without these constructor errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.