- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I made a console application which print something and then exit, after printing instead of exit immediately, like the same application compiled with other compilers it delays the exit, what would be the reason for that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok I found the issue:
Basically before the loop that follows, I have:
v85 = v5 + 1;
v87 = 1;
for ( j = v87; j <= v83; ++j ) //V87 TRAIN FROM, V83 PREDICT TO
{
*(int *)(handle + sizeof(int) * j) = *(int *)(byte_4BC818 + sizeof(int) * j);
}
so I had to move the line v85 = v5 + 1; after the scanf that counts how many values are in the data file, v5 is the counter.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why is it related to Intel DPC++/C++ compiler?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The issue seems related to optimization, when turned off, works fine, when turn on, sometime got output and sometime no output but always delay in exit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A reproducer and exact commands used need to be provided for understanding your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These are the commands:
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE ; THIS IS THE ONLY ONE THAT WORKS FINE.
and also tried:
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED -fprofile-instr-generate
VRASPEED 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED -fprofile-instr-use=code.profdata
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE -fprofile-instr-generate
VRASIZE 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE -fprofile-instr-use=code.profdata
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1 -fprofile-instr-generate
VRASPEED1 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1 -fprofile-instr-use=code.profdata
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED -fprofile-instr-generate
VRAMAXSPEED 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED -fprofile-instr-use=code.profdata
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2 -fprofile-instr-generate
VRASIZE2 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2 -fprofile-instr-use=code.profdata
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2 -fprofile-instr-generate
VRASPEED2 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED2 -fprofile-instr-use=code.profdata
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE -fprofile-instr-generate
VRADISABLE 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE -fprofile-instr-use=code.profdata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED -fprofile-instr-generate
VRASPEED 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED -fprofile-instr-use=code.profdata
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE -fprofile-instr-generate
VRASIZE 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE -fprofile-instr-use=code.profdata
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1 -fprofile-instr-generate
VRASPEED1 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1 -fprofile-instr-use=code.profdata
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED -fprofile-instr-generate
VRAMAXSPEED 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED -fprofile-instr-use=code.profdata
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2 -fprofile-instr-generate
VRASIZE2 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2 -fprofile-instr-use=code.profdata
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2 -fprofile-instr-generate
VRASPEED2 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED2 -fprofile-instr-use=code.profdata
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE -fprofile-instr-generate
VRADISABLE 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE -fprofile-instr-use=code.profdata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is VRA.c ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We need to have your VRA.c source file to duplicate your observation and investigate it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
to run as vra.exe 1.txt 3 2
Also please note that it works only if optimizations are disabled.
On same other compilers it works even with optimizations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok I found the issue:
Basically before the loop that follows, I have:
v85 = v5 + 1;
v87 = 1;
for ( j = v87; j <= v83; ++j ) //V87 TRAIN FROM, V83 PREDICT TO
{
*(int *)(handle + sizeof(int) * j) = *(int *)(byte_4BC818 + sizeof(int) * j);
}
so I had to move the line v85 = v5 + 1; after the scanf that counts how many values are in the data file, v5 is the counter.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page