Merge pull request #2549 from martin-frbg/fixthreadtest

Match thread count in cpp_thread_test to host capability
This commit is contained in:
Martin Kroeker 2020-04-10 23:54:40 +02:00 committed by GitHub
commit ea85eb2e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,10 @@ int main(int argc, char* argv[]){
blasint randomMatSize = 1024; //dimension of the random square matrices used
uint32_t numConcurrentThreads = 96; //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 < 96)
numConcurrentThreads = maxHwThreads;
if (argc > 4){
std::cout<<"ERROR: too many arguments for thread safety tester"<<std::endl;

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;