- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... i should have initialized the var.
my mistake!
v

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page