Loading aprod.c +1 −90 Original line number Original line Diff line number Diff line Loading @@ -297,7 +297,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, for(int nt=0; nt < ntasks; nt++ ) for(int nt=0; nt < ntasks; nt++ ) { { #pragma omp target device (fpga) copy_deps #pragma omp task label(vVect_nAstroPSolved) //out(vVect[jstartAstro : jstartAstro + nAstroPSolved-1]) #pragma omp task label(vVect_nAstroPSolved) //out(vVect[jstartAstro : jstartAstro + nAstroPSolved-1]) { { lset = mapForThread[nt][0] * nparam; lset = mapForThread[nt][0] * nparam; Loading @@ -308,31 +307,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) //QUI e altrove in for(long ix..) richiama una funzione for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) //QUI e altrove in for(long ix..) richiama una funzione { { /* //======== INIZIO lset=ix*nparam; long miValAstro = 0; if (matrixIndex[multMI * ix] != miValAstro) { miValAstro = matrixIndex[multMI * ix]; jstartAstro = miValAstro - offLocalAstro; } for (long jx = jstartAstro; jx < jstartAstro + nAstroPSolved; jx++) { taskLocalSum = systemMatrix[lset] * knownTerms[ix]; //vVect[jx] = 0.000001; if(jx == 1 && false) { printf("nAstroPSolved nt:%d ix:%ld vVect[jx]:%f\n\n",nt,ix,vVect[jx] ); } vVect[jx] += taskLocalSum; lset++; } //for jx //lset += nparam - nAstroPSolved; //**QUI attenzio0ne che nel caso di "funzioni avviate in parallelo succede casino! è modificata!! in lste messa all'inizio! //========== FINE */ aprodM2AstroP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms); aprodM2AstroP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms); } //for ix } //for ix } } Loading Loading @@ -361,31 +335,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, { { for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) { { //============= INIZIO /* lset = nparam * ix + nAstroPSolved; mix = matrixIndex[multMI * ix + (multMI - 1)] + offj; for (int ly = 0; ly < nAttAxes; ly++) { vVix = mix + ly * nDegFreedomAtt; if(vVix == 1) { printf("nAttP nt %d %ld\n\n",nt,ix); } for (int lx = 0; lx < nAttParAxis; lx++) { localSum = systemMatrix[lset] * knownTerms[ix]; // #pragma omp atomic // vVect[vVix] = 0.000001; vVect[vVix] += localSum; lset++; vVix++; } //for lx } //for ly //========== FINE */ aprodM2AttP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms); aprodM2AttP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms); } //for ix } //for ix } } Loading Loading @@ -413,26 +362,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, long lset; long lset; for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) { { //========== INIZIO /* lset = nparam * ix + offLset; iix = ix * nInstrPSolved; for (int ly = 0; ly < nInstrPSolved; ly++) { vVix = offj + instrCol[iix + ly]; if(vVix == 1) { printf("nOfInstrConstr nt %d %ld\n\n",nt,ix); } localSum = systemMatrix[lset] * knownTerms[ix]; //#pragma omp atomic //vVect[vVix] = 0.000001; vVect[vVix] += localSum; lset++; } //for ly //========== FINE */ aprodM2InstrP(ix, nt, comlsqr, vVect, systemMatrix, instrCol, knownTerms); aprodM2InstrP(ix, nt, comlsqr, vVect, systemMatrix, instrCol, knownTerms); } //for ix } //for ix } } Loading @@ -454,24 +383,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, long vVix; long vVix; for (long ix = 0; ix < mapNoss[myid]; ix++) for (long ix = 0; ix < mapNoss[myid]; ix++) { { // ==================== INIZIO /* lset = nparam * ix + offLset; for (long ly = 0; ly < nGlobP; ly++) { vVix = offj + ly; if(vVix == 1) { printf("nGlobP nt %ld\n\n",ix); } localSum = systemMatrix[lset] * knownTerms[ix]; vVect[vVix] += localSum; lset++; } //for ly // ============ FINE */ aprodM2GlobP(ix, ntasks, comlsqr, vVect, systemMatrix, knownTerms); aprodM2GlobP(ix, ntasks, comlsqr, vVect, systemMatrix, knownTerms); } //for ix } //for ix Loading Loading
aprod.c +1 −90 Original line number Original line Diff line number Diff line Loading @@ -297,7 +297,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, for(int nt=0; nt < ntasks; nt++ ) for(int nt=0; nt < ntasks; nt++ ) { { #pragma omp target device (fpga) copy_deps #pragma omp task label(vVect_nAstroPSolved) //out(vVect[jstartAstro : jstartAstro + nAstroPSolved-1]) #pragma omp task label(vVect_nAstroPSolved) //out(vVect[jstartAstro : jstartAstro + nAstroPSolved-1]) { { lset = mapForThread[nt][0] * nparam; lset = mapForThread[nt][0] * nparam; Loading @@ -308,31 +307,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) //QUI e altrove in for(long ix..) richiama una funzione for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) //QUI e altrove in for(long ix..) richiama una funzione { { /* //======== INIZIO lset=ix*nparam; long miValAstro = 0; if (matrixIndex[multMI * ix] != miValAstro) { miValAstro = matrixIndex[multMI * ix]; jstartAstro = miValAstro - offLocalAstro; } for (long jx = jstartAstro; jx < jstartAstro + nAstroPSolved; jx++) { taskLocalSum = systemMatrix[lset] * knownTerms[ix]; //vVect[jx] = 0.000001; if(jx == 1 && false) { printf("nAstroPSolved nt:%d ix:%ld vVect[jx]:%f\n\n",nt,ix,vVect[jx] ); } vVect[jx] += taskLocalSum; lset++; } //for jx //lset += nparam - nAstroPSolved; //**QUI attenzio0ne che nel caso di "funzioni avviate in parallelo succede casino! è modificata!! in lste messa all'inizio! //========== FINE */ aprodM2AstroP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms); aprodM2AstroP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms); } //for ix } //for ix } } Loading Loading @@ -361,31 +335,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, { { for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) { { //============= INIZIO /* lset = nparam * ix + nAstroPSolved; mix = matrixIndex[multMI * ix + (multMI - 1)] + offj; for (int ly = 0; ly < nAttAxes; ly++) { vVix = mix + ly * nDegFreedomAtt; if(vVix == 1) { printf("nAttP nt %d %ld\n\n",nt,ix); } for (int lx = 0; lx < nAttParAxis; lx++) { localSum = systemMatrix[lset] * knownTerms[ix]; // #pragma omp atomic // vVect[vVix] = 0.000001; vVect[vVix] += localSum; lset++; vVix++; } //for lx } //for ly //========== FINE */ aprodM2AttP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms); aprodM2AttP(ix, nt, comlsqr, vVect, systemMatrix, matrixIndex, knownTerms); } //for ix } //for ix } } Loading Loading @@ -413,26 +362,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, long lset; long lset; for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) for (long ix = mapForThread[nt][0]; ix < mapForThread[nt][2]; ix++) { { //========== INIZIO /* lset = nparam * ix + offLset; iix = ix * nInstrPSolved; for (int ly = 0; ly < nInstrPSolved; ly++) { vVix = offj + instrCol[iix + ly]; if(vVix == 1) { printf("nOfInstrConstr nt %d %ld\n\n",nt,ix); } localSum = systemMatrix[lset] * knownTerms[ix]; //#pragma omp atomic //vVect[vVix] = 0.000001; vVect[vVix] += localSum; lset++; } //for ly //========== FINE */ aprodM2InstrP(ix, nt, comlsqr, vVect, systemMatrix, instrCol, knownTerms); aprodM2InstrP(ix, nt, comlsqr, vVect, systemMatrix, instrCol, knownTerms); } //for ix } //for ix } } Loading @@ -454,24 +383,6 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, long vVix; long vVix; for (long ix = 0; ix < mapNoss[myid]; ix++) for (long ix = 0; ix < mapNoss[myid]; ix++) { { // ==================== INIZIO /* lset = nparam * ix + offLset; for (long ly = 0; ly < nGlobP; ly++) { vVix = offj + ly; if(vVix == 1) { printf("nGlobP nt %ld\n\n",ix); } localSum = systemMatrix[lset] * knownTerms[ix]; vVect[vVix] += localSum; lset++; } //for ly // ============ FINE */ aprodM2GlobP(ix, ntasks, comlsqr, vVect, systemMatrix, knownTerms); aprodM2GlobP(ix, ntasks, comlsqr, vVect, systemMatrix, knownTerms); } //for ix } //for ix Loading