||dank-memer||
||dank-memer||
RRunPod
Created by ||dank-memer|| on 1/24/2025 in #⛅|pods
omp.h unable to access all processors.
Hi! I'm running a pod with 8 vCPUs, but it seems like omp.h can only access 1 of them while thread can access all of them. For example,
c++
#include <omp.h>
#include <thread>
#include <iostream>
using namespace std;

int main(){
cout << omp_get_max_threads() << endl;
cout << thread::hardware_concurrency() << endl;
}
c++
#include <omp.h>
#include <thread>
#include <iostream>
using namespace std;

int main(){
cout << omp_get_max_threads() << endl;
cout << thread::hardware_concurrency() << endl;
}
will print out 1 9
14 replies