Software Archive
Read-only legacy content
17060 Discussions

*MIC* unknown attribute "__leaf__"

Dario_I_
Beginner
475 Views

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]

0 Kudos
4 Replies
Kevin_D_Intel
Employee
475 Views

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.

0 Kudos
Dario_I_
Beginner
475 Views

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

 

 

0 Kudos
Dario_I_
Beginner
475 Views

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

 

 

0 Kudos
Kevin_D_Intel
Employee
475 Views

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?

0 Kudos
Reply