- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Intel community,
I am currently facing an issue while attempting to build the HPTT library, which successfully compiles with icpc but encounters problems with icpx.
Here is a minimal working example that demonstrates the issue:
int main(){
int N = 100;
int a[N];
#pragma vector nontemporal
#pragma omp parallel for
for (int i = 0 ; i < N; i++){
a[i] = 0;
}
return 0;
}
The compilation command is
icpx main.cpp -qopenmp
The icpx throws the following error:
main.cpp:5:3: error: expected a for, while, or do-while loop to follow '#pragma vector'
#pragma omp parallel for
^
It seems that icpx is unable to recognize the for loop immediately after the OpenMP pragma, whereas icpc handles it correctly.
I am seeking guidance on understanding the impacts of changing the compiler from icpc to icpx in this context.
Any insights or recommendations on how to address this issue would be appreciated.
Thank you in advance.
HPTT is https://github.com/springer13/hptt.
The details of this library are probably not relevant to this issue.
The code I am actually trying to compile is more complex, so if you need that information, I will provide it.
The compiler information is:
$icpx --version
Intel(R) oneAPI DPC++/C++ Compiler 2023.0.0 (2023.0.0.20221201)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/local/intel/oneapi/compiler/2023.0.0/linux/bin-llvm
Configuration file: /home/local/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/../bin/icpx.cfg
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ultimatile thanks for posting your question here. I've escalated your issue and our engineers will work on it internally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I deeply appreciate your reply and escalation to the engineers.
I have been provided with a workaround, which I will share here.
The workaround involves using "#pragma omp parallel for simd nontemporal" instead of "#pragma vector nontemporal" and "#pragma omp parallel for."
Below is the code provided by the Intel engineer:
#include <omp.h>
int main(){
int N = 10000; int a[N];
#pragma omp parallel for simd nontemporal (a)
for (int i = 0 ; i < N; i++){
a[i] = 0;
}
return 0;
}
This code can compile successfully with icpx.

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