Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

how to parallel assign

ollehyas
Beginner
231 Views

the following codes

"real*8 ,allocatable::a(:,:,:)

allocate(a(3000,100,100))

a=-10"

will spend too many time,

i want to parallel to speed, how to do?

0 Kudos
1 Reply
TimP
Honored Contributor III
231 Views
compile option -Qparallel ought to do as well as anything, in such a simple case. For OpenMP ( compile switch /Qopenmp), you would write
....
!$omp parallel do
do i=1,size(a,3)
!dir$ vector nontemporal
a(:,:,i) = -10
end do

Significant speedup on a dual CPU platform is likely to depend on having NUMA BIOS option set. There may not be much speedup on a single dual core CPU, none on single core HT.
0 Kudos
Reply