Coder Social home page Coder Social logo

ppc-2024-threads's People

Contributors

agentv0 avatar alexfrom38 avatar allnes avatar amazingkivas avatar ekistrimova avatar firewallgr avatar firstbourne avatar frenetz avatar geronlmo avatar igorkonovalovaleks avatar isk7 avatar ks2k23 avatar lesnikowka avatar mada40 avatar marissa696 avatar maximflunn avatar mineshadow7 avatar mishaizlesa avatar mortus19 avatar nik-se0 avatar nol0n avatar oleg212 avatar overinvest avatar petrbonyuk avatar puchiglass avatar savotina avatar soileks avatar stepa123de avatar trolozor avatar veto1234-ii avatar

Stargazers

 avatar  avatar

Watchers

 avatar

ppc-2024-threads's Issues

Possible infinite loop in the test in the master branch

while (true) {
std::vector<double> A_Dir(size, 0.0);
#pragma omp parallel for shared(matrix_ptr, direction, A_Dir)
for (long i = 0; i < size; ++i) {
for (long j = 0; j < size; ++j) {
A_Dir[i] += matrix_ptr[i * size + j] * direction[j];
}
}
double residual_dot_residual = 0.0;
double A_Dir_dot_direction = 0.0;
#pragma omp parallel for reduction(+ : residual_dot_residual, A_Dir_dot_direction)
for (long i = 0; i < size; ++i) {
residual_dot_residual += residual[i] * residual[i];
A_Dir_dot_direction += A_Dir[i] * direction[i];
}
double alpha = residual_dot_residual / A_Dir_dot_direction;
#pragma omp parallel for
for (long i = 0; i < static_cast<long>(result.size()); ++i) {
result[i] += alpha * direction[i];
}
#pragma omp parallel for
for (long i = 0; i < static_cast<long>(residual.size()); ++i) {
residual[i] = prev_residual[i] - alpha * A_Dir[i];
}
double new_residual = 0.0;
#pragma omp parallel for reduction(+ : new_residual)
for (long i = 0; i < static_cast<long>(residual.size()); ++i) {
new_residual += residual[i] * residual[i];
}
if (sqrt(new_residual) < TOLERANCE) {
break;
}
double beta = new_residual / residual_dot_residual;
#pragma omp parallel for
for (long i = 0; i < size; ++i) {
direction[i] = residual[i] + beta * direction[i];
}
prev_residual = residual;
}

The code can be executed indefinitely or for a very long time due to the fact that the matrix consists of random numbers and as a result of errors in rounding floating-point numbers.

Code added in #284.

Cppcheck >= 2.11 crashes build on missingInclude parameter.

Head of the Issue

  • Build crashes using Cppcheck newest versions.

Expected behavior

  • No crash on Building tasks and modules.

Description

  • On Unix-based systems if building using newer packages of Cppcheck (>= 2.11) project crashes because it searches for include files and fails for some reason.
  • This might be happening because since Cppcheck version 2.11 :

"missingInclude" and "missingIncludeSystem" are reported with "-j" is > 1 and processes are used in the backend (default in non-Windows binaries).

And

"missingInclude" and "missingIncludeSystem" will now cause the "--error-exitcode" to be applied.

Suggested fixes

  • In cmake configure.cmake file for UNIX Cppcheck MACRO set parameter

--disable=missingInclude

To disable missingInclude checks parameter.

HW/SW Specifications tested on:

System: x86_64 Arch Linux on 6.8.5-arch1-1 (64-bit)
Project version: Any latest main branch.
Cppcheck version: 2.12.0
GCC version: gcc (GCC) 13.2.1 20230801
Clang Version: clang version 17.0.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.