Closed jpfoley closed 12 years ago
Infuriating I bet. Good point to raise this though.
I am working on this as part of clean up to allow qdp-jit to communicate directly with QUDA. I will actually remove the location from the ColorSpinorField, and use typeid solely from now on (what I should I have done from day 1). This will prevent a field from accidentally thinking it's on the host when it's actually on the device etc.
This is an irksome interface issue, which I'm sure will be dealt with once the SC rush is over. But I spent an hour trying to understand why my code was giving an error, so I feel like raising the issue anyway. My problem arose because I was calling the cudaColorSpinorField constructor with a ColorSpinorParam argument. The issue was that the ColorSpinorParam object had its fieldLocation initialised to QUDA_CPU_FIELD_LOCATION upon instantiation. Since I passed the colorSpinorParam to the constructor, I ended up with a cudaColorSpinorField object with a QUDA_CPU_FIELD_LOCATION, resulting in an error later in the code.