[Fortran] 纯文本查看 复制代码 program main
use omp_lib
integer::i,j
integer,parameter::nec0=2000
common/matr/ an(nec0,nec0)
write(6,*) 'hello word!'
!$OMP PARALLEL PRIVATE(i,j)
!$OMP DO
do i=1,nec0
do j=1,nec0
an(i,j)=float(i+j)
enddo
enddo
!$OMP END DO
!$OMP END PARALLEL
open(3,file='an.txt',status='unknown')
do i=1,nec0
write(3,*) (an(i,j),j=1,nec0)
enddo
close(3)
stop
end |