Hello,

I have the problem with using cilk plus. could you help me, please ?

G class contains the matrix (as a vector) GenoMatrix[nIndividuals * nMarkers], where nInidividuals = 5000 and nMarkers = 50000

there is also the int * Criteria::solution[nIndividuals] variable of the Criteria class

I try to use cilk plus to accelerate the code but I have a data race problem with shared vectors (solution, GenoMatrix) and I don't know how to solve it correctly.

Thank you for your aid !

int Criteria::UncoveredMarkers(int alleleType) { cilk::reducer_opadd<int> presented(0); cilk_for (int j=0; j<G->nMarkers; ++j) { for (int i=0; i<G->nIndividuals; ++i) if ( (solution[i] == alleleType) && (G->getMarker(i,j) == alleleType) ) { ++presented; break; } } return G->nMarkers - presented.get_value(); }