Make test dependent on num devices
@@ -16,6 +16,11 @@ int check_res(double * v, int n) {
}
int main() {
+ int max_devs = omp_get_num_devices();
+
+ // not enough devices for testing?
+ if (max_devs < 2) return 0;
+
int devnums = 3;
int devids[] = {0,1, omp_get_initial_device()};
int n = N;
