I am developing a code on PGC++ for graphically accelerating the code.
- I am using OpenBabel which has Eigen dependancy.
- I have tried using #pragma acc kernel
- I have tried using #pragma acc routine
- My compilation command is: "pgc++ -acc -ta=tesla -Minfo=all -I/home/pranav/new_installed/include/openbabel-2.0/ -I/home/pranav/new_installed/include/eigen3/ -L/home/pranav/new_installed/lib/openbabel/ main.cpp /home/pranav/new_installed/lib/libopenbabel.so"
I am getting following error
PGCC-S-0155-Procedures called in a compute region must have acc routine information: OpenBabel::OBMol::SetTorsion(OpenBabel::OBAtom *, OpenBabel::OBAtom *, OpenBabel::OBAtom *, OpenBabel::OBAtom *, double) (main.cpp: 66) PGCC-S-0155-Accelerator region ignored; see -Minfo messages (main.cpp) bondRot::two(std::vector>, OpenBabel::OBMol, int, OpenBabel::OBMol): 11, include "bondRot.h" 0, Accelerator region ignored 66, Accelerator restriction: call to 'OpenBabel::OBMol::SetTorsion(OpenBabel::OBAtom *, OpenBabel::OBAtom *, OpenBabel::OBAtom *, OpenBabel::OBAtom *, double)' with no acc routine information PGCC/x86 Linux 15.10-0: compilation completed with severe errors
NOTE: line 66 is "mol.SetTorsion(a[0],a[1],a[2],a[3],i*(3.14159265358979323846/180));" in pasted bode below.
my code which is showing this error is as follows:
#pragma acc routine
public:bool two(vector<OBAtom *> a)
{
std::ostringstream bestanglei,bestanglej;
for(unsigned int i=0;i<=360;i=i+res)
{
for(unsigned int j=0;j<=360;j=j+res)
{
mol.SetTorsion(a[0],a[1],a[2],a[3],i*(3.14159265358979323846/180));
//cout<<i<<"\n";
}
}
return true;
}
From primary search on google, i got idea that this is error which is occurring because of "back dependency" of mol(OBMol object). If anyone knows the solution for it please help me out.