usqcd-software / qdpxx

The QDP++ Framework for Lattice QCD
http://usqcd-software.github.io/qdpxx/
Other
17 stars 17 forks source link

fixed missing subtype.field() bug #7

Open bglaessle opened 9 years ago

bglaessle commented 9 years ago

Generally if there any issues with my changes, I am happy to provide refined fixes if I get some guidance related to the code design.

bjoo commented 7 years ago

Is this still an issue in the devel branch?

bglaessle commented 7 years ago

Commit 36e5dde is already resolved (in devel), whereas the first commit be03cee can still be applied but I currently don't know anymore how to trigger the error. Regardless the previously mentioned "random(ferm[subset])" != "random(ferm,subset)" issue is still unresolved and threading is definitely slow. For now do not merge and I will try to reproduce the error within 1-2 weeks.

bglaessle commented 7 years ago

I checked the devel-branch and the Subtype::field() method in include/qdp_qdpsubtype.h is still commented out, e.g.

LatticeFermion f = zero;
random(f[rb[0]]);

does not compile. Using random(f,rb[0]) instead works and seems to be threaded correctly. The same applies for gaussian and copymask.

There are therefore have several options:

BTW: in scalar and parscalar arch the argument of void random(OSubLattice<T> dd) should be a reference. Again the same applies for gaussian and copymask.