Merge pull request #5399 from daavid00/fixMacOS

[FIX]: Build issue if OpenMP is not present
This commit is contained in:
Arne Morten Kvarving 2024-05-31 09:56:39 +02:00 committed by GitHub
commit c92d80e0e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,7 +123,9 @@ apply(Vector& rhs,
//NOTE: copyThread can safely write to jacMat because in solve_system both matrix and *blockJacobiForGPUILU0_ diagonal entries
//are checked and potentially overwritten in replaceZeroDiagonal() by mainThread. However, no matter the thread writing sequence,
//the final entry in jacMat is correct.
#if HAVE_OPENMP
copyThread = std::make_shared<std::thread>([&](){this->copyMatToBlockJac(matrix, *blockJacobiForGPUILU0_);});
#endif // HAVE_OPENMP
}
else {
this->copyMatToBlockJac(matrix, *blockJacobiForGPUILU0_);