WARNING: Linking two modules of different data layouts!onAMD

Dear PGI Team,

I have issues regarding correctness and instabilities in runtime when accelerating my C++ CFD code with an 5-point stencil (using finite differences on a regular, not uniform grid and pointers).

The PGI version is 16.1, compiler flags are -acc -ta=radeon:tahiti -std=c++11 -lOpenCL with paths /opt/AMDAPPSDK-2.9-1/include, /opt/AMDAPPSDK-2.9-1/lib/x86_64.

I am running my code on an Intel Ivy Bridge (1sockel) with an AMD S10000 (Tahiti) (1chip) and sometimes (most of the time, but not all the time; more or less times) the Warning: Linking two modules of different data layouts! (from libamdocl64.so) with incorrect results of my numerical approximation and no convergence. How can I avoid/fix this? Do I need some other flags? On NVIDIA GPUs (tested on K40/K80 with flags -acc -Minfo=accel -ta=tesla:cc35,lineinfo,cuda7.0,pinned) all is fine (correctness and stability).

Further, (I think due to this issue) the API CodeXL 1.6. does not profile my code at all (does not even start profiling, but suggesting a bunch of possible errors (which I checked all negative). Are there any alternatives for profiling an AMD device (for bandwidth counters read/write; load/store; fetch/write)?

Thanks for your support,

This looks like an inconsistency between the runtime and generated code. You could try using the nollvm option to see if that changes the behavior at all.

I don’t know of any other profiling tools, but I’ll check with some others.

Dear Brentl,

Thank you for the quick replay. Unfortunately, I only get another warning (but with correct results and unstable runs in case the warning appears):

WARNING: Linking two modules of different target triples: ‘amdil-pc-unknown-amdopencl’ and ‘amdil-pc-amdopencl’
WARNING: While resolving call to function ‘barrier’ arguments were dropped!

Could that be another hint?