Loading CambioValoriOsservazioni.txt 0 → 100644 +19 −0 Original line number Diff line number Diff line News x EuroExa... funzionano solo con autorun - modifica da short a int dei parametri nAstroPSolvedn nAttP,, nGlobP , nInstrPSolved,nAttParAxis introdotto -nAstroP, -nAstroPSolved, -nAttParAxis, -nInstrP, -nInstrPSolved, -nGlobP ==> Verificato come viene messo nInstrPSolved in base a lsInstrFlag, ssInstrFlag, nuInstrFlag, maInstrFlag ==>> VERIFICATI TUTTI GLI SHORT e i valori fissi 4,5 e 6, %..hd, verificato dove gioca mapAstro, se nAstroPSolved>5 mapAstro forzato come se nAstroPSolved=5 nullSpace cknullSpace (usata solo x extConstr) potrebbe essere ok! (ma da vedere solo in caso di errore! in fase di run) ColIndexToinstrIndexIdGlobal (vecchio modello non più chiamata) instrIndexIdToColIndexGlobal (vecchio modello non più usata), computeInstrConstr (usata per generare ext constr) instrLongIndex (eliminato... non più usato) Verificata simfullram No newline at end of file aprod.c +382 −6 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, int setBound[4]; double localSum; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long localAstro = comlsqr.VrIdAstroPDim * nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; Loading @@ -60,18 +60,18 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, int nOfElBarObs = comlsqr.nOfElBarObs; int nEqBarConstr = comlsqr.nEqBarConstr; int debugMode = comlsqr.debugMode; short nInstrPSolved = comlsqr.nInstrPSolved; int nInstrPSolved = comlsqr.nInstrPSolved; int nOfInstrConstr = comlsqr.nOfInstrConstr; int nElemIC = comlsqr.nElemIC; short nAttP = comlsqr.nAttP; short nGlobP = comlsqr.nGlobP; int nAttP = comlsqr.nAttP; int nGlobP = comlsqr.nGlobP; setBound[0] = comlsqr.setBound[0]; setBound[1] = comlsqr.setBound[1]; setBound[2] = comlsqr.setBound[2]; setBound[3] = comlsqr.setBound[3]; long nDegFreedomAtt = comlsqr.nDegFreedomAtt; short nAttParAxis = comlsqr.nAttParAxis; int nAttParAxis = comlsqr.nAttParAxis; long offsetAttParam = comlsqr.offsetAttParam; long offsetInstrParam = comlsqr.offsetInstrParam; long offsetGlobParam = comlsqr.offsetGlobParam; Loading Loading @@ -687,5 +687,381 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, /* else //mode==2 { //if(mode double **vVect_aux_AttP; double **vVect_aux_InstP ; int nElements = (comlsqr.nAttParam + comlsqr.nInstrParam); vVect_aux_AttP =(double **) calloc(omp_get_num_threads(),sizeof(double *)); if (!vVect_aux_AttP) exit(err_malloc("vVect_aux_AttP", myid)); vVect_aux_InstP =(double **) calloc(omp_get_num_threads(),sizeof(double *)); if (!vVect_aux_InstP) exit(err_malloc("vVect_aux_InstP", myid)); for (int i=0;i<omp_get_num_threads();i++) { vVect_aux_AttP [i]= (double *)calloc(nElements , sizeof(double)); if (!vVect_aux_AttP[i]) exit(err_malloc("vVect_aux_AttP[i]", myid)); vVect_aux_InstP [i]=(double *)calloc(nElements , sizeof(double)); if (!vVect_aux_InstP[i]) exit(err_malloc("vVect_aux_InstP[i]", myid)); } // Compute and write the total memory allocated if (myid == 0) { printf("vVect_aux_* %ld MB of memory allocated on each task.\n", ( (omp_get_num_threads() * nElements * sizeof(double)) / (1024 * 1024) )); } time_t startTime = time(NULL); int count = 0; int nt=-1; #pragma omp task { int taskid = -1; #pragma omp critical { nt++; taskid = nt; } printf("taskid: %d",taskid); long offLocalAstro = comlsqr.mapStar[myid][0] * nAstroPSolved; double taskLocalSum; long jstartAstro = 0; long lset_astro = mapForThread[taskid][0] * nparam; long mix; long offj = (localAstroMax - offsetAttParam); long vVix; long lset_AttP; int offLset = nAstroPSolved + nAttP; long iix; long offj_InstrConstr = offsetInstrParam + (localAstroMax - offsetAttParam); long vVix_InstrConstr; long lset_InstrConstr; for (long ix = mapForThread[taskid][0]; ix < mapForThread[taskid][2]; ix++) { if (nAstroPSolved) { 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_astro] * knownTerms[ix]; vVect[jx] += taskLocalSum; lset_astro++; } //for jx lset_astro += nparam - nAstroPSolved; } /// if (nAttP) { lset_AttP = nparam * ix + nAstroPSolved; mix = matrixIndex[multMI * ix + (multMI - 1)] + offj; for (int ly = 0; ly < nAttAxes; ly++) { vVix = mix + ly * nDegFreedomAtt - offsetAttParam; for (int lx = 0; lx < nAttParAxis; lx++) { localSum = systemMatrix[lset_AttP] * knownTerms[ix]; vVect_aux_AttP[taskid][vVix] += localSum; lset_AttP++; vVix++; } //for lx } //for ly } /// /// if (nOfInstrConstr) { lset_InstrConstr = nparam * ix + offLset; iix = ix * nInstrPSolved; for (int ly = 0; ly < nInstrPSolved; ly++) { vVix_InstrConstr = offj + instrCol[iix + ly] - offsetAttParam; localSum = systemMatrix[lset_InstrConstr] * knownTerms[ix]; vVect_aux_InstP[taskid][vVix] += localSum; lset_InstrConstr++; } //for ly } //// } } #pragma omp taskwait // long int z=offsetAttParam; for(int i=0; i < omp_get_num_threads();i++) { for(j=0; j < nElements;j++) { if(j==nElements/2) printf("vVect_aux_AttP[%d][%d]=%d\n",i,j,vVect_aux_AttP[i][j]); else if(j==(nElements/2)+1) printf("vVect_aux_AttP[%d][%d]=%d\n",i,j,vVect_aux_AttP[i][j]); vVect[j+offsetAttParam]+= vVect_aux_AttP[i][j]+vVect_aux_InstP[i][j]; //z++; } } //printf("z: %ld\n",z); // #pragma omp task in(vVect) { ///////////////////////////////////////////////////// ///} //pragma *ompSec += time(NULL) - startTime; if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("PE=%d AprodTiming: mode=2.1 OmpSec=%ld\n", myid, time(NULL) - startTime); ///////////////////////////////////////////////////// /// Mode 2 Global Sect if (nGlobP ) { time_t startTime_nGlobP = time(NULL); long lset; int offLset = nAstroPSolved + nAttP + nInstrPSolved; long offj = offsetGlobParam + (localAstroMax - offsetAttParam); long vVix; for (long ix = 0; ix < mapNoss[myid]; ix++) { lset = nparam * ix + offLset; for (long ly = 0; ly < nGlobP; ly++) { vVix = offj + ly; localSum = systemMatrix[lset] * knownTerms[ix]; vVect[vVix] += localSum; lset++; } //for ly } //for ix if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("\tPE=%d AprodTiming: nGlobP sec=%ld\n", myid, time(NULL) - startTime_nGlobP); } //////////////////////////////////////////////////// startTime = time(NULL); //FV_ EDIT ompSs // #pragma omp parallel private(myid, yi, localSum, tid, nthreads, i2, j2, na) shared(mapNoss, vVect, systemMatrix, knownTerms, k, j3) { myid = comlsqr.myid; localSum = 0.0; ////////////////////////////////////////////////////// /// Mode 2 ExtConstr if (nEqExtConstr ) { time_t startTime_nEqExtConstr = time(NULL); long offExtStarConstrEq; long off2; long off3; for (int ix = 0; ix < nEqExtConstr; ix++) { //stars yi = knownTerms[mapNoss[myid] + ix]; offExtStarConstrEq = mapNcoeff[myid] + ix * nOfElextObs; //Star offset on the row ix (all the row) //FV_ EDIT ompSs //#pragma omp for for (long yx = 0; yx < numOfExtStar; yx++) { off3 = yx * nAstroPSolved; off2 = offExtStarConstrEq + off3; for (int j2 = 0; j2 < nAstroPSolved; j2++) { localSum = systemMatrix[off2 + j2] * yi; vVect[j2 + off3] += localSum; } } //FV_ EDIT ompSs //#pragma omp barrier } //for ix long offExtAttConstrEq; long offExtUnk; long off1 = VrIdAstroPDimMax * nAstroPSolved + startingAttColExtConstr; for (int ix = 0; ix < nEqExtConstr; ix++) { //att yi = knownTerms[mapNoss[myid] + ix]; offExtAttConstrEq = mapNcoeff[myid] + ix * nOfElextObs; //Att offset on the row ix (all the row) offExtAttConstrEq += numOfExtStar * nAstroPSolved; //Att offset inside ix row for (int nax = 0; nax < nAttAxes; nax++) { offExtUnk = off1 + nax * nDegFreedomAtt; // Att offset for Unk array on extConstr off2 = offExtAttConstrEq + nax * numOfExtAttCol; //FV_ EDIT ompSs //#pragma omp for for (int jx = 0; jx < numOfExtAttCol; jx++) { localSum = systemMatrix[off2 + jx] * yi; vVect[offExtUnk + jx] += localSum; } //FV_ EDIT ompSs //#pragma omp barrier } } if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("\tPE=%d AprodTiming: nEqExtConstr sec=%ld\n", myid, time(NULL) - startTime_nEqExtConstr); } ////////////////////////////////////////////////////// /// Mode 2 BarConstr if (nEqBarConstr ) { time_t startTime_nEqBarConstr = time(NULL); localSum = 0.0; long off3; long off2; for (int ix = 0; ix < nEqBarConstr; ix++) { //stars yi = knownTerms[mapNoss[myid] + nEqExtConstr + ix]; long offBarStarConstrEq = mapNcoeff[myid] + nEqExtConstr * nOfElextObs + ix * nOfElBarObs; //Star offset on the row i2 (all the row) //FV_ EDIT ompSs //#pragma omp for for (long yx = 0; yx < numOfBarStar; yx++) { off3 = yx * nAstroPSolved; off2 = offBarStarConstrEq + off3; for (int j2 = 0; j2 < nAstroPSolved; j2++) { localSum = systemMatrix[off2 + j2] * yi; vVect[j2 + off3] += localSum; } } //FV_ EDIT ompSs //#pragma omp barrier } //for i2 if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("\tPE=%d AprodTiming: nEqBarConstr sec=%ld\n", myid, time(NULL) - startTime_nEqBarConstr); } ////////////////////////////////////////////////////// /// Mode 2 InstrConstr if (nOfInstrConstr ) { time_t startTime_nOfInstrConstr = time(NULL); localSum = 0.0; int offSetInstr; long off1; long offInstrUnk = VrIdAstroPDimMax * nAstroPSolved + nAttAxes * nDegFreedomAtt; long off2 = mapNoss[myid] + nEqExtConstr + nEqBarConstr; long off3 = mapNcoeff[myid] + nOfElextObs * nEqExtConstr + nOfElBarObs * nEqBarConstr; long off4 = mapNoss[myid] * nInstrPSolved; long off5; long off6; for (int k1 = myid; k1 < nOfInstrConstr; k1 = k1 + nproc) { yi = knownTerms[off2 + k1]; offSetInstr = 0; for (int m = 0; m < k1; m++) offSetInstr += instrConstrIlung[m]; off1 = off3 + offSetInstr; off5 = off4 + offSetInstr; //FV_ EDIT ompSs //#pragma omp for for (int j = 0; j < instrConstrIlung[k1]; j++) { localSum = systemMatrix[off1 + j] * yi; off6 = offInstrUnk + instrCol[off5 + j]; vVect[off6] += localSum; } } if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("\tPE=%d AprodTiming: nOfInstrConstr sec=%ld\n", myid, time(NULL) - startTime_nOfInstrConstr); } //////////// } //pragma *ompSec += time(NULL) - startTime; if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("PE=%d AprodTiming: mode=2.2 OmpSec=%ld\n", myid, time(NULL) - startTime); } #pragma omp task in(vVect_aux_AttP,vVect_aux_InstP) //freeing aux vect for (int i=0;i<omp_get_num_threads();i++) { free(vVect_aux_AttP[i]); free(vVect_aux_InstP[i]); } free(vVect_aux_AttP); free(vVect_aux_InstP); } // else if(mode==2) */ } lsqr.c +1 −1 Original line number Diff line number Diff line Loading @@ -562,7 +562,7 @@ long nDegFreedomAtt; int nAttAxes; int nAttParam, nInstrParam, nGlobalParam, itnTest, nAttP, numOfExtStar, numOfBarStar, numOfExtAttCol, nobs; long mapNossBefore; short nAstroPSolved, nInstrPsolved; int nAstroPSolved, nInstrPsolved; double cycleStartMpiTime, cycleEndMpiTime; double *vAuxVect; int CPRCount; Loading solvergaiaSim.c +148 −64 File changed.Preview size limit exceeded, changes collapsed. Show changes util.c +28 −64 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ void instrIndexIdToColIndexGlobal(int* instrIndexPointer, int* instrConst,int to { long relPos_ls; int nInstrParam=comlsqr.nInstrParam; short nInstrPSolved=comlsqr.nInstrPSolved; int nInstrPSolved=comlsqr.nInstrPSolved; int maInstrFlag=comlsqr.maInstrFlag; int nuInstrFlag=comlsqr.nuInstrFlag; int ssInstrFlag=comlsqr.ssInstrFlag; Loading Loading @@ -794,11 +794,11 @@ void precondSystemMatrix(double *systemMatrix, double *preCondVect, long int *m mapNcoeff=comlsqr.mapNcoeff; mapNoss=comlsqr.mapNoss; short nAstroPSolved=comlsqr.nAstroPSolved; short nInstrPSolved=comlsqr.nInstrPSolved; int nAstroPSolved=comlsqr.nAstroPSolved; int nInstrPSolved=comlsqr.nInstrPSolved; long nparam=comlsqr.parOss; int multMI=comlsqr.multMI; short nAttParAxis=comlsqr.nAttParAxis; int nAttParAxis=comlsqr.nAttParAxis; long counterAxis=0, counterInstr=0; long nDegFredoomAtt=comlsqr.nDegFreedomAtt; long VrIdAstroPDimMax=comlsqr.VrIdAstroPDimMax; Loading Loading @@ -1081,7 +1081,7 @@ int invMap(int nAstroPSolved,int *inv){ inv[2]=2; inv[3]=3; } if(nAstroPSolved==5){ if(nAstroPSolved>=5){ inv[0]=1; inv[1]=2; inv[2]=3; Loading Loading @@ -1362,7 +1362,7 @@ void writeBinFiles(double* systemMatrix,long* matrixIndex,int* instrCol,double* int numOfExtStarinFile=1000000; int numOfExtStartoWrite; double randVal; short nAstroPSolved=comlsqr.nAstroPSolved; int nAstroPSolved=comlsqr.nAstroPSolved; for(int nwr=0;nwr<nStar;nwr+=numOfExtStarinFile){ int localCounter=0; if(nStar>numOfExtStarinFile+nwr)numOfExtStartoWrite=numOfExtStarinFile; Loading Loading @@ -1426,7 +1426,7 @@ void writeBinFiles(double* systemMatrix,long* matrixIndex,int* instrCol,double* int numOfBarStarinFile=1000000; int numOfBarStartoWrite; double randVal; short nAstroPSolved=comlsqr.nAstroPSolved; int nAstroPSolved=comlsqr.nAstroPSolved; for(int nwr=0;nwr<nStar;nwr+=numOfBarStarinFile){ int localCounter=0; if(nStar>numOfBarStarinFile+nwr)numOfBarStartoWrite=numOfBarStarinFile; Loading Loading @@ -1565,7 +1565,8 @@ struct nullSpace cknullSpace(double * systemMatrix,long * matrixIndex,double *at int nLocalStar; int firstStarConstr,lastStarConstr; int nOfElextObs,numOfExtStar,numOfExtAttCol,startingAttColExtConstr; short nAstroPSolved,nAttParAxis,nAttAxes; int nAstroPSolved,nAttParAxis; short nAttAxes; double *nullSpaceFPN; double *productNS; int npeSend,npeRecv; Loading Loading @@ -2083,7 +2084,7 @@ void swapInstrCoeff(double * instrCoeff, long repeat, long nrows){ free(tmp); return; } float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttParam, int nInstrParam){ float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttParam, int nInstrParam, int nInstrPSolved, int nAstroPSolved){ float smGB=0., ktGB=0., miGB=0.,iiGB=0.,auxGB=0., memGB=0., prevmemGB; long prevnStar, prevnobs; long gigaByte=1024*1024*1024; Loading Loading @@ -2111,8 +2112,8 @@ float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttP smGB=(float)(ncoeff)*8/(gigaByte); //systemMatrix ktGB=(float)(nobs)*8/(gigaByte); //knownTerms miGB=(float)(nobs*2)*8/(gigaByte); //matrixIndex iiGB=(float)(nobs*6)*4/(gigaByte); //InstrIndex auxGB=(float)(nStar*5+nAttParam+nInstrParam+0)*8/(gigaByte); //precondVect+vVect+wVect+xSolution+standardError iiGB=(float)(nobs*nInstrPSolved)*4/(gigaByte); //InstrIndex auxGB=(float)(nStar*nAstroPSolved+nAttParam+nInstrParam+0)*8/(gigaByte); //precondVect+vVect+wVect+xSolution+standardError memGB=smGB+miGB+ktGB+iiGB+5*auxGB; } nStar=prevnStar; Loading @@ -2127,8 +2128,8 @@ float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttP smGB=(float)(ncoeff)*8/(gigaByte); //systemMatrix ktGB=(float)(nobs)*8/(gigaByte); //knownTerms miGB=(float)(nobs*2)*8/(gigaByte); //matrixIndex iiGB=(float)(nobs*6)*4/(gigaByte); //InstrIndex auxGB=(float)(nStar*5+nAttParam+nInstrParam+0)*8/(gigaByte); //precondVect+vVect+wVect+xSolution+standardError iiGB=(float)(nobs*nInstrPSolved)*4/(gigaByte); //InstrIndex auxGB=(float)(nStar*nAstroPSolved+nAttParam+nInstrParam+0)*8/(gigaByte); //precondVect+vVect+wVect+xSolution+standardError memGB=smGB+miGB+ktGB+iiGB+5*auxGB; } nStar=prevnStar; Loading @@ -2141,13 +2142,13 @@ float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttP double aprodM1Obs(long ix,struct comData comlsqr, double *vVect, double *systemMatrix, long int *matrixIndex, int *instrCol){ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long nDegFreedomAtt = comlsqr.nDegFreedomAtt; short nAttParAxis = comlsqr.nAttParAxis; short nAttP = comlsqr.nAttP; short nGlobP = comlsqr.nGlobP; short nInstrPSolved = comlsqr.nInstrPSolved; int nAttParAxis = comlsqr.nAttParAxis; int nAttP = comlsqr.nAttP; int nGlobP = comlsqr.nGlobP; int nInstrPSolved = comlsqr.nInstrPSolved; long offsetAttParam = comlsqr.offsetAttParam; long offsetInstrParam = comlsqr.offsetInstrParam; long offsetGlobParam = comlsqr.offsetGlobParam; Loading Loading @@ -2237,7 +2238,7 @@ double aprodM1Obs(long ix,struct comData comlsqr, double *vVect, double *system void aprodM2AstroP(long ix,int nt, struct comData comlsqr, double *vVect, double *systemMatrix, long int *matrixIndex, double *knownTerms){ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long nparam = comlsqr.parOss; int multMI = comlsqr.multMI; long miValAstro = 0; Loading Loading @@ -2274,10 +2275,10 @@ void aprodM2AstroP(long ix,int nt, struct comData comlsqr, double *vVect, doubl void aprodM2AttP(long ix,int nt, struct comData comlsqr, double *vVect, double *systemMatrix, long int *matrixIndex, double *knownTerms){ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long offsetAttParam = comlsqr.offsetAttParam; short nAttParAxis = comlsqr.nAttParAxis; int nAttParAxis = comlsqr.nAttParAxis; long nparam = comlsqr.parOss; int multMI = comlsqr.multMI; long mix; Loading Loading @@ -2322,11 +2323,11 @@ void aprodM2AttP(long ix,int nt, struct comData comlsqr, double *vVect, double void aprodM2InstrP(long ix,int nt, struct comData comlsqr, double *vVect, double *systemMatrix, int *instrCol, double *knownTerms){ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long offsetAttParam = comlsqr.offsetAttParam; short nAttP = comlsqr.nAttP; short nInstrPSolved = comlsqr.nInstrPSolved; int nAttP = comlsqr.nAttP; int nInstrPSolved = comlsqr.nInstrPSolved; long nparam = comlsqr.parOss; long miValAstro = 0; long offLocalAstro = 0; Loading Loading @@ -2367,12 +2368,12 @@ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long offsetAttParam = comlsqr.offsetAttParam; short nAttP = comlsqr.nAttP; short nInstrPSolved = comlsqr.nInstrPSolved; int nAttP = comlsqr.nAttP; int nInstrPSolved = comlsqr.nInstrPSolved; long nparam = comlsqr.parOss; long lset; long offsetGlobParam = comlsqr.offsetGlobParam; short nGlobP = comlsqr.nGlobP; int nGlobP = comlsqr.nGlobP; long vVix; double localSum; Loading Loading @@ -2401,40 +2402,3 @@ long vVix; } /* int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long nDegFreedomAtt = comlsqr.nDegFreedomAtt; short nAttParAxis = comlsqr.nAttParAxis; short nAttP = comlsqr.nAttP; short nGlobP = comlsqr.nGlobP; short nInstrPSolved = comlsqr.nInstrPSolved; long offsetAttParam = comlsqr.offsetAttParam; long offsetInstrParam = comlsqr.offsetInstrParam; long offsetGlobParam = comlsqr.offsetGlobParam; long nparam = comlsqr.parOss; short nAttAxes = comlsqr.nAttAxes; int multMI = comlsqr.multMI; long miValAstro = 0; long miValAtt = 0; long jstartAtt = 0; long offLocalAstro = 0; long offLocalAtt = 0; long offLocalInstr = 0; //Offset on Instruments double taskLocalSum=0.; long jstartAstro = 0; long ixInstr = 0; int nInstrVal = 0; double sum=0.; long lset; offLocalInstr = offsetInstrParam + (localAstroMax - offsetAttParam); //Offset on Instruments nInstrVal = nAstroPSolved + nAttP; offLocalAstro = comlsqr.mapStar[myid][0] * nAstroPSolved; //Offset on my mstars offLocalAtt = localAstroMax - offsetAttParam; //Offset on attitude long offLocalGlob = offsetGlobParam + (localAstroMax - offsetAttParam); //Offset on GlobP int nGlobVal = nAstroPSolved + nAttP + nInstrPSolved; jstartAstro = miValAstro - offLocalAstro; lset=comlsqr.mapForThread[nt][0]*nparam+(ix-comlsqr.mapForThread[nt][0])*nparam; */ Loading
CambioValoriOsservazioni.txt 0 → 100644 +19 −0 Original line number Diff line number Diff line News x EuroExa... funzionano solo con autorun - modifica da short a int dei parametri nAstroPSolvedn nAttP,, nGlobP , nInstrPSolved,nAttParAxis introdotto -nAstroP, -nAstroPSolved, -nAttParAxis, -nInstrP, -nInstrPSolved, -nGlobP ==> Verificato come viene messo nInstrPSolved in base a lsInstrFlag, ssInstrFlag, nuInstrFlag, maInstrFlag ==>> VERIFICATI TUTTI GLI SHORT e i valori fissi 4,5 e 6, %..hd, verificato dove gioca mapAstro, se nAstroPSolved>5 mapAstro forzato come se nAstroPSolved=5 nullSpace cknullSpace (usata solo x extConstr) potrebbe essere ok! (ma da vedere solo in caso di errore! in fase di run) ColIndexToinstrIndexIdGlobal (vecchio modello non più chiamata) instrIndexIdToColIndexGlobal (vecchio modello non più usata), computeInstrConstr (usata per generare ext constr) instrLongIndex (eliminato... non più usato) Verificata simfullram No newline at end of file
aprod.c +382 −6 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, int setBound[4]; double localSum; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long localAstro = comlsqr.VrIdAstroPDim * nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; Loading @@ -60,18 +60,18 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, int nOfElBarObs = comlsqr.nOfElBarObs; int nEqBarConstr = comlsqr.nEqBarConstr; int debugMode = comlsqr.debugMode; short nInstrPSolved = comlsqr.nInstrPSolved; int nInstrPSolved = comlsqr.nInstrPSolved; int nOfInstrConstr = comlsqr.nOfInstrConstr; int nElemIC = comlsqr.nElemIC; short nAttP = comlsqr.nAttP; short nGlobP = comlsqr.nGlobP; int nAttP = comlsqr.nAttP; int nGlobP = comlsqr.nGlobP; setBound[0] = comlsqr.setBound[0]; setBound[1] = comlsqr.setBound[1]; setBound[2] = comlsqr.setBound[2]; setBound[3] = comlsqr.setBound[3]; long nDegFreedomAtt = comlsqr.nDegFreedomAtt; short nAttParAxis = comlsqr.nAttParAxis; int nAttParAxis = comlsqr.nAttParAxis; long offsetAttParam = comlsqr.offsetAttParam; long offsetInstrParam = comlsqr.offsetInstrParam; long offsetGlobParam = comlsqr.offsetGlobParam; Loading Loading @@ -687,5 +687,381 @@ void aprod(int mode, long int m, long int n, double *vVect, double *knownTerms, /* else //mode==2 { //if(mode double **vVect_aux_AttP; double **vVect_aux_InstP ; int nElements = (comlsqr.nAttParam + comlsqr.nInstrParam); vVect_aux_AttP =(double **) calloc(omp_get_num_threads(),sizeof(double *)); if (!vVect_aux_AttP) exit(err_malloc("vVect_aux_AttP", myid)); vVect_aux_InstP =(double **) calloc(omp_get_num_threads(),sizeof(double *)); if (!vVect_aux_InstP) exit(err_malloc("vVect_aux_InstP", myid)); for (int i=0;i<omp_get_num_threads();i++) { vVect_aux_AttP [i]= (double *)calloc(nElements , sizeof(double)); if (!vVect_aux_AttP[i]) exit(err_malloc("vVect_aux_AttP[i]", myid)); vVect_aux_InstP [i]=(double *)calloc(nElements , sizeof(double)); if (!vVect_aux_InstP[i]) exit(err_malloc("vVect_aux_InstP[i]", myid)); } // Compute and write the total memory allocated if (myid == 0) { printf("vVect_aux_* %ld MB of memory allocated on each task.\n", ( (omp_get_num_threads() * nElements * sizeof(double)) / (1024 * 1024) )); } time_t startTime = time(NULL); int count = 0; int nt=-1; #pragma omp task { int taskid = -1; #pragma omp critical { nt++; taskid = nt; } printf("taskid: %d",taskid); long offLocalAstro = comlsqr.mapStar[myid][0] * nAstroPSolved; double taskLocalSum; long jstartAstro = 0; long lset_astro = mapForThread[taskid][0] * nparam; long mix; long offj = (localAstroMax - offsetAttParam); long vVix; long lset_AttP; int offLset = nAstroPSolved + nAttP; long iix; long offj_InstrConstr = offsetInstrParam + (localAstroMax - offsetAttParam); long vVix_InstrConstr; long lset_InstrConstr; for (long ix = mapForThread[taskid][0]; ix < mapForThread[taskid][2]; ix++) { if (nAstroPSolved) { 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_astro] * knownTerms[ix]; vVect[jx] += taskLocalSum; lset_astro++; } //for jx lset_astro += nparam - nAstroPSolved; } /// if (nAttP) { lset_AttP = nparam * ix + nAstroPSolved; mix = matrixIndex[multMI * ix + (multMI - 1)] + offj; for (int ly = 0; ly < nAttAxes; ly++) { vVix = mix + ly * nDegFreedomAtt - offsetAttParam; for (int lx = 0; lx < nAttParAxis; lx++) { localSum = systemMatrix[lset_AttP] * knownTerms[ix]; vVect_aux_AttP[taskid][vVix] += localSum; lset_AttP++; vVix++; } //for lx } //for ly } /// /// if (nOfInstrConstr) { lset_InstrConstr = nparam * ix + offLset; iix = ix * nInstrPSolved; for (int ly = 0; ly < nInstrPSolved; ly++) { vVix_InstrConstr = offj + instrCol[iix + ly] - offsetAttParam; localSum = systemMatrix[lset_InstrConstr] * knownTerms[ix]; vVect_aux_InstP[taskid][vVix] += localSum; lset_InstrConstr++; } //for ly } //// } } #pragma omp taskwait // long int z=offsetAttParam; for(int i=0; i < omp_get_num_threads();i++) { for(j=0; j < nElements;j++) { if(j==nElements/2) printf("vVect_aux_AttP[%d][%d]=%d\n",i,j,vVect_aux_AttP[i][j]); else if(j==(nElements/2)+1) printf("vVect_aux_AttP[%d][%d]=%d\n",i,j,vVect_aux_AttP[i][j]); vVect[j+offsetAttParam]+= vVect_aux_AttP[i][j]+vVect_aux_InstP[i][j]; //z++; } } //printf("z: %ld\n",z); // #pragma omp task in(vVect) { ///////////////////////////////////////////////////// ///} //pragma *ompSec += time(NULL) - startTime; if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("PE=%d AprodTiming: mode=2.1 OmpSec=%ld\n", myid, time(NULL) - startTime); ///////////////////////////////////////////////////// /// Mode 2 Global Sect if (nGlobP ) { time_t startTime_nGlobP = time(NULL); long lset; int offLset = nAstroPSolved + nAttP + nInstrPSolved; long offj = offsetGlobParam + (localAstroMax - offsetAttParam); long vVix; for (long ix = 0; ix < mapNoss[myid]; ix++) { lset = nparam * ix + offLset; for (long ly = 0; ly < nGlobP; ly++) { vVix = offj + ly; localSum = systemMatrix[lset] * knownTerms[ix]; vVect[vVix] += localSum; lset++; } //for ly } //for ix if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("\tPE=%d AprodTiming: nGlobP sec=%ld\n", myid, time(NULL) - startTime_nGlobP); } //////////////////////////////////////////////////// startTime = time(NULL); //FV_ EDIT ompSs // #pragma omp parallel private(myid, yi, localSum, tid, nthreads, i2, j2, na) shared(mapNoss, vVect, systemMatrix, knownTerms, k, j3) { myid = comlsqr.myid; localSum = 0.0; ////////////////////////////////////////////////////// /// Mode 2 ExtConstr if (nEqExtConstr ) { time_t startTime_nEqExtConstr = time(NULL); long offExtStarConstrEq; long off2; long off3; for (int ix = 0; ix < nEqExtConstr; ix++) { //stars yi = knownTerms[mapNoss[myid] + ix]; offExtStarConstrEq = mapNcoeff[myid] + ix * nOfElextObs; //Star offset on the row ix (all the row) //FV_ EDIT ompSs //#pragma omp for for (long yx = 0; yx < numOfExtStar; yx++) { off3 = yx * nAstroPSolved; off2 = offExtStarConstrEq + off3; for (int j2 = 0; j2 < nAstroPSolved; j2++) { localSum = systemMatrix[off2 + j2] * yi; vVect[j2 + off3] += localSum; } } //FV_ EDIT ompSs //#pragma omp barrier } //for ix long offExtAttConstrEq; long offExtUnk; long off1 = VrIdAstroPDimMax * nAstroPSolved + startingAttColExtConstr; for (int ix = 0; ix < nEqExtConstr; ix++) { //att yi = knownTerms[mapNoss[myid] + ix]; offExtAttConstrEq = mapNcoeff[myid] + ix * nOfElextObs; //Att offset on the row ix (all the row) offExtAttConstrEq += numOfExtStar * nAstroPSolved; //Att offset inside ix row for (int nax = 0; nax < nAttAxes; nax++) { offExtUnk = off1 + nax * nDegFreedomAtt; // Att offset for Unk array on extConstr off2 = offExtAttConstrEq + nax * numOfExtAttCol; //FV_ EDIT ompSs //#pragma omp for for (int jx = 0; jx < numOfExtAttCol; jx++) { localSum = systemMatrix[off2 + jx] * yi; vVect[offExtUnk + jx] += localSum; } //FV_ EDIT ompSs //#pragma omp barrier } } if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("\tPE=%d AprodTiming: nEqExtConstr sec=%ld\n", myid, time(NULL) - startTime_nEqExtConstr); } ////////////////////////////////////////////////////// /// Mode 2 BarConstr if (nEqBarConstr ) { time_t startTime_nEqBarConstr = time(NULL); localSum = 0.0; long off3; long off2; for (int ix = 0; ix < nEqBarConstr; ix++) { //stars yi = knownTerms[mapNoss[myid] + nEqExtConstr + ix]; long offBarStarConstrEq = mapNcoeff[myid] + nEqExtConstr * nOfElextObs + ix * nOfElBarObs; //Star offset on the row i2 (all the row) //FV_ EDIT ompSs //#pragma omp for for (long yx = 0; yx < numOfBarStar; yx++) { off3 = yx * nAstroPSolved; off2 = offBarStarConstrEq + off3; for (int j2 = 0; j2 < nAstroPSolved; j2++) { localSum = systemMatrix[off2 + j2] * yi; vVect[j2 + off3] += localSum; } } //FV_ EDIT ompSs //#pragma omp barrier } //for i2 if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("\tPE=%d AprodTiming: nEqBarConstr sec=%ld\n", myid, time(NULL) - startTime_nEqBarConstr); } ////////////////////////////////////////////////////// /// Mode 2 InstrConstr if (nOfInstrConstr ) { time_t startTime_nOfInstrConstr = time(NULL); localSum = 0.0; int offSetInstr; long off1; long offInstrUnk = VrIdAstroPDimMax * nAstroPSolved + nAttAxes * nDegFreedomAtt; long off2 = mapNoss[myid] + nEqExtConstr + nEqBarConstr; long off3 = mapNcoeff[myid] + nOfElextObs * nEqExtConstr + nOfElBarObs * nEqBarConstr; long off4 = mapNoss[myid] * nInstrPSolved; long off5; long off6; for (int k1 = myid; k1 < nOfInstrConstr; k1 = k1 + nproc) { yi = knownTerms[off2 + k1]; offSetInstr = 0; for (int m = 0; m < k1; m++) offSetInstr += instrConstrIlung[m]; off1 = off3 + offSetInstr; off5 = off4 + offSetInstr; //FV_ EDIT ompSs //#pragma omp for for (int j = 0; j < instrConstrIlung[k1]; j++) { localSum = systemMatrix[off1 + j] * yi; off6 = offInstrUnk + instrCol[off5 + j]; vVect[off6] += localSum; } } if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("\tPE=%d AprodTiming: nOfInstrConstr sec=%ld\n", myid, time(NULL) - startTime_nOfInstrConstr); } //////////// } //pragma *ompSec += time(NULL) - startTime; if (comlsqr.itn <= 2 && (myid == 0 || myid == nproc - 1 || debugMode == 1)) printf("PE=%d AprodTiming: mode=2.2 OmpSec=%ld\n", myid, time(NULL) - startTime); } #pragma omp task in(vVect_aux_AttP,vVect_aux_InstP) //freeing aux vect for (int i=0;i<omp_get_num_threads();i++) { free(vVect_aux_AttP[i]); free(vVect_aux_InstP[i]); } free(vVect_aux_AttP); free(vVect_aux_InstP); } // else if(mode==2) */ }
lsqr.c +1 −1 Original line number Diff line number Diff line Loading @@ -562,7 +562,7 @@ long nDegFreedomAtt; int nAttAxes; int nAttParam, nInstrParam, nGlobalParam, itnTest, nAttP, numOfExtStar, numOfBarStar, numOfExtAttCol, nobs; long mapNossBefore; short nAstroPSolved, nInstrPsolved; int nAstroPSolved, nInstrPsolved; double cycleStartMpiTime, cycleEndMpiTime; double *vAuxVect; int CPRCount; Loading
util.c +28 −64 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ void instrIndexIdToColIndexGlobal(int* instrIndexPointer, int* instrConst,int to { long relPos_ls; int nInstrParam=comlsqr.nInstrParam; short nInstrPSolved=comlsqr.nInstrPSolved; int nInstrPSolved=comlsqr.nInstrPSolved; int maInstrFlag=comlsqr.maInstrFlag; int nuInstrFlag=comlsqr.nuInstrFlag; int ssInstrFlag=comlsqr.ssInstrFlag; Loading Loading @@ -794,11 +794,11 @@ void precondSystemMatrix(double *systemMatrix, double *preCondVect, long int *m mapNcoeff=comlsqr.mapNcoeff; mapNoss=comlsqr.mapNoss; short nAstroPSolved=comlsqr.nAstroPSolved; short nInstrPSolved=comlsqr.nInstrPSolved; int nAstroPSolved=comlsqr.nAstroPSolved; int nInstrPSolved=comlsqr.nInstrPSolved; long nparam=comlsqr.parOss; int multMI=comlsqr.multMI; short nAttParAxis=comlsqr.nAttParAxis; int nAttParAxis=comlsqr.nAttParAxis; long counterAxis=0, counterInstr=0; long nDegFredoomAtt=comlsqr.nDegFreedomAtt; long VrIdAstroPDimMax=comlsqr.VrIdAstroPDimMax; Loading Loading @@ -1081,7 +1081,7 @@ int invMap(int nAstroPSolved,int *inv){ inv[2]=2; inv[3]=3; } if(nAstroPSolved==5){ if(nAstroPSolved>=5){ inv[0]=1; inv[1]=2; inv[2]=3; Loading Loading @@ -1362,7 +1362,7 @@ void writeBinFiles(double* systemMatrix,long* matrixIndex,int* instrCol,double* int numOfExtStarinFile=1000000; int numOfExtStartoWrite; double randVal; short nAstroPSolved=comlsqr.nAstroPSolved; int nAstroPSolved=comlsqr.nAstroPSolved; for(int nwr=0;nwr<nStar;nwr+=numOfExtStarinFile){ int localCounter=0; if(nStar>numOfExtStarinFile+nwr)numOfExtStartoWrite=numOfExtStarinFile; Loading Loading @@ -1426,7 +1426,7 @@ void writeBinFiles(double* systemMatrix,long* matrixIndex,int* instrCol,double* int numOfBarStarinFile=1000000; int numOfBarStartoWrite; double randVal; short nAstroPSolved=comlsqr.nAstroPSolved; int nAstroPSolved=comlsqr.nAstroPSolved; for(int nwr=0;nwr<nStar;nwr+=numOfBarStarinFile){ int localCounter=0; if(nStar>numOfBarStarinFile+nwr)numOfBarStartoWrite=numOfBarStarinFile; Loading Loading @@ -1565,7 +1565,8 @@ struct nullSpace cknullSpace(double * systemMatrix,long * matrixIndex,double *at int nLocalStar; int firstStarConstr,lastStarConstr; int nOfElextObs,numOfExtStar,numOfExtAttCol,startingAttColExtConstr; short nAstroPSolved,nAttParAxis,nAttAxes; int nAstroPSolved,nAttParAxis; short nAttAxes; double *nullSpaceFPN; double *productNS; int npeSend,npeRecv; Loading Loading @@ -2083,7 +2084,7 @@ void swapInstrCoeff(double * instrCoeff, long repeat, long nrows){ free(tmp); return; } float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttParam, int nInstrParam){ float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttParam, int nInstrParam, int nInstrPSolved, int nAstroPSolved){ float smGB=0., ktGB=0., miGB=0.,iiGB=0.,auxGB=0., memGB=0., prevmemGB; long prevnStar, prevnobs; long gigaByte=1024*1024*1024; Loading Loading @@ -2111,8 +2112,8 @@ float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttP smGB=(float)(ncoeff)*8/(gigaByte); //systemMatrix ktGB=(float)(nobs)*8/(gigaByte); //knownTerms miGB=(float)(nobs*2)*8/(gigaByte); //matrixIndex iiGB=(float)(nobs*6)*4/(gigaByte); //InstrIndex auxGB=(float)(nStar*5+nAttParam+nInstrParam+0)*8/(gigaByte); //precondVect+vVect+wVect+xSolution+standardError iiGB=(float)(nobs*nInstrPSolved)*4/(gigaByte); //InstrIndex auxGB=(float)(nStar*nAstroPSolved+nAttParam+nInstrParam+0)*8/(gigaByte); //precondVect+vVect+wVect+xSolution+standardError memGB=smGB+miGB+ktGB+iiGB+5*auxGB; } nStar=prevnStar; Loading @@ -2127,8 +2128,8 @@ float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttP smGB=(float)(ncoeff)*8/(gigaByte); //systemMatrix ktGB=(float)(nobs)*8/(gigaByte); //knownTerms miGB=(float)(nobs*2)*8/(gigaByte); //matrixIndex iiGB=(float)(nobs*6)*4/(gigaByte); //InstrIndex auxGB=(float)(nStar*5+nAttParam+nInstrParam+0)*8/(gigaByte); //precondVect+vVect+wVect+xSolution+standardError iiGB=(float)(nobs*nInstrPSolved)*4/(gigaByte); //InstrIndex auxGB=(float)(nStar*nAstroPSolved+nAttParam+nInstrParam+0)*8/(gigaByte); //precondVect+vVect+wVect+xSolution+standardError memGB=smGB+miGB+ktGB+iiGB+5*auxGB; } nStar=prevnStar; Loading @@ -2141,13 +2142,13 @@ float simfullram(long &nStar, long &nobs, float memGlobal, int nparam, int nAttP double aprodM1Obs(long ix,struct comData comlsqr, double *vVect, double *systemMatrix, long int *matrixIndex, int *instrCol){ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long nDegFreedomAtt = comlsqr.nDegFreedomAtt; short nAttParAxis = comlsqr.nAttParAxis; short nAttP = comlsqr.nAttP; short nGlobP = comlsqr.nGlobP; short nInstrPSolved = comlsqr.nInstrPSolved; int nAttParAxis = comlsqr.nAttParAxis; int nAttP = comlsqr.nAttP; int nGlobP = comlsqr.nGlobP; int nInstrPSolved = comlsqr.nInstrPSolved; long offsetAttParam = comlsqr.offsetAttParam; long offsetInstrParam = comlsqr.offsetInstrParam; long offsetGlobParam = comlsqr.offsetGlobParam; Loading Loading @@ -2237,7 +2238,7 @@ double aprodM1Obs(long ix,struct comData comlsqr, double *vVect, double *system void aprodM2AstroP(long ix,int nt, struct comData comlsqr, double *vVect, double *systemMatrix, long int *matrixIndex, double *knownTerms){ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long nparam = comlsqr.parOss; int multMI = comlsqr.multMI; long miValAstro = 0; Loading Loading @@ -2274,10 +2275,10 @@ void aprodM2AstroP(long ix,int nt, struct comData comlsqr, double *vVect, doubl void aprodM2AttP(long ix,int nt, struct comData comlsqr, double *vVect, double *systemMatrix, long int *matrixIndex, double *knownTerms){ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long offsetAttParam = comlsqr.offsetAttParam; short nAttParAxis = comlsqr.nAttParAxis; int nAttParAxis = comlsqr.nAttParAxis; long nparam = comlsqr.parOss; int multMI = comlsqr.multMI; long mix; Loading Loading @@ -2322,11 +2323,11 @@ void aprodM2AttP(long ix,int nt, struct comData comlsqr, double *vVect, double void aprodM2InstrP(long ix,int nt, struct comData comlsqr, double *vVect, double *systemMatrix, int *instrCol, double *knownTerms){ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; int nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long offsetAttParam = comlsqr.offsetAttParam; short nAttP = comlsqr.nAttP; short nInstrPSolved = comlsqr.nInstrPSolved; int nAttP = comlsqr.nAttP; int nInstrPSolved = comlsqr.nInstrPSolved; long nparam = comlsqr.parOss; long miValAstro = 0; long offLocalAstro = 0; Loading Loading @@ -2367,12 +2368,12 @@ int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long offsetAttParam = comlsqr.offsetAttParam; short nAttP = comlsqr.nAttP; short nInstrPSolved = comlsqr.nInstrPSolved; int nAttP = comlsqr.nAttP; int nInstrPSolved = comlsqr.nInstrPSolved; long nparam = comlsqr.parOss; long lset; long offsetGlobParam = comlsqr.offsetGlobParam; short nGlobP = comlsqr.nGlobP; int nGlobP = comlsqr.nGlobP; long vVix; double localSum; Loading Loading @@ -2401,40 +2402,3 @@ long vVix; } /* int myid = comlsqr.myid; short nAstroPSolved = comlsqr.nAstroPSolved; long localAstroMax = comlsqr.VrIdAstroPDimMax * nAstroPSolved; long nDegFreedomAtt = comlsqr.nDegFreedomAtt; short nAttParAxis = comlsqr.nAttParAxis; short nAttP = comlsqr.nAttP; short nGlobP = comlsqr.nGlobP; short nInstrPSolved = comlsqr.nInstrPSolved; long offsetAttParam = comlsqr.offsetAttParam; long offsetInstrParam = comlsqr.offsetInstrParam; long offsetGlobParam = comlsqr.offsetGlobParam; long nparam = comlsqr.parOss; short nAttAxes = comlsqr.nAttAxes; int multMI = comlsqr.multMI; long miValAstro = 0; long miValAtt = 0; long jstartAtt = 0; long offLocalAstro = 0; long offLocalAtt = 0; long offLocalInstr = 0; //Offset on Instruments double taskLocalSum=0.; long jstartAstro = 0; long ixInstr = 0; int nInstrVal = 0; double sum=0.; long lset; offLocalInstr = offsetInstrParam + (localAstroMax - offsetAttParam); //Offset on Instruments nInstrVal = nAstroPSolved + nAttP; offLocalAstro = comlsqr.mapStar[myid][0] * nAstroPSolved; //Offset on my mstars offLocalAtt = localAstroMax - offsetAttParam; //Offset on attitude long offLocalGlob = offsetGlobParam + (localAstroMax - offsetAttParam); //Offset on GlobP int nGlobVal = nAstroPSolved + nAttP + nInstrPSolved; jstartAstro = miValAstro - offLocalAstro; lset=comlsqr.mapForThread[nt][0]*nparam+(ix-comlsqr.mapForThread[nt][0])*nparam; */