boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Computation版 - OpenMP入门级问题
相关主题
OpenMP新手,请问以下HelloWorld程序为什么跑不出并行来
C++的程序,想改成并行计算,用什么好?
关于CUDA
我们碰到的大麻烦——急寻计算机工作和博后机会 (转载)
who has experience of OMP?
有lsf queue大牛么
有没有free的Fortran Compiler阿?
1 Multi-Processing with OpenMP zz
OpenMP Multi-Processing 2 zz
Using OpenMP 3 zz
相关话题的讨论汇总
话题: tid话题: omp话题: threads话题: num话题: openmp
进入Computation版参与讨论
1 (共1页)
g****n
发帖数: 13
1
Hi
I am new to openMP. now I have some question about it.
I wrote a very simple program in C++.
#include
#include
main ()
{
int nthreads, tid;
int i;
omp_set_num_threads(2);
printf("Number of CPUS:%d\n",omp_get_num_procs());
/* Fork a team of threads giving them their own copies of variables */
#pragma omp parallel private(tid)
{
tid = omp_get_thread_num();
if(tid==0)
{
printf("tid=%d thread = %d\n", 0,tid);
printf("there are %d threads\n",omp_get_num_threads
t****n
发帖数: 39
2
Probably it's a bug. I don't have such problem with SGI compiler.

【在 g****n 的大作中提到】
: Hi
: I am new to openMP. now I have some question about it.
: I wrote a very simple program in C++.
: #include
: #include
: main ()
: {
: int nthreads, tid;
: int i;
: omp_set_num_threads(2);

1 (共1页)
进入Computation版参与讨论
相关主题
Using OpenMP 3 zz
Fortran里怎么利用多CPU?
请教1万个变量的线性方程组怎么解啊?
Openmp问题请教
请教如何编写利用多核(multi-core)的Fortran 程序?
请教关于并行计算。
【求助】稀疏矩阵与向量相乘,如何有效并行?
混合体系怎么编程?
想用系里的高性能计算机,请问怎么知道我需要多少核?
求推荐openmp的debugger
相关话题的讨论汇总
话题: tid话题: omp话题: threads话题: num话题: openmp