improve omp test
This commit is contained in:
parent
575e5d2a2b
commit
e596c5cd7c
|
@ -69,17 +69,10 @@ int main(int argc, char **argv) {
|
||||||
config.char_list_file);
|
config.char_list_file);
|
||||||
|
|
||||||
#ifdef USE_MKL
|
#ifdef USE_MKL
|
||||||
int i;
|
#pragma omp parallel
|
||||||
std::cout << ">>>>>>>>>>>>>>> Testing MKL <<<<<<<<<<<<<<<<< " << std::endl;
|
for (auto i = 0; i < 10; i++) {
|
||||||
#pragma omp parallel for private(i)
|
assert(config.cpu_math_library_num_threads == omp_get_num_threads());
|
||||||
for (i = 0; i < 50; i++) {
|
|
||||||
std::cout << "omp_get_num_threads(): " << omp_get_num_threads()
|
|
||||||
<< std::endl;
|
|
||||||
int tid = omp_get_thread_num();
|
|
||||||
std::cout << "Log from omp thread " << tid << std::endl;
|
|
||||||
}
|
}
|
||||||
std::cout << ">>>>>>>>>>>>>>> Testing MKL Finished <<<<<<<<<<<<<<<<< "
|
|
||||||
<< std::endl;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto start = std::chrono::system_clock::now();
|
auto start = std::chrono::system_clock::now();
|
||||||
|
|
Loading…
Reference in New Issue