When building quda, there are a lot of defines that are generated by cmake. These defines may change objects in the header files. However, the include directory in the build directory is a simple copy of the include directory in the source folder.
When instantiating quda objects outside the compile process of quda, these defines are not known to the compiler. This leads to incompatible compiled versions of quda objecs. For example, have a look at USE_TEXTURE_OBJECTS. This is only defined if if __COMPUTE_CAPABILITY__ and CUDA_VERSION are defined. This is why a sizeof(cudaGaugefield) is 936 inside of the quda lib and outside of quda we get sizeof(cudaGaugefield) = 904.
So when building quda, one has to make sure that all defines that have been used for compiling are also vaild in the include directory of the build directory.
When building quda, there are a lot of defines that are generated by cmake. These defines may change objects in the header files. However, the include directory in the build directory is a simple copy of the include directory in the source folder.
When instantiating quda objects outside the compile process of quda, these defines are not known to the compiler. This leads to incompatible compiled versions of quda objecs. For example, have a look at USE_TEXTURE_OBJECTS. This is only defined if if
__COMPUTE_CAPABILITY__and CUDA_VERSION are defined. This is why a sizeof(cudaGaugefield) is 936 inside of the quda lib and outside of quda we get sizeof(cudaGaugefield) = 904.So when building quda, one has to make sure that all defines that have been used for compiling are also vaild in the include directory of the build directory.