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

typos #1478

Merged
merged 2 commits into from
Jun 27, 2024
Merged

typos #1478

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
4 changes: 2 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,13 @@ add_subdirectory(targets/generic)
target_include_directories(quda PRIVATE ../include/targets/generic)
add_subdirectory(interface)

# ignore any unkown pragmas
# ignore any unknown pragmas
target_compile_options(quda_cpp PUBLIC $<$<COMPILE_LANGUAGE:CXX>:
$<$<CXX_COMPILER_ID:Clang>:-Wno-unknown-pragmas>
$<$<CXX_COMPILER_ID:GNU>:-Wno-unknown-pragmas>
>)

# add some deifnitions that cause issues with cmake 3.7 and nvcc only to cpp files
# add some definitions that cause issues with cmake 3.7 and nvcc only to cpp files
target_compile_definitions(quda_cpp PUBLIC -DQUDA_HASH="${HASH}")
if(GITVERSION)
target_compile_definitions(quda_cpp PUBLIC -DGITVERSION="${GITVERSION}")
Expand Down
13 changes: 7 additions & 6 deletions tests/host_reference/contract_ft_reference.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,16 @@ int contractionFT_reference(Float **spinorX, Float **spinorY, const double *cons
const int ntol = 7;
auto epsilon = std::numeric_limits<Float>::epsilon();
auto fact = epsilon;
fact *= sqrt((double)nSpin * 6 * V * 2 / reduction_slices); // account for repeated roundoff in float ops
fact *= 10; // account for variation in phase computation
std::array<double, ntol> tolerance {1.0e-5 * fact, 1.0e-4 * fact, 1.0e-3 * fact, 1.0e-2 * fact,
1.0e-1 * fact, 1.0e+0 * fact, 1.0e+1 * fact};
fact *= sqrt((double)nSpin * 6 * V * comm_size() * 2 / reduction_slices); // account for repeated roundoff in float ops
fact *= 10; // account for variation in phase computation
std::vector<double> tolerance(ntol);
std::generate(tolerance.begin(), tolerance.end(), [step = 1e-6 * fact]() mutable { return step *= 10; });

int check_tol = 5;
std::array<int, ntol> fails = {};
std::vector<int> fails(ntol, 0.0);

for (size_t idx = 0; idx < n_floats; ++idx) {
double rel = abs(d_result[idx] - h_result[idx]) / (abs(h_result[idx]) + epsilon);
double rel = abs(d_result[idx] - h_result[idx]);
// printfQuda("%5ld: %10.3e %10.3e: %10.3e\n", idx, d_result[idx], h_result[idx], rel);
for (int d = 0; d < ntol; ++d)
if (rel > tolerance[d]) ++fails[d];
Expand Down
Loading