PGCC-S-1000-Call in OpenACC region to procedure '__cxa_vec_c

I got the following error messages when compiling my code. Would someone please help me with it?

process(Align, Stack<Align> &, int, const unsigned long *, const unsigned long *, const Array<unsigned int> &, const String &, const String &, Stack<Align> &):
    163, Generating implicit acc routine seq
PGCC-S-1000-Call in OpenACC region to procedure '__cxa_vec_ctor' which has no acc routine information (/home/lisanhu/AccSequencer/align.cc: 204)
dfs_agent2(const Align &, Stack<Align> &, int, const unsigned long *, const unsigned long *, const Array<unsigned int> &, const String &, const String &):
    204, Generating implicit acc routine seq
        205, Accelerator restriction: call to '__cxa_vec_ctor' with no acc routine information

source code of align.cc from line 203-212

void dfs_agent2(const Align &root, Stack<Align> &alns, i32_mt max_diff_base, const u64_mt *c,
				const u64_mt *o, const Array<u32_mt> &d, const String &query, const String &bwt) {
	Align nodes[MAX_ALN_LENGTH];
	Stack<Align> store(nodes, MAX_ALN_LENGTH);
	store.push(root);
	while (!store.empty()) {
		Align a = store.pop();
		process(a, store, max_diff_base, c, o, d, query, bwt, alns);
	}
}

I’ve googled some pages and find the following link
http://www.progtown.com/topic1038283-error-cxavecctor.html
It says about the C++ support for class arrays

The definition of class Align

class Align {
public:
	// the base position of current processing nucleotide
	i32_mt pos;
	// k, l lower and upper bound of sa
	u64_mt k, l;
	// z, current num of diffs; s, current align score
	i32_mt z;
	u32_mt qid;
	bool done;
#pragma acc routine
	Align() {
		Align(0, 0, 0, 0, 0);
	}

#pragma acc routine
	Align(i32_mt ii, u64_mt k, u64_mt l, i32_mt z, u32_mt qid) : pos(ii), k(k), l(l), z(z),
																 qid(qid), done(false) {}

	i32_mt score() {
		return z;
	}

	bool operator==(const Align &rhs) const {
		return pos == rhs.pos and k == rhs.k and l == rhs.l and z == rhs.z and qid == rhs.qid and done == rhs.done;
	}

	bool operator!=(const Align &rhs) const {
		return !(*this == rhs);
	}
};

The point is this error does not happen in my previous version of code (the class array works fine). Would someone help me fix this problem or point out what I did wrong?

Hello,

I’m also having this problem in my own code: " Call in OpenACC region to procedure ‘__cxa_vec_ctor’ which has no acc routine information"

As far as I can tell, this is calling the vector constructor declared in cxxabi.h and defined in a C++ library, and pgc++ cannot annotate the library function with a “#pragma acc routine”. I checked the symbols of the libraries that ship with the pgc++ compiler and don’t find a reference to __cxa_vec_ctor.

I notice that https://github.com/pathscale/nvidia_sdk_samples/blob/master/bandwidthTest/build/cuda/5.0.35-13978363_x64/include/crt/device_runtime.h

defines a macro, but I don’t know how to make the compiler use this definition instead, or if such an approach is viable here.

I would appreciate any help on the topic.

Hi scook005 and SanhuLi,

__cxa_vec_ctor is the gnu library routine that allocates an array of classes, calling the class constructor for each array member. Unfortunately we have not ported this libstdc++ routine over the device. We have an open RFE for it (TPR#23803) but until then, we don’t support the ability to create arrays of classes which have constructors within device code. Classes without constructors are ok so the work around might be to remove the “Align” constructor and instead initialize the class data members after declaration.

As an alternate work around, I’ll alook into the version you found in the CUDA SDK and see if there might be a way to add the routine as user code.

-Mat