Browse Source

Reduce thread count if necessary

pull/2546/head
Martin Kroeker GitHub 6 years ago
parent
commit
a6f45ab7fe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      cpp_thread_test/dgemv_thread_safety.cpp

+ 4
- 0
cpp_thread_test/dgemv_thread_safety.cpp View File

@@ -15,6 +15,10 @@ int main(int argc, char* argv[]){
blasint randomMatSize = 1024; //dimension of the random square matrices and vectors being used
uint32_t numConcurrentThreads = 52; //number of concurrent calls of the functions being tested
uint32_t numTestRounds = 16; //number of testing rounds before success exit
uint32_t maxHwThreads = omp_get_max_threads();
if (maxHwThreads() < 52)
numConcurrentThreads = maxHwThreads -4;
if (argc > 4){
std::cout<<"ERROR: too many arguments for thread safety tester"<<std::endl;


Loading…
Cancel
Save