我在Snow Leopard和linux上编译了这段代码,得到了不同的结果。在Snow leopard上,omp_get_max_threads的第一次调用返回2,第二次返回1。在linux上,两次调用都返回4。我认为Linux的行为是正确的,对吗?都是正确的,我只是对这个函数有误解?#include <stdio.h> printf(" In a serial region; max threads ar
>int cores = 1;omp_set_num_threads(cores);
int n = as/redhat_5_x86_64/pkgs/gcc_4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/include/omp.h: In function 'SEXPREC/