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

Hotfix/ccomplex #1485

Merged
merged 6 commits into from
Aug 20, 2024
Merged
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
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,15 @@ if(QUDA_DOWNLOAD_EIGEN)
SYSTEM YES)
target_include_directories(Eigen SYSTEM INTERFACE ${Eigen_SOURCE_DIR})
install(DIRECTORY ${Eigen_SOURCE_DIR}/Eigen TYPE INCLUDE)

# Eigen 3.4 needs to be patched on Neon with nvc++
if (${CMAKE_CXX_COMPILER_ID} MATCHES "NVHPC")
set(CMAKE_PATCH_EIGEN OFF CACHE BOOL "Internal use only; do not modify")
if (NOT CMAKE_PATCH_EIGEN)
execute_process(COMMAND patch -N "${Eigen_SOURCE_DIR}/Eigen/src/Core/arch/NEON/Complex.h" "${CMAKE_SOURCE_DIR}/cmake/eigen34_neon.diff")
set(CMAKE_PATCH_EIGEN ON CACHE BOOL "Internal use only; do not modify" FORCE)
endif()
endif()
else()
# fall back to using find_package
find_package(Eigen QUIET)
Expand Down
8 changes: 8 additions & 0 deletions cmake/eigen34_neon.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
21c21
< #if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML
---
> #if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML || __NVCOMPILER_LLVM__
393c393
< #if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML
---
> #if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML || __NVCOMPILER_LLVM__
2 changes: 1 addition & 1 deletion include/kernels/spinor_dilute.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace quda {
static constexpr int nColor = nColor_;
static constexpr QudaDilutionType type = type_;
static constexpr int max_dilution_size = get_size<nSpin, nColor>(type);
using V = typename colorspinor_mapper<store_t, nSpin, nColor>::type;
using V = typename colorspinor_mapper<store_t, nSpin, nColor, false, false, true>::type;
int dilution_size;
V v[max_dilution_size];
V src;
Expand Down
10 changes: 8 additions & 2 deletions lib/communicator_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@ namespace quda
static Communicator &get_default_communicator()
{
auto search = communicator_stack.find(default_comm_key);
if (search == communicator_stack.end()) { errorQuda("Default communicator can't be found."); }
if (search == communicator_stack.end()) {
fprintf(getOutputFile(), "Default communicator can't be found\n");
comm_abort(1);
}
return search->second;
}

Communicator &get_current_communicator()
{
auto search = communicator_stack.find(current_key);
if (search == communicator_stack.end()) { errorQuda("Current communicator can't be found."); }
if (search == communicator_stack.end()) {
fprintf(getOutputFile(), "Current communicator can't be found\n");
comm_abort(1);
}
return search->second;
}

Expand Down
1 change: 0 additions & 1 deletion lib/interface_quda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <cstring>
#include <iostream>
#include <sys/time.h>
#include <complex.h>

#include <quda.h>
#include <quda_internal.h>
Expand Down
8 changes: 1 addition & 7 deletions lib/spinor_dilute.in.cu
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,7 @@ namespace quda
const lat_dim_t &local_block, IntList<Nc, N...>)
{
if (src.Ncolor() == Nc) {
if constexpr (Nc <= 32) {
SpinorDilute<real, Ns, Nc>(src, v, type, local_block);
} else {
errorQuda(
"nColor = %d is too large to compile, see QUDA issue #1422 (https://github.com/lattice/quda/issues/1422)",
src.Ncolor());
}
SpinorDilute<real, Ns, Nc>(src, v, type, local_block);
} else {
if constexpr (sizeof...(N) > 0)
spinorDilute<real, Ns>(src, v, type, local_block, IntList<N...>());
Expand Down
1 change: 0 additions & 1 deletion lib/targets/cuda/blas_lapack_cublas.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <complex.h>
#include <blas_lapack.h>
#include <timer.h>
#ifdef NATIVE_LAPACK_LIB
Expand Down
7 changes: 3 additions & 4 deletions tests/staggered_eigensolve_test_gtest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ bool skip_test(test_t test_param)
case QUDA_EIG_IR_ARNOLDI:
// if (spectrum == QUDA_SPECTRUM_LI_EIG || spectrum == QUDA_SPECTRUM_SI_EIG) return true;
return true; // we skip this because it takes an unnecessarily long time and it's covered elsewhere
break;
default: return true; break;
default: return true;
}
} else if (combo_solve_type == QUDA_DIRECT_SOLVE) {
// mat
Expand Down Expand Up @@ -94,10 +93,10 @@ bool skip_test(test_t test_param)
case QUDA_EIG_IR_ARNOLDI:
if (spectrum == QUDA_SPECTRUM_LI_EIG || spectrum == QUDA_SPECTRUM_SI_EIG) return true;
break;
default: return true; break;
default: return true;
}
break;
default: return true; break;
default: return true;
}
}
return false;
Expand Down
Loading