- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I am using ICC to parallelize the following program:
#include <stdio.h> #include <stdlib.h> void foo(int *vector, int length) { int i = 0; for (i=0; i<length; i++) vector= i; }
I am using the following command line:
icc -qopenmp -par-threshold0 -no-vec -fno-inline -parallel -qopt-report-phase=all -qopt-report=5 -std=c99 -lrt -c
Given these flags, the compiler generates the following report:
LOOP BEGIN at test.c(6,3) remark #17109: LOOP WAS AUTO-PARALLELIZED remark #17101: parallel loop shared={ .2 } private={ } firstprivate={ length vector i } lastprivate={ } firstlastprivate={ } reduction={ } remark #15540: loop was not vectorized: auto-vectorization is disabled with -no-vec flag remark #25439: unrolled with remainder by 2 LOOP END
I am expecting something like the report below:
LOOP BEGIN at test.c(6,3) remark #17109: LOOP WAS AUTO-PARALLELIZED remark #17101: parallel loop shared={ } private={ i } firstprivate={ } lastprivate={ } firstlastprivate={ } reduction={ } remark #15540: loop was not vectorized: auto-vectorization is disabled with -no-vec flag remark #25439: unrolled with remainder by 2 LOOP END
It seems to me that the ICC's report disagrees with OpenMP specifications. However, the output for this function is correct. The pointer “ vector ” is assigned as firstprivate, but it is a pointer. The variable “ i ” does not need to copy the initial value, so it can be private and the variable" length " does not need to be firstprivate.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
0 Replies
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