- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following simple program
[cpp]#include<cmath>
#define ACCURACY 1e-9
#define MAX_ITER 50
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
namespace hpc_astrodynamics {
inline double x2tof(double x, double s, double c, int lw, const int &N)
{
double am,a,alfa,beta;
am = s/2;
a = am/(1-x*x);
if (x < 1) //ellipse
{
beta = 2 * asin (sqrt((s - c)/(2*a)));
if (lw) beta = -beta;
alfa = 2 * acos(x);
}
else
{
alfa = 2 * acosh(x);
beta = 2 * asinh(sqrt ((s - c)/(-2 * a)));
if (lw) beta = -beta;
}
if (a > 0)
{
return (a * sqrt (a)* ( (alfa - sin(alfa)) - (beta - sin(beta)) + 2*M_PI*N));
}
else
{
return (-a * sqrt(-a)*( (sinh(alfa) - alfa) - ( sinh(beta) - beta)) );
}
}
[\cpp]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was unable to reproduce an error so I must not be using the same options or compiler.
Can you show the compiler version (icpc -V) and the command-line used that produces the error?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey thanks for the quick reply and sorry for the incomplete post.
The compiler line is
icpc -c -xAVX -opt-report-phase=offload -openmp -offload-option,mic,compiler,"-I/usr/include" main.cpp
and the problem is that I must include headers in /usr/include (boost) which messes up with the icc cmath I guess?
Any suggestions are welcome....
Dario
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey thanks for the quick reply and sorry for the incomplete post.
The compiler line is
icpc -c -xAVX -opt-report-phase=offload -openmp -offload-option,mic,compiler,"-I/usr/include" main.cpp
and the problem is that I must include headers in /usr/include (boost) which messes up with the icc cmath I guess?
Any suggestions are welcome....
Dario
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the absence of offloaded code there is no MIC compilation so I'm not sure the code posted was a complete reproducer. Let's try something different.
Can you add -P to the -offload-option string you showed and then attach the mainMIC.i file that is created?

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