|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
编译器在这下载:gfortran for window
http://www.equation.com/servlet/equation.cmd?fa=fortran
第1个程序hello.f90
- program hello
- integer nthreads,tid,omp_get_num_threads,omp_get_thread_num
- !$omp parallel private(tid)
- tid=omp_get_thread_num()
- print*,'hello world from thread=',tid
- if(tid.eq.0) then
- nthreads=omp_get_num_threads()
- print*,'number of threads=',nthreads
- end if
- !$omp end parallel
- end
复制代码
编译和运行参见附图
[ 本帖最后由 shirazbj 于 2011-7-21 21:39 编辑 ] |
|