- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using:
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2024.1.2 Build 20240508
I'm starting to work with OneAPI's icx compiler and from the start ran into 2 problems:
1. When I try to compile the following example code from the documentation of GCC's quadmath:
#include <quadmath.h> #include <stdlib.h> #include <stdio.h> int main () { __float128 r; int prec = 20; int width = 46; char buf[128]; r = 2.0q; r = sqrtq (r); int n = quadmath_snprintf (buf, sizeof buf, "%+-#*.20Qe", width, r); if ((size_t) n < sizeof buf) printf ("%s\n", buf); /* Prints: +1.41421356237309504880e+00 */ quadmath_snprintf (buf, sizeof buf, "%Qa", r); if ((size_t) n < sizeof buf) printf ("%s\n", buf); /* Prints: 0x1.6a09e667f3bcc908b2fb1366ea96p+0 */ n = quadmath_snprintf (NULL, 0, "%+-#46.*Qe", prec, r); if (n > -1) { char *str = malloc (n + 1); if (str) { quadmath_snprintf (str, n + 1, "%+-#46.*Qe", prec, r); printf ("%s\n", str); /* Prints: +1.41421356237309504880e+00 */ } free (str); } return 0; }
with
$>icx -c tes_quadmath_snprintf.c
I get the error message:
tes_quadmath_snprintf.c:2:10: fatal error: 'quadmath.h' file not found
When I was using icc, I did not need to explicitly include the path to the headers of quadmath in order to compile the code.
I thought that OneAPI was supposed to fully support GCC. What is the best way to circumvent this error? Should I simply statically include (with '-I') the path to the headers?
2. When I use response files to set the compiler options, according to the documentation here:
it seems that comments starting with '#' can not be included in the file, otherwise a lot of error messages pop up. For instance, if I create the response1.txt file with
# response file: response1.txt
# compile with these options
-W0
# end of response1 file
and try to compile with
$>icx @response1.txt ..
i get:
icx: error: no such file or directory: '#'
icx: error: no such file or directory: 'response'
icx: error: no such file or directory: 'file:'
icx: error: no such file or directory: '#'
icx: error: no such file or directory: 'compile'
icx: error: no such file or directory: 'with'
icx: error: no such file or directory: 'these'
icx: error: no such file or directory: 'options'
icx: error: no such file or directory: '#'
icx: error: no such file or directory: 'end'
icx: error: no such file or directory: 'of'
icx: error: no such file or directory: 'response1'
icx: error: no such file or directory: 'file'
Is this just a bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes looks like you need to use that workaround for now.
icx compiler cannot parse the comments in response files, so that document is wrong, and I will submit an issue ticket. Also please note that -w0 is not supported by icx compiler either, I will submit another issue ticket for that.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
_Quad type is not supported. If you want compile on Linux with icx, try to include the quad.c under your gcc/x86_64-linux-gnu directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. That concerns the first question.
Indeed, compiling with
$>icx -I/usr/lib/gcc/x86_64-redhat-linux/14/include -lquadmath tes_quadmath_snprintf.c
works and produces the same results as when compiling with gcc.
So, for now I'm stuck with this workaround? Will icx support quadmath in the near future?
As for the second question, have you verified that icx does not support comments in response files, contrary to the example in the documentation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes looks like you need to use that workaround for now.
icx compiler cannot parse the comments in response files, so that document is wrong, and I will submit an issue ticket. Also please note that -w0 is not supported by icx compiler either, I will submit another issue ticket for that.
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page