hi all
the following code is bugus.
v
ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.106 Build 20131008
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
cat intel_reduction.f90
program test
use omp_lib
implicit none
integer :: i
!i=0 !omp initializer wrongly set
!$omp parallel reduction(+:i)
i=1
!$omp end parallel
if(i.ne.omp_get_max_threads()) then
write(*,*) i
stop 'err1'
endif
end program test
export OMP_NUM_THREADS=4; ifort -fopenmp intel_reduction.f90 ; ./a.out
32771
err1