diff --git a/ParU/Source/paru_Diag_update.cpp b/ParU/Source/paru_Diag_update.cpp index 1df29434a..06def1b61 100644 --- a/ParU/Source/paru_Diag_update.cpp +++ b/ParU/Source/paru_Diag_update.cpp @@ -35,8 +35,8 @@ void paru_Diag_update(int64_t pivcol, int64_t pivrow, paru_work *Work) int64_t col2 = inv_Diag_map[pivrow]; Diag_map[col2] = diag_row; - PRLEVEL(1, ("%% Inside Diag update pivcol=%ld pivrow=%ld" - " diag_row=%ld col2=%ld\n", + PRLEVEL(1, ("%% Inside Diag update pivcol=" LD " pivrow=" LD "" + " diag_row=" LD " col2=" LD "\n", pivcol, pivrow, diag_row, col2)); inv_Diag_map[diag_row] = col2; diff --git a/ParU/Source/paru_analyze.cpp b/ParU/Source/paru_analyze.cpp index 564dff67e..b68dede37 100644 --- a/ParU/Source/paru_analyze.cpp +++ b/ParU/Source/paru_analyze.cpp @@ -512,7 +512,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, #ifndef NDEBUG int64_t nr = Sym_umf->n_row; int64_t nc = Sym_umf->n_col; - PRLEVEL(1, ("In: %ldx%ld nnz = %ld \n", nr, nc, anz)); + PRLEVEL(1, ("In: " LD "x" LD " nnz = " LD " \n", nr, nc, anz)); #endif // nchains = Sym_umf->nchains; @@ -543,13 +543,13 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, #ifndef NDEBUG PR = 1; - PRLEVEL(-1, ("\n%%\tcs1 = %ld, rs1 = %ld n1 = %ld\n", cs1, rs1, n1)); + PRLEVEL(-1, ("\n%%\tcs1 = " LD ", rs1 = " LD " n1 = " LD "\n", cs1, rs1, n1)); PRLEVEL(PR, ("From the Symbolic object,\ - C is of dimension %ld-by-%ld\n", + C is of dimension " LD "-by-" LD "\n", nr, nc)); - PRLEVEL(PR, (" with nz = %ld, number of fronts = %ld,\n", anz, nfr)); + PRLEVEL(PR, (" with nz = " LD ", number of fronts = " LD ",\n", anz, nfr)); PR = 1; - // PRLEVEL(PR, (" number of frontal matrix chains = %ld\n", nchains)); + // PRLEVEL(PR, (" number of frontal matrix chains = " LD "\n", nchains)); PRLEVEL(1, ("\nPivot columns in each front, and parent of each front:\n")); int64_t k = 0; @@ -558,14 +558,14 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, for (int64_t i = 0; i < nfr; i++) { int64_t fnpiv = Front_npivcol[i]; - PRLEVEL(PR, ("Front %ld: parent front: %ld number of pivot cols: %ld\n", + PRLEVEL(PR, ("Front " LD ": parent front: " LD " number of pivot cols: " LD "\n", i, Front_parent[i], fnpiv)); - // PRLEVEL(PR, ("%% first row is %ld\n", Front_1strow[i])); + // PRLEVEL(PR, ("%% first row is " LD "\n", Front_1strow[i])); for (int64_t j = 0; j < fnpiv; j++) { int64_t col = Qinit[k]; - PRLEVEL(PR, ("%ld-th pivot column is column %ld" + PRLEVEL(PR, ("" LD "-th pivot column is column " LD "" " in original matrix\n", k, col)); k++; @@ -574,31 +574,31 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, PR = -1; PRLEVEL(PR, ("\nTotal number of pivot columns " - "in frontal matrices: %ld\n", + "in frontal matrices: " LD "\n", k)); // PRLEVEL(PR, ("\nFrontal matrix chains:\n")); // for (int64_t j = 0; j < nchains; j++) // { - // PRLEVEL(PR, ("Frontal matrices %ld to %ld in chain\n", + // PRLEVEL(PR, ("Frontal matrices " LD " to " LD " in chain\n", // Chain_start[j], // Chain_start[j + 1] - 1)); - // PRLEVEL(PR, ("\tworking array of size %ld-by-%ld\n", + // PRLEVEL(PR, ("\tworking array of size " LD "-by-" LD "\n", // Chain_maxrows[j], // Chain_maxcols[j])); // } PRLEVEL(PR, ("Forthwith Pinit =\n")); - for (int64_t i = 0; i < MIN(77, m); i++) PRLEVEL(PR, ("%ld ", Pinit[i])); + for (int64_t i = 0; i < MIN(77, m); i++) PRLEVEL(PR, ("" LD " ", Pinit[i])); PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("Forthwith Qinit =\n")); - for (int64_t i = 0; i < MIN(77, m); i++) PRLEVEL(PR, ("%ld ", Qinit[i])); + for (int64_t i = 0; i < MIN(77, m); i++) PRLEVEL(PR, ("" LD " ", Qinit[i])); PRLEVEL(PR, ("\n")); PR = -1; if (Diag_map) { PRLEVEL(PR, ("Forthwith Diag_map =\n")); - for (int64_t i = 0; i < MIN(77, n); i++) PRLEVEL(PR, ("%ld ", Diag_map[i])); + for (int64_t i = 0; i < MIN(77, n); i++) PRLEVEL(PR, ("" LD " ", Diag_map[i])); PRLEVEL(PR, ("\n")); } PR = 1; @@ -626,11 +626,11 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, Sym->Qfill = Qinit; Sym->Diag_map = Diag_map; - PRLEVEL(0, ("%% A is %ld x %ld \n", m, n)); - PRLEVEL(1, ("LU = zeros(%ld,%ld);\n", m, n)); + PRLEVEL(0, ("%% A is " LD " x " LD " \n", m, n)); + PRLEVEL(1, ("LU = zeros(" LD "," LD ");\n", m, n)); PRLEVEL(1, ("npivots =[]; \n")); - PRLEVEL(1, ("S = zeros(%ld,%ld); %% n1 = %ld\n", m, n, n1)); - PRLEVEL(1, ("%% nf=%ld\n", nf)); + PRLEVEL(1, ("S = zeros(" LD "," LD "); %% n1 = " LD "\n", m, n, n1)); + PRLEVEL(1, ("%% nf=" LD "\n", nf)); // /* ---------------------------------------------------------------------- */ /* Fixing Parent and computing Children datat structure */ @@ -688,12 +688,12 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, if (nf > 0) { PRLEVEL(PR, ("%%%% Super:\n")); - for (int64_t k = 0; k <= nf; k++) PRLEVEL(PR, (" %ld", Super[k])); + for (int64_t k = 0; k <= nf; k++) PRLEVEL(PR, (" " LD "", Super[k])); PRLEVEL(PR, ("\n")); PR = 1; PRLEVEL(PR, ("%%%% Parent:\n")); - for (int64_t k = 0; k <= nf; k++) PRLEVEL(PR, (" %ld", Parent[k])); + for (int64_t k = 0; k <= nf; k++) PRLEVEL(PR, (" " LD "", Parent[k])); PRLEVEL(PR, ("\n")); } PR = 1; @@ -712,7 +712,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, // Number of the columns of the root of each subtree // int64_t threshold = Control->relaxed_amalgamation_threshold; - PRLEVEL(1, ("Relaxed amalgamation threshold = %ld\n", threshold)); + PRLEVEL(1, ("Relaxed amalgamation threshold = " LD "\n", threshold)); int64_t newF = 0; // int64_t num_roots = 0; //deprecated I dont use it anymore @@ -721,28 +721,28 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, { // finding representative for each front int64_t repr = f; // amalgamate till number of pivot columns is small - PRLEVEL(PR, ("%% repr = %ld Parent =%ld\n", repr, Parent[repr])); - PRLEVEL(PR, ("%%size of Potential pivot= %ld\n", + PRLEVEL(PR, ("%% repr = " LD " Parent =" LD "\n", repr, Parent[repr])); + PRLEVEL(PR, ("%%size of Potential pivot= " LD "\n", Super[Parent[repr] + 1] - Super[f])); while (Super[Parent[repr] + 1] - Super[f] < threshold && Parent[repr] != -1) { repr = Parent[repr]; - PRLEVEL(PR, ("%%Middle stage f= %ld repr = %ld\n", f, repr)); - PRLEVEL(PR, ("%%number of pivot cols= %ld\n", + PRLEVEL(PR, ("%%Middle stage f= " LD " repr = " LD "\n", f, repr)); + PRLEVEL(PR, ("%%number of pivot cols= " LD "\n", Super[repr + 1] - Super[f])); - PRLEVEL(PR, ("%%number of pivot cols if Parent collapsed= %ld\n", + PRLEVEL(PR, ("%%number of pivot cols if Parent collapsed= " LD "\n", Super[Parent[repr] + 1] - Super[f])); } // if (Parent[repr] == -1) num_roots++; - PRLEVEL(PR, ("%% newF = %ld for:\n", newF)); + PRLEVEL(PR, ("%% newF = " LD " for:\n", newF)); for (int64_t k = f; k <= repr; k++) { - PRLEVEL(PR, ("%% %ld ", k)); + PRLEVEL(PR, ("%% " LD " ", k)); fmap[k] = newF; } - PRLEVEL(PR, ("%%repr = %ld\n", repr)); + PRLEVEL(PR, ("%%repr = " LD "\n", repr)); newF++; f = repr; } @@ -776,7 +776,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, int64_t oldParent = Parent[oldf]; newParent[newf] = oldParent >= 0 ? fmap[oldParent] : -1; } - PRLEVEL(-1, ("%% newF = %ld and nf=%ld\n", newNf, nf)); + PRLEVEL(-1, ("%% newF = " LD " and nf=" LD "\n", newNf, nf)); /* ---------------------------------------------------------------------- */ /* Finding the Upper bound of rows and cols */ @@ -810,10 +810,10 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, // Copying first nf+1 elements of Front_nrows(UMFPACK) into Fm(SPQR like) for (int64_t oldf = 0; oldf < nf; oldf++) { - PRLEVEL(PR, ("oldf=%ld\n", oldf)); + PRLEVEL(PR, ("oldf=" LD "\n", oldf)); int64_t newf = fmap[oldf]; - PRLEVEL(PR, ("newf=%ld\n", newf)); - PRLEVEL(PR, ("next=%ld\n", fmap[oldf + 1])); + PRLEVEL(PR, ("newf=" LD "\n", newf)); + PRLEVEL(PR, ("next=" LD "\n", fmap[oldf + 1])); if (newf != fmap[oldf + 1]) { // either root or not amalgamated @@ -821,15 +821,15 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, Cm[newf] = Front_ncols[oldf] - Front_npivcol[oldf]; // newSuper[newf+1] = Super[oldf+1] ; Super[newf + 1] = Super[oldf + 1]; - PRLEVEL(PR, ("Fm[newf]=%ld\n", Fm[newf])); - PRLEVEL(PR, ("Cm[newf]=%ld\n", Cm[newf])); + PRLEVEL(PR, ("Fm[newf]=" LD "\n", Fm[newf])); + PRLEVEL(PR, ("Cm[newf]=" LD "\n", Cm[newf])); } else { Fm[newf] += Front_npivcol[oldf]; // Cm[newf] += Front_npivcol[oldf]; - PRLEVEL(PR, ("Fm[newf]=%ld\n", Fm[newf])); - PRLEVEL(PR, ("Cm[newf]=%ld\n", Cm[newf])); + PRLEVEL(PR, ("Fm[newf]=" LD "\n", Fm[newf])); + PRLEVEL(PR, ("Cm[newf]=" LD "\n", Cm[newf])); } } if (Super) Super[newNf] = Super[nf]; @@ -841,46 +841,46 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, if (Cm) { PRLEVEL(PR, ("Cm =\n")); - for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("%ld ", Cm[i])); + for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("" LD " ", Cm[i])); PRLEVEL(PR, ("\n")); } if (Fm) { PRLEVEL(PR, ("Fm =\n")); - for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("%ld ", Fm[i])); + for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("" LD " ", Fm[i])); PRLEVEL(PR, ("\n")); } PRLEVEL(PR, ("Pivot cols=\n")); - for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("%ld ", Front_npivcol[i])); + for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("" LD " ", Front_npivcol[i])); PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("Upper bound on Rows =\n")); - for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("%ld ", Front_nrows[i])); + for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("" LD " ", Front_nrows[i])); PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("Upper bound on Cols=\n")); - for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("%ld ", Front_ncols[i])); + for (int64_t i = 0; i < nf + 1; i++) PRLEVEL(PR, ("" LD " ", Front_ncols[i])); PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("%%%% Super:\n")); if (nf > 0) - for (int64_t k = 0; k <= nf; k++) PRLEVEL(PR, (" %ld", Super[k])); + for (int64_t k = 0; k <= nf; k++) PRLEVEL(PR, (" " LD "", Super[k])); PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("%%%% fmap:\n")); - for (int64_t k = 0; k <= nf; k++) PRLEVEL(PR, (" %ld", fmap[k])); + for (int64_t k = 0; k <= nf; k++) PRLEVEL(PR, (" " LD "", fmap[k])); PRLEVEL(PR, ("\n")); PR = -1; - PRLEVEL(PR, ("%%%% newParent(%ld):\n", newNf)); - for (int64_t k = 0; k < newNf; k++) PRLEVEL(PR, ("%ld ", newParent[k])); + PRLEVEL(PR, ("%%%% newParent(" LD "):\n", newNf)); + for (int64_t k = 0; k < newNf; k++) PRLEVEL(PR, ("" LD " ", newParent[k])); PRLEVEL(PR, ("\n")); #endif // This prints my etree; I keep it in comments to find it easily // printf ("%%%% newParent:\n"); - // for (int64_t k = 0; k < newNf; k++) printf("%ld ", newParent[k]); + // for (int64_t k = 0; k < newNf; k++) printf("" LD " ", newParent[k]); // printf("\n"); paru_free(nf + 1, sizeof(int64_t), Sym->Parent); @@ -901,17 +901,17 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, { if (Parent[f] != -1 && Depth[f] == 0) // not computed so far { - PRLEVEL(PR, ("%% Precompute Depth[%ld]=%ld\n", f, Depth[f])); + PRLEVEL(PR, ("%% Precompute Depth[" LD "]=" LD "\n", f, Depth[f])); int64_t d = 1; int64_t p = Parent[f]; while (Parent[p] != -1 && Depth[p] == 0) { p = Parent[p]; d++; - PRLEVEL(PR, ("%% Up Depth[%ld]=%ld d=%ld\n", p, Depth[p], d)); + PRLEVEL(PR, ("%% Up Depth[" LD "]=" LD " d=" LD "\n", p, Depth[p], d)); } Depth[f] = d + Depth[p]; // depth is computed - PRLEVEL(PR, ("%% Depth[%ld]=%ld Depth[%ld]=%ld\n", p, Depth[p], f, + PRLEVEL(PR, ("%% Depth[" LD "]=" LD " Depth[" LD "]=" LD "\n", p, Depth[p], f, Depth[f])); // updating ancestors d = Depth[f]; @@ -920,10 +920,10 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, { Depth[p] = --d; p = Parent[p]; - PRLEVEL(PR, ("%% down Depth[%ld]=%ld d=%ld\n", p, Depth[p], d)); + PRLEVEL(PR, ("%% down Depth[" LD "]=" LD " d=" LD "\n", p, Depth[p], d)); } } - PRLEVEL(PR, ("%% Postcompute Depth[%ld]=%ld\n", f, Depth[f])); + PRLEVEL(PR, ("%% Postcompute Depth[" LD "]=" LD "\n", f, Depth[f])); } // depth of each non leave node is the max of depth of its children @@ -983,17 +983,17 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, Sym->row_Int_bound = row_Int_bound; Sym->col_Int_bound = col_Int_bound; PR = 1; - PRLEVEL(PR, ("%%row_Int_bound=%ld, col_Int_bound=%ld", row_Int_bound, + PRLEVEL(PR, ("%%row_Int_bound=" LD ", col_Int_bound=" LD "", row_Int_bound, col_Int_bound)); PRLEVEL(PR, - ("%%-Us_bound_size = %ld LUs_bound_size = %ld sum = %ld\n", + ("%%-Us_bound_size = " LD " LUs_bound_size = " LD " sum = " LD "\n", Us_bound_size, LUs_bound_size, row_Int_bound + col_Int_bound + Us_bound_size + LUs_bound_size)); PR = 1; PRLEVEL(PR, ("%%%%-Chidlp-----")); if (Childp) { - for (int64_t f = 0; f < nf + 2; f++) PRLEVEL(PR, ("%ld ", Childp[f])); + for (int64_t f = 0; f < nf + 2; f++) PRLEVEL(PR, ("" LD " ", Childp[f])); PRLEVEL(PR, ("\n")); } #endif @@ -1034,7 +1034,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, { PR = 1; PRLEVEL(PR, ("%%%%_cChidlp_____")); - for (int64_t f = 0; f < nf + 2; f++) PRLEVEL(PR, ("%ld ", cChildp[f])); + for (int64_t f = 0; f < nf + 2; f++) PRLEVEL(PR, ("" LD " ", cChildp[f])); PRLEVEL(PR, ("\n")); } #endif @@ -1078,16 +1078,16 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, #ifndef NDEBUG PRLEVEL(PR, ("Qinit =\n")); - for (int64_t j = 0; j < MIN(64, n); j++) PRLEVEL(PR, ("%ld ", Qinit[j])); + for (int64_t j = 0; j < MIN(64, n); j++) PRLEVEL(PR, ("" LD " ", Qinit[j])); PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("Pinit =\n")); - for (int64_t i = 0; i < MIN(64, m); i++) PRLEVEL(PR, ("%ld ", Pinit[i])); + for (int64_t i = 0; i < MIN(64, m); i++) PRLEVEL(PR, ("" LD " ", Pinit[i])); PRLEVEL(PR, ("\n")); PR = 1; PRLEVEL(PR, ("Pinv =\n")); - for (int64_t i = 0; i < m; i++) PRLEVEL(PR, ("%ld ", Pinv[i])); + for (int64_t i = 0; i < m; i++) PRLEVEL(PR, ("" LD " ", Pinv[i])); PRLEVEL(PR, ("\n")); PR = 1; @@ -1095,7 +1095,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, { PRLEVEL(PR, ("inv_Diag_map =\n")); for (int64_t i = 0; i < MIN(64, n); i++) - PRLEVEL(PR, ("%ld ", inv_Diag_map[i])); + PRLEVEL(PR, ("" LD " ", inv_Diag_map[i])); PRLEVEL(PR, ("\n")); } PR = 1; @@ -1117,7 +1117,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, if (((Slp == NULL || cSlp == NULL) && rs1 != 0) || ((Sup == NULL || cSup == NULL) && cs1 != 0) || Ps == NULL) { - PRLEVEL(1, ("ParU: rs1=%ld cs1=%ld memory problem\n", rs1, cs1)); + PRLEVEL(1, ("ParU: rs1=" LD " cs1=" LD " memory problem\n", rs1, cs1)); ParU_Freesym(S_handle, Control); FREE_WORK; return PARU_OUT_OF_MEMORY; @@ -1132,18 +1132,18 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, #ifndef NDEBUG PR = 1; PRLEVEL(PR, ("Computing Staircase Structure and singleton structure\n")); - PRLEVEL(PR, ("rs1= %ld cs1=%ld\n", rs1, cs1)); + PRLEVEL(PR, ("rs1= " LD " cs1=" LD "\n", rs1, cs1)); PR = 1; #endif for (int64_t newcol = 0; newcol < n1; newcol++) { // The columns that are just in singleton int64_t oldcol = Qinit[newcol]; - PRLEVEL(PR, ("newcol = %ld oldcol=%ld\n", newcol, oldcol)); + PRLEVEL(PR, ("newcol = " LD " oldcol=" LD "\n", newcol, oldcol)); for (int64_t p = Ap[oldcol]; p < Ap[oldcol + 1]; p++) { int64_t oldrow = Ai[p]; int64_t newrow = Pinv[oldrow]; - PRLEVEL(PR, ("newrow=%ld oldrow=%ld\n", newrow, oldrow)); + PRLEVEL(PR, ("newrow=" LD " oldrow=" LD "\n", newrow, oldrow)); if (newrow < cs1) { // inside U singletons PRLEVEL(PR, ("Counting phase,Inside U singletons\n")); @@ -1156,13 +1156,13 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, PR = 1; #endif PRLEVEL(PR, ("Counting phase,Inside L singletons ")); - PRLEVEL(PR, ("newrow=%ld oldrow=%ld\n", newrow, oldrow)); + PRLEVEL(PR, ("newrow=" LD " oldrow=" LD "\n", newrow, oldrow)); slnz++; // if (newcol-cs1 +1 == 0) if (newcol < cs1) { - PRLEVEL(PR, ("newrow=%ld oldrow=%ld\n", newrow, oldrow)); - PRLEVEL(PR, ("!!!! newcol=%ld cs1=%ld\n", newcol, cs1)); + PRLEVEL(PR, ("newrow=" LD " oldrow=" LD "\n", newrow, oldrow)); + PRLEVEL(PR, ("!!!! newcol=" LD " cs1=" LD "\n", newcol, cs1)); } ASSERT(newcol - cs1 + 1 != 0); ASSERT(newcol >= cs1); @@ -1176,34 +1176,34 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, PRLEVEL(PR, ("Analyze: Sup and Slp in the middle\n")); if (cs1 > 0) { - PRLEVEL(PR, ("(%ld) Sup =", sunz)); - for (int64_t k = 0; k <= cs1; k++) PRLEVEL(PR, ("%ld ", Sup[k])); + PRLEVEL(PR, ("(" LD ") Sup =", sunz)); + for (int64_t k = 0; k <= cs1; k++) PRLEVEL(PR, ("" LD " ", Sup[k])); PRLEVEL(PR, ("\n")); } if (rs1 > 0) { - PRLEVEL(PR, ("(%ld) Slp =", slnz)); - for (int64_t k = cs1; k <= n1; k++) PRLEVEL(PR, ("%ld ", Slp[k - cs1])); + PRLEVEL(PR, ("(" LD ") Slp =", slnz)); + for (int64_t k = cs1; k <= n1; k++) PRLEVEL(PR, ("" LD " ", Slp[k - cs1])); PRLEVEL(PR, ("\n")); } #endif for (int64_t newcol = n1; newcol < n; newcol++) { int64_t oldcol = Qinit[newcol]; - PRLEVEL(1, ("newcol = %ld oldcol=%ld\n", newcol, oldcol)); + PRLEVEL(1, ("newcol = " LD " oldcol=" LD "\n", newcol, oldcol)); for (int64_t p = Ap[oldcol]; p < Ap[oldcol + 1]; p++) { int64_t oldrow = Ai[p]; int64_t newrow = Pinv[oldrow]; int64_t srow = newrow - n1; - PRLEVEL(1, ("\tnewrow=%ld oldrow=%ld srow=%ld\n", newrow, oldrow, + PRLEVEL(1, ("\tnewrow=" LD " oldrow=" LD " srow=" LD "\n", newrow, oldrow, srow)); if (srow >= 0) { // it is insdie S otherwise it is part of singleton // and update Diag_map if (Sp[srow + 1] == 0) { // first time seen - PRLEVEL(1, ("\tPs[%ld]= %ld\n", rowcount, srow)); + PRLEVEL(1, ("\tPs[" LD "]= " LD "\n", rowcount, srow)); Ps[rowcount] = srow; Pinit[n1 + rowcount] = oldrow; if (Diag_map) @@ -1211,7 +1211,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, int64_t diag_col = inv_Diag_map[newrow]; if (diag_col < n1) { - PRLEVEL(0, ("diag_col= %ld\n", diag_col)); + PRLEVEL(0, ("diag_col= " LD "\n", diag_col)); } // This assertions is not correct because // sometimes singltones can steal diagonals @@ -1239,28 +1239,28 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, #ifndef NDEBUG PR = 1; - PRLEVEL(PR, ("Sup and Slp finished (before cumsum)U-sing =%ld L-sing=%ld\n", + PRLEVEL(PR, ("Sup and Slp finished (before cumsum)U-sing =" LD " L-sing=" LD "\n", sunz, slnz)); if (cs1 > 0) { - PRLEVEL(PR, ("(%ld) Sup =", sunz)); - for (int64_t k = 0; k <= cs1; k++) PRLEVEL(PR, ("%ld ", Sup[k])); + PRLEVEL(PR, ("(" LD ") Sup =", sunz)); + for (int64_t k = 0; k <= cs1; k++) PRLEVEL(PR, ("" LD " ", Sup[k])); PRLEVEL(PR, ("\n")); } if (rs1 > 0) { - PRLEVEL(PR, ("(%ld) Slp =", slnz)); - for (int64_t k = cs1; k <= n1; k++) PRLEVEL(PR, ("%ld ", Slp[k - cs1])); + PRLEVEL(PR, ("(" LD ") Slp =", slnz)); + for (int64_t k = cs1; k <= n1; k++) PRLEVEL(PR, ("" LD " ", Slp[k - cs1])); PRLEVEL(PR, ("\n")); } PR = 1; PRLEVEL(PR, ("Ps =\n")); - for (int64_t k = 0; k < rowcount; k++) PRLEVEL(PR, ("%ld ", Ps[k])); + for (int64_t k = 0; k < rowcount; k++) PRLEVEL(PR, ("" LD " ", Ps[k])); PRLEVEL(PR, ("\n")); if (Diag_map) { - PRLEVEL(PR, ("Symbolic Diag_map (%ld) =\n", n)); - for (int64_t i = 0; i < MIN(64, n); i++) PRLEVEL(PR, ("%ld ", Diag_map[i])); + PRLEVEL(PR, ("Symbolic Diag_map (" LD ") =\n", n)); + for (int64_t i = 0; i < MIN(64, n); i++) PRLEVEL(PR, ("" LD " ", Diag_map[i])); PRLEVEL(PR, ("\n")); } PR = 1; @@ -1272,13 +1272,13 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, // That must not happen anyway if umfpack finds it PRLEVEL(1, ("ParU: Empty rows in submatrix\n")); #ifndef NDEBUG - PRLEVEL(1, ("m = %ld, n1 = %ld, rowcount = %ld, snz = %ld\n", m, n1, + PRLEVEL(1, ("m = " LD ", n1 = " LD ", rowcount = " LD ", snz = " LD "\n", m, n1, rowcount, snz)); for (int64_t srow = 0; srow < m - n1; srow++) { if (Sp[srow] == 0) { - PRLEVEL(1, ("Row %ld is empty\n", srow)); + PRLEVEL(1, ("Row " LD " is empty\n", srow)); } } #endif @@ -1292,7 +1292,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, #ifndef NDEBUG PR = 1; PRLEVEL(PR, ("Before permutation Sp =\n")); - for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("%ld ", Sp[i - n1])); + for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("" LD " ", Sp[i - n1])); PRLEVEL(PR, ("\n")); #endif @@ -1321,13 +1321,13 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, #ifndef NDEBUG PRLEVEL(PR, ("After permutation Sp =\n")); - for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("%ld ", cSp[i - n1])); + for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("" LD " ", cSp[i - n1])); PRLEVEL(PR, ("\n")); PR = 1; if (rs1 > 0) { - PRLEVEL(PR, ("(%ld) Slp =", slnz)); - for (int64_t k = 0; k <= rs1; k++) PRLEVEL(PR, ("%ld ", Slp[k])); + PRLEVEL(PR, ("(" LD ") Slp =", slnz)); + for (int64_t k = 0; k <= rs1; k++) PRLEVEL(PR, ("" LD " ", Slp[k])); } PRLEVEL(PR, ("\n")); #endif @@ -1351,41 +1351,41 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, PRLEVEL(PR, ("Analyze: Sup and Slp in the after cumsum\n")); if (cs1 > 0) { - PRLEVEL(PR, ("(%ld) Sup =", sunz)); + PRLEVEL(PR, ("(" LD ") Sup =", sunz)); for (int64_t k = 0; k <= cs1; k++) { - PRLEVEL(PR, ("%ld ", Sup[k])); - PRLEVEL(PR + 2, ("c%ld ", cSup[k])); + PRLEVEL(PR, ("" LD " ", Sup[k])); + PRLEVEL(PR + 2, ("c" LD " ", cSup[k])); if (Sup[k] != cSup[k]) - PRLEVEL(PR, ("Sup[%ld] =%ld, cSup=%ld", k, Sup[k], cSup[k])); + PRLEVEL(PR, ("Sup[" LD "] =" LD ", cSup=" LD "", k, Sup[k], cSup[k])); ASSERT(Sup[k] == cSup[k]); } PRLEVEL(PR, ("\n")); } if (rs1 > 0) { - PRLEVEL(PR, ("(%ld) Slp =", slnz)); + PRLEVEL(PR, ("(" LD ") Slp =", slnz)); for (int64_t k = 0; k <= rs1; k++) { - PRLEVEL(PR, ("%ld ", Slp[k])); - PRLEVEL(PR + 2, ("o%ld ", cSlp[k])); + PRLEVEL(PR, ("" LD " ", Slp[k])); + PRLEVEL(PR + 2, ("o" LD " ", cSlp[k])); if (Slp[k] != cSlp[k]) PRLEVEL(PR, - ("\nSup[%ld] =%ld, cSup=%ld\n", k, Slp[k], cSlp[k])); + ("\nSup[" LD "] =" LD ", cSup=" LD "\n", k, Slp[k], cSlp[k])); ASSERT(Slp[k] == cSlp[k]); } PRLEVEL(PR, ("\n")); } PR = 1; PRLEVEL(PR, ("After cumsum Sp =\n")); - for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("%ld ", Sp[i - n1])); + for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("" LD " ", Sp[i - n1])); PRLEVEL(PR, ("\n")); #endif #ifndef NDEBUG PR = 1; PRLEVEL(PR, ("After Stair case Pinv =\n")); - for (int64_t i = 0; i < m; i++) PRLEVEL(PR, ("%ld ", Pinv[i])); + for (int64_t i = 0; i < m; i++) PRLEVEL(PR, ("" LD " ", Pinv[i])); PRLEVEL(PR, ("\n")); #endif // PofA @@ -1395,7 +1395,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, #ifndef NDEBUG PR = 1; PRLEVEL(PR, ("Before Sj Sp =\n")); - for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("%ld ", cSp[i - n1])); + for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("" LD " ", cSp[i - n1])); PRLEVEL(PR, ("\n")); #endif @@ -1433,12 +1433,12 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, for (int64_t newcol = 0; newcol < n1; newcol++) { // The columns that are just in singleton int64_t oldcol = Qinit[newcol]; - PRLEVEL(PR, ("newcol = %ld oldcol=%ld\n", newcol, oldcol)); + PRLEVEL(PR, ("newcol = " LD " oldcol=" LD "\n", newcol, oldcol)); for (int64_t p = Ap[oldcol]; p < Ap[oldcol + 1]; p++) { int64_t oldrow = Ai[p]; int64_t newrow = Pinv[oldrow]; - PRLEVEL(PR, ("newrow=%ld oldrow=%ld\n", newrow, oldrow)); + PRLEVEL(PR, ("newrow=" LD " oldrow=" LD "\n", newrow, oldrow)); if (newrow < cs1) { // inside U singletons CSR PRLEVEL(PR, ("Inside U singletons\n")); @@ -1482,7 +1482,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, } else { // inside the U singletons - PRLEVEL(PR, ("Usingleton rest newcol = %ld newrow=%ld\n", + PRLEVEL(PR, ("Usingleton rest newcol = " LD " newrow=" LD "\n", newcol, newrow)); ASSERT(newrow != newcol); // not a diagonal entry Suj[++cSup[newrow]] = newcol; @@ -1495,48 +1495,48 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, PRLEVEL(PR, ("Sup and Slp after making \n")); if (cs1 > 0) { - PRLEVEL(PR, ("U singltons(CSR) (nnz=%ld) Sup =", sunz)); - for (int64_t k = 0; k <= cs1; k++) PRLEVEL(PR, ("%ld ", Sup[k])); + PRLEVEL(PR, ("U singltons(CSR) (nnz=" LD ") Sup =", sunz)); + for (int64_t k = 0; k <= cs1; k++) PRLEVEL(PR, ("" LD " ", Sup[k])); PRLEVEL(PR, ("\n")); for (int64_t newrow = 0; newrow < cs1; newrow++) { - PRLEVEL(PR, ("row = %ld\n", newrow)); + PRLEVEL(PR, ("row = " LD "\n", newrow)); for (int64_t p = Sup[newrow]; p < Sup[newrow + 1]; p++) { - PRLEVEL(PR, (" (%ld)", Suj[p])); + PRLEVEL(PR, (" (" LD ")", Suj[p])); } PRLEVEL(PR, ("\n")); } } if (rs1 > 0) { - PRLEVEL(PR, ("L singleons(CSC) (nnz=%ld) Slp =", slnz)); - for (int64_t k = cs1; k <= n1; k++) PRLEVEL(PR, ("%ld ", Slp[k - cs1])); + PRLEVEL(PR, ("L singleons(CSC) (nnz=" LD ") Slp =", slnz)); + for (int64_t k = cs1; k <= n1; k++) PRLEVEL(PR, ("" LD " ", Slp[k - cs1])); PRLEVEL(PR, ("\n")); for (int64_t newcol = cs1; newcol < n1; newcol++) { - PRLEVEL(PR, ("col = %ld\n", newcol)); + PRLEVEL(PR, ("col = " LD "\n", newcol)); for (int64_t p = Slp[newcol - cs1]; p < Slp[newcol - cs1 + 1]; p++) { - PRLEVEL(PR, (" (%ld)", Sli[p])); + PRLEVEL(PR, (" (" LD ")", Sli[p])); } PRLEVEL(PR, ("\n")); } } PR = 1; PRLEVEL(PR, ("Sp =\n")); - for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("%ld ", Sp[i - n1])); + for (int64_t i = n1; i <= m; i++) PRLEVEL(PR, ("" LD " ", Sp[i - n1])); PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("Sj =\n")); - for (int64_t k = 0; k < snz; k++) PRLEVEL(PR, ("%ld ", Sj[k])); + for (int64_t k = 0; k < snz; k++) PRLEVEL(PR, ("" LD " ", Sj[k])); PRLEVEL(PR, ("\n")); PR = 1; for (int64_t i = 0; i < m - n1; i++) { - PRLEVEL(PR, (" i=%ld cSp=%ld Sp=%ld\n", i, cSp[i], Sp[i + 1])); + PRLEVEL(PR, (" i=" LD " cSp=" LD " Sp=" LD "\n", i, cSp[i], Sp[i + 1])); ASSERT(cSp[i] == Sp[i + 1]); } #endif @@ -1552,11 +1552,11 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, int64_t col1 = Super[f]; int64_t col2 = Super[f + 1]; int64_t fp = Super[f + 1] - Super[f]; - PRLEVEL(PR, ("%% Front=%ld Parent=%ld\n", f, Parent[f])); - PRLEVEL(PR, ("%% %ld...%ld npivotal=%ld\n", col1, col2, fp)); - PRLEVEL(PR, ("%% list of %ld children: ", Childp[f + 1] - Childp[f])); + PRLEVEL(PR, ("%% Front=" LD " Parent=" LD "\n", f, Parent[f])); + PRLEVEL(PR, ("%% " LD "..." LD " npivotal=" LD "\n", col1, col2, fp)); + PRLEVEL(PR, ("%% list of " LD " children: ", Childp[f + 1] - Childp[f])); for (int64_t i = Childp[f]; i <= Childp[f + 1] - 1; i++) - PRLEVEL(PR, ("%ld ", Child[i])); + PRLEVEL(PR, ("" LD " ", Child[i])); PRLEVEL(PR, ("\n")); } PR = 1; @@ -1610,8 +1610,8 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, for (int64_t f = 0; f < nf; f++) { #ifndef NDEBUG - PRLEVEL(PR, ("%% Front %ld\n", f)); - PRLEVEL(PR, ("%% pivot columns [ %ld to %ld ] n: %ld \n", Super[f], + PRLEVEL(PR, ("%% Front " LD "\n", f)); + PRLEVEL(PR, ("%% pivot columns [ " LD " to " LD " ] n: " LD " \n", Super[f], Super[f + 1] - 1, ns)); #endif @@ -1625,11 +1625,11 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, for (int64_t i = Childp[f]; i <= Childp[f + 1] - 1; i++) { stree_flop_bound[f] += stree_flop_bound[Child[i]]; - PRLEVEL(PR, ("%% child=%ld fl=%lf ", Child[i], + PRLEVEL(PR, ("%% child=" LD " fl=%lf ", Child[i], front_flop_bound[Child[i]])); } PRLEVEL(PR, ("%% flops bound= %lf\n ", front_flop_bound[f])); - PRLEVEL(PR, ("%% %ld %ld %ld\n ", fp, fm, fn)); + PRLEVEL(PR, ("%% " LD " " LD " " LD "\n ", fp, fm, fn)); PRLEVEL(PR, ("%% stree bound= %lf\n ", stree_flop_bound[f])); ASSERT(Super[f + 1] <= ns); int64_t numRow = Sleft[Super[f + 1]] - Sleft[Super[f]]; @@ -1637,29 +1637,29 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, int64_t numoforiginalChild = 0; if (lastChildFlag) { // the current node is the parent - PRLEVEL(PR, ("%% Childs of %ld: ", f)); + PRLEVEL(PR, ("%% Childs of " LD ": ", f)); numoforiginalChild = Childp[f + 1] - Childp[f]; for (int64_t i = Childp[f]; i <= Childp[f + 1] - 1; i++) { - PRLEVEL(PR, ("%ld ", Child[i])); + PRLEVEL(PR, ("" LD " ", Child[i])); int64_t c = Child[i]; ASSERT(snM[c] < ms + nf + 1); aParent[snM[c]] = offset + numRow; - PRLEVEL(PR, ("%% aParent[%ld] =%ld\n", aParent[snM[c]], + PRLEVEL(PR, ("%% aParent[" LD "] =" LD "\n", aParent[snM[c]], offset + numRow)); ASSERT(childpointer < ms + nf + 1); aChild[childpointer++] = snM[c]; } } - PRLEVEL(1, ("%% numRow=%ld ", numRow)); - PRLEVEL(1, ("#offset=%ld\n", offset)); + PRLEVEL(1, ("%% numRow=" LD " ", numRow)); + PRLEVEL(1, ("#offset=" LD "\n", offset)); for (int64_t i = offset; i < offset + numRow; i++) { ASSERT(aChildp[i + 1] == -1); aChildp[i + 1] = aChildp[i]; - PRLEVEL(1, ("%% @i=%ld aCp[%ld]=%ld aCp[%ld]=%ld", i, i + 1, + PRLEVEL(1, ("%% @i=" LD " aCp[" LD "]=" LD " aCp[" LD "]=" LD "", i, i + 1, aChildp[i + 1], i, aChildp[i])); } @@ -1681,17 +1681,17 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, ASSERT(aChildp[offset] == -1); aChildp[offset] = aChildp[offset - 1] + numRow + numoforiginalChild; PRLEVEL( - 1, ("\n %% f=%ld numoforiginalChild=%ld\n", f, numoforiginalChild)); + 1, ("\n %% f=" LD " numoforiginalChild=" LD "\n", f, numoforiginalChild)); if (Parent[f] == f + 1) { // last child due to staircase - PRLEVEL(1, ("%% last Child =%ld\n", f)); + PRLEVEL(1, ("%% last Child =" LD "\n", f)); lastChildFlag = 1; } else lastChildFlag = 0; } - // PRLEVEL(1, ("%% root_count=%ld, num_roots=%ld\n ", root_count, + // PRLEVEL(1, ("%% root_count=" LD ", num_roots=" LD "\n ", root_count, // num_roots)); ASSERT(root_count == num_roots); // Initialize first descendent of the etree @@ -1700,7 +1700,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, { for (int64_t r = i; r != -1 && first[r] == -1; r = Parent[r]) { - PRLEVEL(PR, ("%% first of %ld is %ld\n", r, i)); + PRLEVEL(PR, ("%% first of " LD " is " LD "\n", r, i)); first[r] = i; } } @@ -1736,7 +1736,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, } } - PRLEVEL(1, ("%% ntasks = %ld\n", ntasks)); + PRLEVEL(1, ("%% ntasks = " LD "\n", ntasks)); Sym->ntasks = ntasks; if (nf > 0) { @@ -1766,7 +1766,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, { int64_t node = task_map[t + 1]; int64_t rep = Parent[node]; - PRLEVEL(1, ("t=%ld node=%ld rep =%ld\n", t, node, rep)); + PRLEVEL(1, ("t=" LD " node=" LD " rep =" LD "\n", t, node, rep)); if (rep == -1) { task_parent[t] = -1; @@ -1780,7 +1780,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, task_depth[t] = MAX(Depth[node], task_depth[t]); while (task_helper[rep] < 0) rep = Parent[rep]; PRLEVEL(1, - ("After a while t=%ld node=%ld rep =%ld\n", t, node, rep)); + ("After a while t=" LD " node=" LD " rep =" LD "\n", t, node, rep)); task_parent[t] = task_helper[rep]; } } @@ -1797,20 +1797,20 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, // while (ii < nf) //{ // int64_t chain_size = 0; - // PRLEVEL(1, ("ii = %ld\n", ii)); + // PRLEVEL(1, ("ii = " LD "\n", ii)); // while (Parent[ii] != -1 && ii < nf && // Childp[Parent[ii] + 1] - Childp[Parent[ii]] == 1) // { // chain_size++; // ii++; // } - // PRLEVEL(1, ("after ii = %ld\n", ii)); + // PRLEVEL(1, ("after ii = " LD "\n", ii)); // max_chain = MAX(chain_size, max_chain); - // PRLEVEL(1, ("max_chain = %ld\n", max_chain)); + // PRLEVEL(1, ("max_chain = " LD "\n", max_chain)); // ii++; //} // Sym->max_chain = max_chain; - // PRLEVEL(1, ("max_chain = %ld\n", max_chain)); + // PRLEVEL(1, ("max_chain = " LD "\n", max_chain)); #ifndef NDEBUG if (ntasks > 0) @@ -1818,27 +1818,27 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, PR = 1; PRLEVEL(PR, ("%% Task tree helper:\n")); for (int64_t i = 0; i < nf; i++) - PRLEVEL(PR, ("%ld)%ld ", i, task_helper[i])); - PRLEVEL(PR, ("\n%% tasknodes map (%ld):\n", ntasks)); - for (int64_t i = 0; i <= ntasks; i++) PRLEVEL(PR, ("%ld ", task_map[i])); + PRLEVEL(PR, ("" LD ")" LD " ", i, task_helper[i])); + PRLEVEL(PR, ("\n%% tasknodes map (" LD "):\n", ntasks)); + for (int64_t i = 0; i <= ntasks; i++) PRLEVEL(PR, ("" LD " ", task_map[i])); PR = -1; PRLEVEL(PR, ("%% tasktree :\n")); - for (int64_t i = 0; i < ntasks; i++) PRLEVEL(PR, ("%ld ", task_parent[i])); + for (int64_t i = 0; i < ntasks; i++) PRLEVEL(PR, ("" LD " ", task_parent[i])); PRLEVEL(PR, ("\n")); PR = 1; PRLEVEL(PR, ("\n%% task_num_child:\n")); for (int64_t i = 0; i < ntasks; i++) - PRLEVEL(PR, ("%ld ", task_num_child[i])); + PRLEVEL(PR, ("" LD " ", task_num_child[i])); PRLEVEL(PR, ("\n")); - PRLEVEL(PR, ("\n%% %ld tasks:\n", ntasks)); + PRLEVEL(PR, ("\n%% " LD " tasks:\n", ntasks)); for (int64_t t = 0; t < ntasks; t++) { - PRLEVEL(PR, ("%ld[%ld-%ld] ", t, task_map[t] + 1, task_map[t + 1])); + PRLEVEL(PR, ("" LD "[" LD "-" LD "] ", t, task_map[t] + 1, task_map[t + 1])); } PRLEVEL(PR, ("\n%% task depth:\n")); for (int64_t t = 0; t < ntasks; t++) { - PRLEVEL(PR, ("%ld ", task_depth[t])); + PRLEVEL(PR, ("" LD " ", task_depth[t])); } PRLEVEL(PR, ("\n")); } @@ -1848,11 +1848,11 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, for (int64_t f = 0; f < nf; f++) { ASSERT(snM[f] != -1); - PRLEVEL(PR, ("%ld (%ld) ", snM[f], Sleft[Super[f]])); + PRLEVEL(PR, ("" LD " (" LD ") ", snM[f], Sleft[Super[f]])); } if (nf > 0) { - PRLEVEL(PR, ("- (%ld) ", Sleft[Super[nf]])); + PRLEVEL(PR, ("- (" LD ") ", Sleft[Super[nf]])); PRLEVEL(PR, ("\n")); } @@ -1863,7 +1863,7 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, for (int64_t i = 0; i < ms; i++) { ASSERT(rM[i] != -1); - PRLEVEL(PR, ("%ld ", rM[i])); + PRLEVEL(PR, ("" LD " ", rM[i])); } PRLEVEL(PR, ("\n")); } @@ -1871,21 +1871,21 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, if (aParent) { PRLEVEL(PR, ("%% aParent: ")); - for (int64_t i = 0; i < ms + nf; i++) PRLEVEL(PR, ("%ld ", aParent[i])); + for (int64_t i = 0; i < ms + nf; i++) PRLEVEL(PR, ("" LD " ", aParent[i])); PRLEVEL(PR, ("%% \n")); } if (aChildp) { PRLEVEL(PR, ("%% aChildp: ")); - for (int64_t i = 0; i < ms + nf + 2; i++) PRLEVEL(PR, ("%ld ", aChildp[i])); + for (int64_t i = 0; i < ms + nf + 2; i++) PRLEVEL(PR, ("" LD " ", aChildp[i])); PRLEVEL(PR, ("\n")); } if (aChild) { PRLEVEL(PR, ("%% aChild: ")); - for (int64_t i = 0; i < ms + nf + 1; i++) PRLEVEL(PR, ("%ld ", aChild[i])); + for (int64_t i = 0; i < ms + nf + 1; i++) PRLEVEL(PR, ("" LD " ", aChild[i])); PRLEVEL(PR, ("\n")); } @@ -1895,9 +1895,9 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, for (int64_t i = 0; i < ms + nf; i++) { if (aChildp[i] == aChildp[i + 1]) continue; - PRLEVEL(PR, ("%% anode:%ld", i)); + PRLEVEL(PR, ("%% anode:" LD "", i)); for (int64_t c = aChildp[i]; c < aChildp[i + 1]; c++) - PRLEVEL(PR, (" %ld,", aChild[c])); + PRLEVEL(PR, (" " LD ",", aChild[c])); PRLEVEL(PR, ("\n")); } } @@ -1907,24 +1907,24 @@ ParU_Ret ParU_Analyze(cholmod_sparse *A, ParU_Symbolic **S_handle, { PRLEVEL(PR, ("%% first: ")); for (int64_t i = 0; i < nf + 1; i++) - PRLEVEL(PR, ("first[%ld]=%ld ", i, first[i])); + PRLEVEL(PR, ("first[" LD "]=" LD " ", i, first[i])); PRLEVEL(PR, ("\n")); } PR = 1; // PRLEVEL(PR, ("%%%% roots:\n")); - // for (int64_t k = 0; k < num_roots; k++) PRLEVEL(PR, (" %ld", roots[k])); + // for (int64_t k = 0; k < num_roots; k++) PRLEVEL(PR, (" " LD "", roots[k])); // PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("%%%% Depth:\n")); - for (int64_t k = 0; k < nf; k++) PRLEVEL(PR, (" %ld", Depth[k])); + for (int64_t k = 0; k < nf; k++) PRLEVEL(PR, (" " LD "", Depth[k])); PRLEVEL(PR, ("\n")); #endif // This prints the task tree; I keep it in comments to find it easily // printf ("%% tasktree :\n"); - // for (int64_t i = 0; i < ntasks; i++) printf("%ld ", task_parent[i]); + // for (int64_t i = 0; i < ntasks; i++) printf("" LD " ", task_parent[i]); // printf ("\n"); #ifndef NTIME diff --git a/ParU/Source/paru_assemble_row2U.cpp b/ParU/Source/paru_assemble_row2U.cpp index 47f15ae83..8d89055c8 100644 --- a/ParU/Source/paru_assemble_row2U.cpp +++ b/ParU/Source/paru_assemble_row2U.cpp @@ -55,12 +55,12 @@ void paru_assemble_row_2U(int64_t e, int64_t f, int64_t sR, int64_t dR, { // If still valid ncolsSeen--; PRLEVEL(1, - ("%% sM [%ld] =%2.5lf \n", mEl * j + sR, sM[mEl * j + sR])); - PRLEVEL(1, ("%% uPart [%ld] =%2.5lf \n", rj * fp + dR, + ("%% sM [" LD "] =%2.5lf \n", mEl * j + sR, sM[mEl * j + sR])); + PRLEVEL(1, ("%% uPart [" LD "] =%2.5lf \n", rj * fp + dR, uPart[rj * fp + dR])); //**//#pragma omp atomic uPart[rj * fp + dR] += sM[mEl * j + sR]; - PRLEVEL(1, ("%% uPart [%ld] =%2.5lf \n", rj * fp + dR, + PRLEVEL(1, ("%% uPart [" LD "] =%2.5lf \n", rj * fp + dR, uPart[rj * fp + dR])); if (ncolsSeen == 0) break; } diff --git a/ParU/Source/paru_bin_search.cpp b/ParU/Source/paru_bin_search.cpp index 59926c318..d2ccc63e5 100644 --- a/ParU/Source/paru_bin_search.cpp +++ b/ParU/Source/paru_bin_search.cpp @@ -22,19 +22,19 @@ int64_t paru_bin_srch(int64_t *srt_lst, int64_t l, int64_t r, int64_t num) // a simple binary search for when we know all the indices are available { DEBUGLEVEL(0); - PRLEVEL(1, ("%% BINSearch %ld,%ld for %ld\n", l, r, num)); + PRLEVEL(1, ("%% BINSearch " LD "," LD " for " LD "\n", l, r, num)); if (r >= l + LEN) { int64_t mid = l + (r - l) / 2; - PRLEVEL(1, ("%% mid is %ld\n", mid)); + PRLEVEL(1, ("%% mid is " LD "\n", mid)); if (srt_lst[mid] == num) return mid; if (srt_lst[mid] > num) { - PRLEVEL(1, ("%% 1 New %ld,%ld \n", l, mid - 1)); + PRLEVEL(1, ("%% 1 New " LD "," LD " \n", l, mid - 1)); return paru_bin_srch(srt_lst, l, mid - 1, num); } - PRLEVEL(1, ("%% 2 New %ld,%ld \n", mid + 1, r)); + PRLEVEL(1, ("%% 2 New " LD "," LD " \n", mid + 1, r)); return paru_bin_srch(srt_lst, mid + 1, r, num); } diff --git a/ParU/Source/paru_create_element.cpp b/ParU/Source/paru_create_element.cpp index 0d7e6554e..0cd0b2bf2 100644 --- a/ParU/Source/paru_create_element.cpp +++ b/ParU/Source/paru_create_element.cpp @@ -25,7 +25,7 @@ paru_element *paru_create_element(int64_t nrows, int64_t ncols) { DEBUGLEVEL(0); - PRLEVEL(1, ("%% creating %ldx%ld element ", nrows, ncols)); + PRLEVEL(1, ("%% creating " LD "x" LD " element ", nrows, ncols)); paru_element *curEl; size_t tot_size = sizeof(paru_element) + sizeof(int64_t) * (2 * (nrows + ncols)) + @@ -33,7 +33,7 @@ paru_element *paru_create_element(int64_t nrows, int64_t ncols) curEl = (paru_element *)paru_alloc(1, tot_size); if (curEl == NULL) return NULL; // do not do error checking - PRLEVEL(1, (" with size of %ld in %p\n", tot_size, curEl)); + PRLEVEL(1, (" with size of " LD " in %p\n", tot_size, curEl)); // Initializing current element curEl->nrowsleft = curEl->nrows = nrows; diff --git a/ParU/Source/paru_dgemm.cpp b/ParU/Source/paru_dgemm.cpp index 5fd64e623..b4629d3cc 100644 --- a/ParU/Source/paru_dgemm.cpp +++ b/ParU/Source/paru_dgemm.cpp @@ -22,9 +22,9 @@ int64_t paru_dgemm(int64_t f, double *pF, double *uPart, double *el, int64_t fp, int64_t rowCount, int64_t colCount, paru_work *Work, ParU_Numeric *Num) { DEBUGLEVEL(0); - PRLEVEL(1, ("%% rowCount =%ld ", rowCount)); - PRLEVEL(1, ("%% colCount =%ld ", colCount)); - PRLEVEL(1, ("%% fp =%ld\n", fp)); + PRLEVEL(1, ("%% rowCount =" LD " ", rowCount)); + PRLEVEL(1, ("%% colCount =" LD " ", colCount)); + PRLEVEL(1, ("%% fp =" LD "\n", fp)); int64_t mA = (int64_t)(rowCount - fp); int64_t nB = (int64_t)colCount; diff --git a/ParU/Source/paru_factorize.cpp b/ParU/Source/paru_factorize.cpp index 57103583b..07e922590 100644 --- a/ParU/Source/paru_factorize.cpp +++ b/ParU/Source/paru_factorize.cpp @@ -30,7 +30,7 @@ ParU_Ret paru_exec_tasks_seq(int64_t t, int64_t *task_num_child, paru_work *Work int64_t num_original_children = 0; if (daddy != -1) num_original_children = Sym->task_num_child[daddy]; - PRLEVEL(1, ("Seq: executing task %ld fronts %ld-%ld (%ld children)\n", t, + PRLEVEL(1, ("Seq: executing task " LD " fronts " LD "-" LD " (" LD " children)\n", t, task_map[t] + 1, task_map[t + 1], num_original_children)); ParU_Ret myInfo; #ifndef NTIME @@ -38,7 +38,7 @@ ParU_Ret paru_exec_tasks_seq(int64_t t, int64_t *task_num_child, paru_work *Work #endif for (int64_t f = task_map[t] + 1; f <= task_map[t + 1]; f++) { - PRLEVEL(2, ("Seq: calling %ld\n", f)); + PRLEVEL(2, ("Seq: calling " LD "\n", f)); myInfo = paru_front(f, Work, Num); if (myInfo != PARU_SUCCESS) { @@ -49,11 +49,11 @@ ParU_Ret paru_exec_tasks_seq(int64_t t, int64_t *task_num_child, paru_work *Work #ifndef NTIME double time = PARU_OPENMP_GET_WTIME; time -= start_time; - PRLEVEL(1, ("task time task %ld is %lf\n", t, time)); + PRLEVEL(1, ("task time task " LD " is %lf\n", t, time)); #endif #ifndef NDEBUG - if (daddy == -1) PRLEVEL(1, ("%% finished task root(%ld)\n", t)); + if (daddy == -1) PRLEVEL(1, ("%% finished task root(" LD ")\n", t)); #endif if (daddy != -1) // if it is not a root @@ -64,19 +64,19 @@ ParU_Ret paru_exec_tasks_seq(int64_t t, int64_t *task_num_child, paru_work *Work num_rem_children = task_num_child[daddy]; PRLEVEL(1, - ("%%Seq finished task %ld(%ld,%ld)Parent has %ld left\n", t, + ("%%Seq finished task " LD "(" LD "," LD ")Parent has " LD " left\n", t, task_map[t] + 1, task_map[t + 1], task_num_child[daddy])); if (num_rem_children == 0) { PRLEVEL( - 1, ("%%Seq task %ld executing its parent %ld\n", t, daddy)); + 1, ("%%Seq task " LD " executing its parent " LD "\n", t, daddy)); return myInfo = paru_exec_tasks_seq(daddy, task_num_child, Work, Num); } } else // I was the only spoiled kid in the family; { - PRLEVEL(1, ("%% Seq task %ld only child executing its parent %ld\n", + PRLEVEL(1, ("%% Seq task " LD " only child executing its parent " LD "\n", t, daddy)); return myInfo = paru_exec_tasks_seq(daddy, task_num_child, Work, Num); @@ -100,7 +100,7 @@ ParU_Ret paru_exec_tasks(int64_t t, int64_t *task_num_child, int64_t &chain_task int64_t num_original_children = 0; if (daddy != -1) num_original_children = Sym->task_num_child[daddy]; - PRLEVEL(1, ("executing task %ld fronts %ld-%ld (%ld children)\n", t, + PRLEVEL(1, ("executing task " LD " fronts " LD "-" LD " (" LD " children)\n", t, task_map[t] + 1, task_map[t + 1], num_original_children)); ParU_Ret myInfo; #ifndef NTIME @@ -118,11 +118,11 @@ ParU_Ret paru_exec_tasks(int64_t t, int64_t *task_num_child, int64_t &chain_task #ifndef NTIME double time = PARU_OPENMP_GET_WTIME; time -= start_time; - PRLEVEL(1, ("task time task %ld is %lf\n", t, time)); + PRLEVEL(1, ("task time task " LD " is %lf\n", t, time)); #endif #ifndef NDEBUG - if (daddy == -1) PRLEVEL(1, ("%% finished task root(%ld)\n", t)); + if (daddy == -1) PRLEVEL(1, ("%% finished task root(" LD ")\n", t)); #endif if (daddy != -1) // if it is not a root @@ -136,20 +136,20 @@ ParU_Ret paru_exec_tasks(int64_t t, int64_t *task_num_child, int64_t &chain_task } PRLEVEL(1, - ("%% finished task %ld(%ld,%ld) Parent has %ld left\n", t, + ("%% finished task " LD "(" LD "," LD ") Parent has " LD " left\n", t, task_map[t] + 1, task_map[t + 1], task_num_child[daddy])); if (num_rem_children == 0) { PRLEVEL(1, - ("%% task %ld executing its parent %ld\n", t, daddy)); + ("%% task " LD " executing its parent " LD "\n", t, daddy)); int64_t resq; #pragma omp atomic read resq = Work->resq; if (resq == 1) { chain_task = daddy; - PRLEVEL(2, ("%% CHAIN ALERT1: task %ld calling %ld" - " resq = %ld\n", + PRLEVEL(2, ("%% CHAIN ALERT1: task " LD " calling " LD "" + " resq = " LD "\n", t, daddy, resq)); } else @@ -161,7 +161,7 @@ ParU_Ret paru_exec_tasks(int64_t t, int64_t *task_num_child, int64_t &chain_task } else // I was the only spoiled kid in the family; { - PRLEVEL(1, ("%% task %ld only child executing its parent %ld\n", t, + PRLEVEL(1, ("%% task " LD " only child executing its parent " LD "\n", t, daddy)); int64_t resq; #pragma omp atomic read @@ -170,8 +170,8 @@ ParU_Ret paru_exec_tasks(int64_t t, int64_t *task_num_child, int64_t &chain_task if (resq == 1) { chain_task = daddy; - PRLEVEL(2, ("%% CHAIN ALERT1: task %ld calling %ld" - " resq = %ld\n", + PRLEVEL(2, ("%% CHAIN ALERT1: task " LD " calling " LD "" + " resq = " LD "\n", t, daddy, resq)); } else @@ -309,12 +309,12 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym, #ifndef NDEBUG double chainess = 2; - PRLEVEL(1, ("ntasks=%ld task_Q.size=%ld\n", ntasks, task_Q.size())); + PRLEVEL(1, ("ntasks=" LD " task_Q.size=" LD "\n", ntasks, task_Q.size())); if (ntasks > 0) { // chainess = (task_depth[task_Q[0]] + 1) / (double)nf; chainess = 1 - (task_Q.size() / (double)ntasks); - PRLEVEL(1, ("nf = %ld, deepest = %ld, chainess = %lf \n", nf, + PRLEVEL(1, ("nf = " LD ", deepest = " LD ", chainess = %lf \n", nf, task_depth[task_Q[0]], chainess)); } #pragma omp atomic write @@ -331,7 +331,7 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym, for (int64_t i = 0; i < (int64_t)task_Q.size(); i++) { int64_t t = task_Q[i]; - PRLEVEL(PR, ("%ld[%ld-%ld](%ld) ", t, task_map[t] + 1, task_map[t + 1], + PRLEVEL(PR, ("" LD "[" LD "-" LD "](" LD ") ", t, task_map[t] + 1, task_map[t + 1], task_depth[t])); } PRLEVEL(PR, ("\n")); @@ -345,9 +345,9 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym, { PRLEVEL(1, ("Parallel\n")); // chekcing user input - PRLEVEL(1, ("Control: max_th=%ld scale=%ld piv_toler=%lf " - "diag_toler=%lf trivial =%ld worthwhile_dgemm=%ld " - "worthwhile_trsm=%ld\n", + PRLEVEL(1, ("Control: max_th=" LD " scale=" LD " piv_toler=%lf " + "diag_toler=%lf trivial =" LD " worthwhile_dgemm=" LD " " + "worthwhile_trsm=" LD "\n", Control->paru_max_threads, Control->scale, Control->piv_toler, Control->diag_toler, Control->trivial, Control->worthwhile_dgemm, Control->worthwhile_trsm)); @@ -366,13 +366,13 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym, int64_t chain_task = -1; int64_t start = 0; PRLEVEL( - 1, ("%% size=%ld, steps =%ld, stages =%ld\n", size, steps, stages)); + 1, ("%% size=" LD ", steps =" LD ", stages =" LD "\n", size, steps, stages)); for (int64_t ii = 0; ii < stages; ii++) { if (start >= size) break; int64_t end = start + steps > size ? size : start + steps; - PRLEVEL(1, ("%% doing Queue tasks <%ld,%ld>\n", start, end)); + PRLEVEL(1, ("%% doing Queue tasks <" LD "," LD ">\n", start, end)); #pragma omp parallel proc_bind(spread) \ num_threads(Control->paru_max_threads) #pragma omp single nowait @@ -409,7 +409,7 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym, { #pragma omp atomic write Work->naft = 1; - PRLEVEL(1, ("Chain_taskd %ld has remained\n", chain_task)); + PRLEVEL(1, ("Chain_taskd " LD " has remained\n", chain_task)); info = paru_exec_tasks_seq(chain_task, task_num_child, Work, Num); } if (info != PARU_SUCCESS) @@ -434,12 +434,12 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym, Work->naft = 1; for (int64_t i = 0; i < nf; i++) { - // if (i %1000 == 0) PRLEVEL(1, ("%% Wroking on front %ld\n", i)); + // if (i %1000 == 0) PRLEVEL(1, ("%% Wroking on front " LD "\n", i)); info = paru_front(i, Work, Num); if (info != PARU_SUCCESS) { - PRLEVEL(1, ("%% A problem happend in %ld\n", i)); + PRLEVEL(1, ("%% A problem happend in " LD "\n", i)); paru_free_work(Sym, Work); // free the work DS ParU_Freenum(Num_handle, Control); return info; @@ -540,7 +540,7 @@ ParU_Ret ParU_Factorize(cholmod_sparse *A, ParU_Symbolic *Sym, } } - PRLEVEL(1, ("max_rc=%ld max_cc=%ld\n", max_rc, max_cc)); + PRLEVEL(1, ("max_rc=" LD " max_cc=" LD "\n", max_rc, max_cc)); PRLEVEL(1, ("max_udiag=%e min_udiag=%e rcond=%e\n", max_udiag, min_udiag, min_udiag / max_udiag)); Num->max_row_count = max_rc; diff --git a/ParU/Source/paru_finalize_perm.cpp b/ParU/Source/paru_finalize_perm.cpp index ec96bb9b3..528b645e0 100644 --- a/ParU/Source/paru_finalize_perm.cpp +++ b/ParU/Source/paru_finalize_perm.cpp @@ -37,7 +37,7 @@ ParU_Ret paru_finalize_perm(ParU_Symbolic *Sym, ParU_Numeric *Num) PRLEVEL(PR, ("%% Initial row permutaion is:\n%%")); for (int64_t k = 0; k < m; k++) { - PRLEVEL(PR, (" %ld, ", Pinit[k])); + PRLEVEL(PR, (" " LD ", ", Pinit[k])); } PRLEVEL(PR, (" \n")); #endif @@ -48,7 +48,7 @@ ParU_Ret paru_finalize_perm(ParU_Symbolic *Sym, ParU_Numeric *Num) for (int64_t k = 0; k < n1; k++) { // first singletons Pfin[ip++] = Pinit[k]; - PRLEVEL(PR, ("(%ld)%ld ", ip - 1, Pfin[ip - 1])); + PRLEVEL(PR, ("(" LD ")" LD " ", ip - 1, Pfin[ip - 1])); } PRLEVEL(PR, ("\n")); @@ -66,7 +66,7 @@ ParU_Ret paru_finalize_perm(ParU_Symbolic *Sym, ParU_Numeric *Num) // P[k] = i Ps[frowList[k]] = ip - n1; Pfin[ip++] = Pinit[frowList[k] + n1]; - PRLEVEL(PR, ("(%ld)%ld\n ", ip - 1, Pfin[ip - 1])); + PRLEVEL(PR, ("(" LD ")" LD "\n ", ip - 1, Pfin[ip - 1])); } } PRLEVEL(PR, ("\n")); @@ -76,12 +76,12 @@ ParU_Ret paru_finalize_perm(ParU_Symbolic *Sym, ParU_Numeric *Num) PRLEVEL(PR, ("%% Final Ps:\n%%")); for (int64_t k = 0; k < m - n1; k++) { - PRLEVEL(PR, (" %ld, ", Ps[k])); + PRLEVEL(PR, (" " LD ", ", Ps[k])); } PRLEVEL(PR, (" \n")); PR = 1; - PRLEVEL(PR, ("%% n1=%ld Final row permutaion is:\n%%", n1)); - for (int64_t k = 0; k < MIN(77, m); k++) PRLEVEL(PR, ("%ld ", Pfin[k])); + PRLEVEL(PR, ("%% n1=" LD " Final row permutaion is:\n%%", n1)); + for (int64_t k = 0; k < MIN(77, m); k++) PRLEVEL(PR, ("" LD " ", Pfin[k])); PRLEVEL(PR, (" \n")); #endif return PARU_SUCCESS; diff --git a/ParU/Source/paru_front.cpp b/ParU/Source/paru_front.cpp index 4c499f7f2..2d44f83c3 100644 --- a/ParU/Source/paru_front.cpp +++ b/ParU/Source/paru_front.cpp @@ -35,7 +35,8 @@ ParU_Ret paru_front(int64_t f, // front need to be assembled /* ---------------------------------------------------------------------- */ PRLEVEL(-2, ("%%~~~~~~~ Assemble Front " LD " start ~~%.0lf~~~~~~~(%d)\n", f, - Sym->stree_flop_bound[f], omp_get_thread_num())); + Sym->stree_flop_bound[f], PARU_OPENMP_GET_THREAD_ID)); + /* pivotal columns Super [f] ... Super [f+1]-1 */ int64_t col1 = Super[f]; /* fornt F has columns col1:col2-1 */ diff --git a/ParU/Source/paru_fs_factorize.cpp b/ParU/Source/paru_fs_factorize.cpp index b9000f059..8725c5c25 100644 --- a/ParU/Source/paru_fs_factorize.cpp +++ b/ParU/Source/paru_fs_factorize.cpp @@ -27,7 +27,7 @@ void paru_swap_rows(double *F, int64_t *frowList, int64_t m, int64_t n, int64_t // naft = Num->naft; // const int64_t max_threads = Control->paru_max_threads; // if ( (naft == 1) && (n > 1024) ) - // printf ("naft=%ld, max_threads=%ld num_tasks=%ld n =%ld \n", + // printf ("naft=" LD ", max_threads=" LD " num_tasks=" LD " n =" LD " \n", // naft, max_threads, max_threads/(naft), n); // pragma omp parallel if ( (naft == 1) && (n > 1024) ) // pragma omp single @@ -46,7 +46,7 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane // https://github.com/xianyi/OpenBLAS/blob/develop/reference/dgetf2f.f DEBUGLEVEL(0); PARU_DEFINE_PRLEVEL; - PRLEVEL(1, ("%% Inside panel factorization %ld \n", panel_num)); + PRLEVEL(1, ("%% Inside panel factorization " LD " \n", panel_num)); int64_t *row_degree_bound = Work->row_degree_bound; ParU_Control *Control = Num->Control; @@ -56,8 +56,8 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane // last panel might be smaller int64_t j2 = (j1 + panel_width < n) ? j1 + panel_width : n; - PRLEVEL(1, ("%% j1= %ld j2 =%ld \n", j1, j2)); - PRLEVEL(1, ("%% row_end= %ld\n", row_end)); + PRLEVEL(1, ("%% j1= " LD " j2 =" LD " \n", j1, j2)); + PRLEVEL(1, ("%% row_end= " LD "\n", row_end)); // ASSERT(row_end >= j2); @@ -71,7 +71,7 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane PRLEVEL(PR, ("%% This Panel:\n")); for (int64_t r = j1; r < row_end; r++) { - PRLEVEL(PR, ("%% %ld\t", frowList[r])); + PRLEVEL(PR, ("%% " LD "\t", frowList[r])); for (int64_t c = j1; c < j2; c++) PRLEVEL(PR, (" %2.5lf\t", F[c * m + r])); PRLEVEL(PR, ("\n")); } @@ -88,7 +88,7 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane // for fat fronts if (j >= row_end) break; - PRLEVEL(1, ("%% j = %ld\n", j)); + PRLEVEL(1, ("%% j = " LD "\n", j)); // Initializing maximum element in the column int64_t row_max = j; @@ -97,20 +97,20 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane #ifndef NDEBUG int64_t row_deg_max = row_degree_bound[frowList[row_max]]; - PRLEVEL(1, ("%% before search max value= %2.4lf row_deg = %ld\n", + PRLEVEL(1, ("%% before search max value= %2.4lf row_deg = " LD "\n", maxval, row_deg_max)); #endif int64_t row_diag = (Diag_map) ? Diag_map[col1 + j + n1] - n1 : -1; double diag_val = maxval; // initialization int64_t diag_found = frowList[j] == row_diag ? j : -1; - PRLEVEL(1, ("%%curCol=%ld row_diag=%ld\n", j + col1 + n1, row_diag)); - PRLEVEL(1, ("%%##j=%ld value= %2.4lf\n", j, F[j * m + j])); + PRLEVEL(1, ("%%curCol=" LD " row_diag=" LD "\n", j + col1 + n1, row_diag)); + PRLEVEL(1, ("%%##j=" LD " value= %2.4lf\n", j, F[j * m + j])); for (int64_t i = j + 1; i < row_end; i++) { // find max - PRLEVEL(1, ("%%i=%ld value= %2.4lf", i, F[j * m + i])); - PRLEVEL(1, (" deg = %ld \n", row_degree_bound[frowList[i]])); + PRLEVEL(1, ("%%i=" LD " value= %2.4lf", i, F[j * m + i])); + PRLEVEL(1, (" deg = " LD " \n", row_degree_bound[frowList[i]])); if (fabs(maxval) < fabs(F[j * m + i])) { row_max = i; @@ -133,7 +133,7 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane if (maxval == 0) { - PRLEVEL(1, ("%% NO pivot found in %ld\n", n1 + col1 + j)); + PRLEVEL(1, ("%% NO pivot found in " LD "\n", n1 + col1 + j)); #pragma omp atomic write Num->res = PARU_SINGULAR; continue; @@ -152,14 +152,14 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane piv = diag_val; row_piv = diag_found; PRLEVEL(1, ("%% symmetric pivot piv value= %2.4lf" - " row_piv=%ld\n", + " row_piv=" LD "\n", piv, row_piv)); chose_diag = 1; } #ifndef NDEBUG else { - PRLEVEL(1, ("%% diag found but too small %ld" + PRLEVEL(1, ("%% diag found but too small " LD "" " maxval=%2.4lf diag_val=%e \n", row_piv, maxval, diag_val)); } @@ -168,7 +168,7 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane #ifndef NDEBUG else { - PRLEVEL(1, ("%% diag not found %ld\n", row_piv)); + PRLEVEL(1, ("%% diag not found " LD "\n", row_piv)); } #endif } @@ -207,13 +207,13 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane int64_t pivrow = frowList[row_piv]; // S row index paru_Diag_update(pivcol, pivrow, Work); PRLEVEL(1, ("%% symmetric matrix but the diag didn't picked for " - "row_piv=%ld\n", + "row_piv=" LD "\n", row_piv)); } - PRLEVEL(1, ("%% piv value= %2.4lf row_deg=%ld\n", piv, row_deg_sp)); + PRLEVEL(1, ("%% piv value= %2.4lf row_deg=" LD "\n", piv, row_deg_sp)); PRLEVEL(1, ("%% piv value= %e \n", piv)); // swap rows - PRLEVEL(1, ("%% Swaping rows j=%ld, row_piv=%ld\n", j, row_piv)); + PRLEVEL(1, ("%% Swaping rows j=" LD ", row_piv=" LD "\n", j, row_piv)); paru_swap_rows(F, frowList, m, n, j, row_piv, Num); #ifndef NDEBUG // Printing the pivotal front @@ -223,7 +223,7 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane PRLEVEL(PR, (" \n")); for (int64_t r = 0; r < row_end; r++) { - PRLEVEL(PR, ("%% %ld\t", frowList[r])); + PRLEVEL(PR, ("%% " LD "\t", frowList[r])); for (int64_t c = 0; c < num_col_panel; c++) PRLEVEL(PR, (" %2.5lf\t", F[c * m + r])); PRLEVEL(PR, ("\n")); @@ -240,7 +240,7 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane #pragma omp simd for (int64_t i = j + 1; i < row_end; i++) { - // printf("%%i=%ld value= %2.4lf", i, F[j * m + i]); + // printf("%%i=" LD " value= %2.4lf", i, F[j * m + i]); F[j * m + i] /= piv; // printf(" -> %2.4lf\n", F[j * m + i]); } @@ -310,7 +310,7 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane // lda); cblas_dger(CblasColMajor, M, N, alpha, X, Incx, Y, // Incy, A, lda); #ifdef COUNT_FLOPS - // printf("dger adding to flop count %ld\n", M*N*2); + // printf("dger adding to flop count " LD "\n", M*N*2); #pragma omp atomic update Num->flp_cnt_dger += (double)2 * M * N; #ifndef NDEBUG @@ -325,7 +325,7 @@ int64_t paru_panel_factorize(int64_t f, int64_t m, int64_t n, const int64_t pane PRLEVEL(PR, ("%% After dger\n")); for (int64_t r = j; r < row_end; r++) { - PRLEVEL(PR, ("%% %ld\t", frowList[r])); + PRLEVEL(PR, ("%% " LD "\t", frowList[r])); for (int64_t c = j; c < j2; c++) PRLEVEL(PR, (" %2.5lf\t", F[c * m + r])); PRLEVEL(PR, ("\n")); @@ -362,11 +362,11 @@ ParU_Ret paru_factorize_full_summed(int64_t f, int64_t start_fac, { #ifndef NDEBUG // Printing the pivotal front int64_t *frowList = Num->frowList[f]; - PRLEVEL(PR, ("%%Pivotal Front Before %ld\n", panel_num)); + PRLEVEL(PR, ("%%Pivotal Front Before " LD "\n", panel_num)); for (int64_t r = 0; r < rowCount; r++) { - PRLEVEL(PR, ("%% %ld\t", frowList[r])); + PRLEVEL(PR, ("%% " LD "\t", frowList[r])); for (int64_t c = 0; c < fp; c++) { PRLEVEL(PR, (" %2.5lf\t", F[c * rowCount + r])); @@ -440,11 +440,11 @@ ParU_Ret paru_factorize_full_summed(int64_t f, int64_t start_fac, int64_t PR = 1; PRLEVEL(PR, ("%% M = " LD " N = " LD " alpha = %f \n", M, N, alpha)); PRLEVEL(PR, ("%% lda = " LD " ldb = " LD "\n", lda, ldb)); - PRLEVEL(PR, ("%% Pivotal Front Before Trsm: %ld x %ld\n", fp, + PRLEVEL(PR, ("%% Pivotal Front Before Trsm: " LD " x " LD "\n", fp, rowCount)); for (int64_t r = 0; r < rowCount; r++) { - PRLEVEL(PR, ("%% %ld\t", frowList[r])); + PRLEVEL(PR, ("%% " LD "\t", frowList[r])); for (int64_t c = 0; c < fp; c++) PRLEVEL(PR, (" %2.5lf\t", F[c * rowCount + r])); PRLEVEL(PR, ("\n")); @@ -455,11 +455,11 @@ ParU_Ret paru_factorize_full_summed(int64_t f, int64_t start_fac, paru_tasked_trsm(f, M, N, alpha, A, lda, B, ldb, Work, Num); if (!blas_ok) return (PARU_TOO_LARGE); #ifndef NDEBUG - PRLEVEL(PR, ("%% Pivotal Front After Trsm: %ld x %ld\n %%", fp, + PRLEVEL(PR, ("%% Pivotal Front After Trsm: " LD " x " LD "\n %%", fp, rowCount)); for (int64_t r = 0; r < rowCount; r++) { - PRLEVEL(PR, ("%% %ld\t", frowList[r])); + PRLEVEL(PR, ("%% " LD "\t", frowList[r])); for (int64_t c = 0; c < fp; c++) PRLEVEL(PR, (" %2.5lf\t", F[c * rowCount + r])); PRLEVEL(PR, ("\n")); @@ -516,7 +516,7 @@ ParU_Ret paru_factorize_full_summed(int64_t f, int64_t start_fac, PRLEVEL(PR, ("%% DGEMM ")); PRLEVEL(PR, ("%% M = " LD " K = " LD " N = " LD " \n", M, K, N)); PRLEVEL(PR, ("%% lda = " LD " ldb = " LD "\n", lda, ldb)); - PRLEVEL(PR, ("%% j2 =%ld j1=%ld\n", j2, j1)); + PRLEVEL(PR, ("%% j2 =" LD " j1=" LD "\n", j2, j1)); PRLEVEL(PR, ("\n %%")); #endif blas_ok = paru_tasked_dgemm(f, M, N, K, A, lda, B, ldb, 1, C, ldc, @@ -525,7 +525,7 @@ ParU_Ret paru_factorize_full_summed(int64_t f, int64_t start_fac, // printf (" " LD " " LD " " LD " ",M ,N, K); // printf (" " LD " " LD " " LD "\n ",lda ,ldb, ldc); #ifdef COUNT_FLOPS - // printf("dgemm adding to flop count %ld\n", M*N*2); + // printf("dgemm adding to flop count " LD "\n", M*N*2); //#pragma omp atomic // Num->flp_cnt_real_dgemm += (double)2 * M * N * K; #ifndef NDEBUG @@ -538,11 +538,11 @@ ParU_Ret paru_factorize_full_summed(int64_t f, int64_t start_fac, #ifndef NDEBUG if (j2 < fp) { - PRLEVEL(PR, ("%% Pivotal Front After Dgemm: %ld x %ld\n %%", fp, + PRLEVEL(PR, ("%% Pivotal Front After Dgemm: " LD " x " LD "\n %%", fp, rowCount)); for (int64_t r = 0; r < rowCount; r++) { - PRLEVEL(PR, ("%% %ld\t", frowList[r])); + PRLEVEL(PR, ("%% " LD "\t", frowList[r])); for (int64_t c = 0; c < fp; c++) PRLEVEL(PR, (" %2.5lf\t", F[c * rowCount + r])); PRLEVEL(PR, ("\n")); diff --git a/ParU/Source/paru_full_summed.cpp b/ParU/Source/paru_full_summed.cpp index 935aae2ed..39c8e7252 100644 --- a/ParU/Source/paru_full_summed.cpp +++ b/ParU/Source/paru_full_summed.cpp @@ -43,13 +43,13 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) #ifndef NDEBUG int64_t *snM = Sym->super2atree; int64_t eli = snM[f]; - PRLEVEL(PR, ("%% Fully summing %ld in %ld(%ld)\n", e, f, eli)); + PRLEVEL(PR, ("%% Fully summing " LD " in " LD "(" LD ")\n", e, f, eli)); #endif int64_t *Super = Sym->Super; int64_t col1 = Super[f]; /* fornt F has columns col1:col2-1 */ int64_t col2 = Super[f + 1]; - PRLEVEL(PR, ("%% col1=%ld, col2=%ld\n", col1, col2)); + PRLEVEL(PR, ("%% col1=" LD ", col2=" LD "\n", col1, col2)); paru_element **elementList = Work->elementList; @@ -76,7 +76,7 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) #ifndef NDEBUG // print the element which is going to be assembled from PR = 2; - PRLEVEL(PR, ("%% ASSEMBL element= %ld mEl =%ld ", e, mEl)); + PRLEVEL(PR, ("%% ASSEMBL element= " LD " mEl =" LD " ", e, mEl)); if (PR <= 0) paru_print_element(e, Work, Num); #endif @@ -92,7 +92,7 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) int64_t fcolInd = el_colIndex[el->lac] - col1; #ifndef NDEBUG int64_t colInd = el_colIndex[el->lac]; - PRLEVEL(1, ("%% colInd =%ld \n", fcolInd)); + PRLEVEL(1, ("%% colInd =" LD " \n", fcolInd)); ASSERT(colInd >= 0); #endif double *dC = pivotalFront + fcolInd * rowCount; @@ -100,15 +100,15 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) for (int64_t i = 0; i < mEl; i++) { int64_t rowInd = el_rowIndex[i]; - PRLEVEL(1, ("%% rowInd =%ld \n", rowInd)); + PRLEVEL(1, ("%% rowInd =" LD " \n", rowInd)); if (rowInd >= 0 && rowRelIndex[i] != -1) { // active and do not contain zero in pivot int64_t ri = rowRelIndex[i]; - PRLEVEL(1, ("%% ri = %ld \n", ri)); - PRLEVEL(1, ("%% sC [%ld] =%2.5lf \n", i, sC[i])); - PRLEVEL(1, ("%% dC [%ld] =%2.5lf \n", ri, dC[ri])); + PRLEVEL(1, ("%% ri = " LD " \n", ri)); + PRLEVEL(1, ("%% sC [" LD "] =%2.5lf \n", i, sC[i])); + PRLEVEL(1, ("%% dC [" LD "] =%2.5lf \n", ri, dC[ri])); dC[ri] += sC[i]; - PRLEVEL(1, ("%% dC [%ld] =%2.5lf \n", i, dC[ri])); + PRLEVEL(1, ("%% dC [" LD "] =%2.5lf \n", i, dC[ri])); el_colIndex[el->lac] = flip(el_colIndex[el->lac]); if (--nrows2bSeen == 0) break; } @@ -127,7 +127,7 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) for (int64_t i = 0; i < mEl; i++) { int64_t rowInd = el_rowIndex[i]; - PRLEVEL(1, ("%% rowInd =%ld \n", rowInd)); + PRLEVEL(1, ("%% rowInd =" LD " \n", rowInd)); if (rowInd >= 0 && rowRelIndex[i] != -1) { tempRow[ii++] = i; @@ -139,7 +139,7 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) PR = 1; PRLEVEL(PR, ("%% list of the rows to be assembled:\n%%")); for (int64_t i = 0; i < nrows2assembl; i++) - PRLEVEL(PR, ("%ld ", el_rowIndex[tempRow[i]])); + PRLEVEL(PR, ("" LD " ", el_rowIndex[tempRow[i]])); PRLEVEL(PR, ("%% \n")); #endif // note: parallelism slows this down @@ -149,10 +149,10 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) //#pragma omp taskgroup for (; j < nEl; j++) { // j already defined out of this scope while it is needed - PRLEVEL(1, ("%% j =%ld \n", j)); + PRLEVEL(1, ("%% j =" LD " \n", j)); double *sC = el_Num + mEl * j; // source column pointer int64_t colInd = el_colIndex[j]; - PRLEVEL(1, ("%% colInd =%ld \n", colInd)); + PRLEVEL(1, ("%% colInd =" LD " \n", colInd)); if (colInd >= col2) break; if (colInd < 0) continue; @@ -170,11 +170,11 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) // that are not in zero pivots ASSERT(el_rowIndex[i] >= 0); // and also still alive - PRLEVEL(1, ("%% ri = %ld \n", ri)); - PRLEVEL(1, ("%% sC [%ld] =%2.5lf \n", i, sC[i])); - PRLEVEL(1, ("%% dC [%ld] =%2.5lf \n", ri, dC[ri])); + PRLEVEL(1, ("%% ri = " LD " \n", ri)); + PRLEVEL(1, ("%% sC [" LD "] =%2.5lf \n", i, sC[i])); + PRLEVEL(1, ("%% dC [" LD "] =%2.5lf \n", ri, dC[ri])); dC[ri] += sC[i]; - PRLEVEL(1, ("%% dC [%ld] =%2.5lf \n", i, dC[ri])); + PRLEVEL(1, ("%% dC [" LD "] =%2.5lf \n", i, dC[ri])); } el_colIndex[j] = flip(el_colIndex[j]); @@ -185,7 +185,7 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) if (el->ncolsleft == 0) { // free el - PRLEVEL(PR, ("%% element %ld is freed after pivotal assembly\n", e)); + PRLEVEL(PR, ("%% element " LD " is freed after pivotal assembly\n", e)); paru_free_el(e, elementList); } @@ -194,26 +194,26 @@ void paru_full_summed(int64_t e, int64_t f, paru_work *Work, ParU_Numeric *Num) el->lac = j; int64_t *lacList = Work->lacList; lacList[e] = lac_el(elementList, e); - PRLEVEL(1, ("%%e = %ld, el->lac= %ld ", e, el->lac)); - PRLEVEL(1, ("el_colIndex[%ld]=%ld :\n", el->lac, el_colIndex[el->lac])); + PRLEVEL(1, ("%%e = " LD ", el->lac= " LD " ", e, el->lac)); + PRLEVEL(1, ("el_colIndex[" LD "]=" LD " :\n", el->lac, el_colIndex[el->lac])); ASSERT(j < nEl); } #ifndef NDEBUG // print the element which has been assembled from PR = 1; - PRLEVEL(PR, ("%% ASSEMBLED element= %ld mEl =%ld ", e, mEl)); + PRLEVEL(PR, ("%% ASSEMBLED element= " LD " mEl =" LD " ", e, mEl)); if (PR <= 0) paru_print_element(e, Work, Num); // Printing the pivotal front PR = 2; - PRLEVEL(PR, ("%% After Assemble element %ld\n", e)); + PRLEVEL(PR, ("%% After Assemble element " LD "\n", e)); PRLEVEL(PR, ("%% x = \t")); - for (int64_t c = col1; c < col2; c++) PRLEVEL(PR, ("%ld\t\t", c)); + for (int64_t c = col1; c < col2; c++) PRLEVEL(PR, ("" LD "\t\t", c)); PRLEVEL(PR, (" ;\n")); int64_t *frowList = Num->frowList[f]; for (int64_t r = 0; r < rowCount; r++) { - PRLEVEL(PR, ("%% %ld\t", frowList[r])); + PRLEVEL(PR, ("%% " LD "\t", frowList[r])); for (int64_t c = col1; c < col2; c++) PRLEVEL(PR, (" %2.5lf\t", pivotalFront[(c - col1) * rowCount + r])); PRLEVEL(PR, ("\n")); diff --git a/ParU/Source/paru_hash.cpp b/ParU/Source/paru_hash.cpp index 3db8e8f76..5f5c8ced5 100644 --- a/ParU/Source/paru_hash.cpp +++ b/ParU/Source/paru_hash.cpp @@ -27,10 +27,10 @@ void paru_insert_hash(int64_t key, int64_t value, std::vector &colHash) PARU_DEFINE_PRLEVEL; #ifndef NDEBUG - PRLEVEL(PR, ("%% Insert hash key=%ld value=%ld ", key, value)); - PRLEVEL(PR, ("size=%ld \n", colHash.size())); + PRLEVEL(PR, ("%% Insert hash key=" LD " value=" LD " ", key, value)); + PRLEVEL(PR, ("size=" LD " \n", colHash.size())); PRLEVEL(PR, ("%% before insertion")); - for (auto i : colHash) PRLEVEL(PR, (" %ld ", i)); + for (auto i : colHash) PRLEVEL(PR, (" " LD " ", i)); PRLEVEL(PR, ("\n")); #endif @@ -42,7 +42,7 @@ void paru_insert_hash(int64_t key, int64_t value, std::vector &colHash) while (colHash[index] != -1) { // finding an empty spot index = (index + 1) & hash_bits; - PRLEVEL(PR, ("index =%ld colHash=%ld\n", index, colHash[index])); + PRLEVEL(PR, ("index =" LD " colHash=" LD "\n", index, colHash[index])); loop_cnt++; ASSERT(loop_cnt < hash_bits); } @@ -52,7 +52,7 @@ void paru_insert_hash(int64_t key, int64_t value, std::vector &colHash) PR = 1; PRLEVEL(PR, ("%% hash_bits == %lx ", hash_bits)); PRLEVEL(PR, ("%%")); - for (auto i : colHash) PRLEVEL(PR, (" %ld ", i)); + for (auto i : colHash) PRLEVEL(PR, (" " LD " ", i)); PRLEVEL(PR, ("\n")); #endif } @@ -62,12 +62,12 @@ int64_t paru_find_hash(int64_t key, std::vector &colHash, int64_t *fcol DEBUGLEVEL(0); PARU_DEFINE_PRLEVEL; #ifndef NDEBUG - PRLEVEL(PR, ("%% find for hash key=%ld \n", key)); + PRLEVEL(PR, ("%% find for hash key=" LD " \n", key)); #endif // lookup table if (colHash.back() == -1) { - PRLEVEL(PR, ("%% LOOKUP key =%ld colHash=%ld \n", key, colHash[key])); + PRLEVEL(PR, ("%% LOOKUP key =" LD " colHash=" LD " \n", key, colHash[key])); return colHash[key]; } @@ -79,7 +79,7 @@ int64_t paru_find_hash(int64_t key, std::vector &colHash, int64_t *fcol while (value != -1 && fcolList[value] != key) { index = (index + 1) & hash_bits; - PRLEVEL(PR, ("%% index =%ld \n", index)); + PRLEVEL(PR, ("%% index =" LD " \n", index)); value = colHash[index]; if (loop_cnt++ > log2(hash_bits)) { // take a long time in the hash; @@ -93,11 +93,11 @@ int64_t paru_find_hash(int64_t key, std::vector &colHash, int64_t *fcol #ifndef NDEBUG PR = 1; PRLEVEL(PR, ("%%")); - for (auto i : colHash) PRLEVEL(PR, (" %ld ", i)); + for (auto i : colHash) PRLEVEL(PR, (" " LD " ", i)); PRLEVEL(PR, ("\n")); - PRLEVEL(PR, ("%% value is =%ld \n", value)); + PRLEVEL(PR, ("%% value is =" LD " \n", value)); int64_t bsRes = paru_bin_srch(fcolList, 0, size - 1, key); - PRLEVEL(PR, ("%% binSearch=%ld \n", bsRes)); + PRLEVEL(PR, ("%% binSearch=" LD " \n", bsRes)); #endif return value; } diff --git a/ParU/Source/paru_heap.cpp b/ParU/Source/paru_heap.cpp index 975c7d905..9588a17d5 100644 --- a/ParU/Source/paru_heap.cpp +++ b/ParU/Source/paru_heap.cpp @@ -66,11 +66,11 @@ ParU_Ret paru_make_heap(int64_t f, int64_t start_fac, int64_t *lacList = Work->lacList; auto greater = [&lacList](int64_t a, int64_t b) { return lacList[a] > lacList[b]; }; - PRLEVEL(PR, ("%% tot_size = %ld\n", tot_size)); - PRLEVEL(PR, ("%% biggest_Child_id = %ld ", biggest_Child_id)); - PRLEVEL(PR, ("%% biggest_Child_size = %ld\n", biggest_Child_size)); + PRLEVEL(PR, ("%% tot_size = " LD "\n", tot_size)); + PRLEVEL(PR, ("%% biggest_Child_id = " LD " ", biggest_Child_id)); + PRLEVEL(PR, ("%% biggest_Child_size = " LD "\n", biggest_Child_size)); int64_t size_of_rest = tot_size - biggest_Child_size + pivotal_elements.size(); - PRLEVEL(PR, ("%% the rest size = %ld\n", size_of_rest)); + PRLEVEL(PR, ("%% the rest size = " LD "\n", size_of_rest)); if (biggest_Child_id != -1) // There are still elements remained in the heaps @@ -117,17 +117,17 @@ ParU_Ret paru_make_heap(int64_t f, int64_t start_fac, ASSERT(el != NULL); #endif if (el == NULL) continue; - PRLEVEL(PR, ("%ld ", e)); + PRLEVEL(PR, ("" LD " ", e)); curHeap->push_back(e); std::push_heap(curHeap->begin(), curHeap->end(), greater); } curHeap->push_back(eli); std::push_heap(curHeap->begin(), curHeap->end(), greater); - PRLEVEL(PR, ("%% %ld pushed ", eli)); + PRLEVEL(PR, ("%% " LD " pushed ", eli)); } else { // heapify - PRLEVEL(PR, ("%%heapify with the size %ld\n", tot_size)); + PRLEVEL(PR, ("%%heapify with the size " LD "\n", tot_size)); for (int64_t i = aChildp[eli]; i <= aChildp[eli + 1] - 1; i++) { int64_t chelid = aChild[i]; // element id of the child @@ -148,7 +148,7 @@ ParU_Ret paru_make_heap(int64_t f, int64_t start_fac, } } PRLEVEL(1, - ("%%Heap free %p id=%ld\n", heapList[chelid], chelid)); + ("%%Heap free %p id=" LD "\n", heapList[chelid], chelid)); delete heapList[chelid]; heapList[chelid] = NULL; } @@ -162,7 +162,7 @@ ParU_Ret paru_make_heap(int64_t f, int64_t start_fac, } else { - PRLEVEL(PR, ("Nothing in the heap. size of pivotal %ld \n", + PRLEVEL(PR, ("Nothing in the heap. size of pivotal " LD " \n", pivotal_elements.size())); std::vector *curHeap; try @@ -183,13 +183,13 @@ ParU_Ret paru_make_heap(int64_t f, int64_t start_fac, #ifndef NDEBUG std::vector *curHeap = heapList[eli]; - PRLEVEL(PR, ("After everything eli %ld has %ld elements\n", eli, + PRLEVEL(PR, ("After everything eli " LD " has " LD " elements\n", eli, curHeap->size())); - PRLEVEL(PR, ("%%Heap after making it(size = %ld) \n", curHeap->size())); + PRLEVEL(PR, ("%%Heap after making it(size = " LD ") \n", curHeap->size())); for (int64_t i = 0; i < (int64_t)curHeap->size(); i++) { int64_t elid = (*curHeap)[i]; - PRLEVEL(PR, (" %ld(%ld) ", elid, lacList[elid])); + PRLEVEL(PR, (" " LD "(" LD ") ", elid, lacList[elid])); } PRLEVEL(PR, ("\n")); for (int64_t i = curHeap->size() - 1; i > 0; i--) @@ -197,7 +197,7 @@ ParU_Ret paru_make_heap(int64_t f, int64_t start_fac, int64_t elid = (*curHeap)[i]; int64_t pelid = (*curHeap)[(i - 1) / 2]; // parent id if (lacList[pelid] > lacList[elid]) - PRLEVEL(PR, ("ATT %ld(%ld)\n\n ", elid, lacList[elid])); + PRLEVEL(PR, ("ATT " LD "(" LD ")\n\n ", elid, lacList[elid])); ASSERT(lacList[pelid] <= lacList[elid]); } #endif @@ -234,11 +234,11 @@ ParU_Ret paru_make_heap_empty_el(int64_t f, std::vector &pivotal_elemen int64_t *lacList = Work->lacList; auto greater = [&lacList](int64_t a, int64_t b) { return lacList[a] > lacList[b]; }; - PRLEVEL(PR, ("%% tot_size = %ld\n", tot_size)); - PRLEVEL(PR, ("%% biggest_Child_id = %ld ", biggest_Child_id)); - PRLEVEL(PR, ("%% biggest_Child_size = %ld\n", biggest_Child_size)); + PRLEVEL(PR, ("%% tot_size = " LD "\n", tot_size)); + PRLEVEL(PR, ("%% biggest_Child_id = " LD " ", biggest_Child_id)); + PRLEVEL(PR, ("%% biggest_Child_size = " LD "\n", biggest_Child_size)); int64_t size_of_rest = tot_size - biggest_Child_size + pivotal_elements.size(); - PRLEVEL(PR, ("%% the rest size = %ld\n", size_of_rest)); + PRLEVEL(PR, ("%% the rest size = " LD "\n", size_of_rest)); if (biggest_Child_id != -1) // There are still elements remained in the heaps @@ -277,16 +277,16 @@ ParU_Ret paru_make_heap_empty_el(int64_t f, std::vector &pivotal_elemen int64_t e = pivotal_elements[i]; paru_element *el = elementList[e]; if (el == NULL) continue; - PRLEVEL(PR, ("%ld ", e)); + PRLEVEL(PR, ("" LD " ", e)); curHeap->push_back(e); std::push_heap(curHeap->begin(), curHeap->end(), greater); } std::push_heap(curHeap->begin(), curHeap->end(), greater); - PRLEVEL(PR, ("%% %ld pushed ", eli)); + PRLEVEL(PR, ("%% " LD " pushed ", eli)); } else { // heapify - PRLEVEL(PR, ("%%heapify with the size %ld\n", tot_size)); + PRLEVEL(PR, ("%%heapify with the size " LD "\n", tot_size)); for (int64_t i = aChildp[eli]; i <= aChildp[eli + 1] - 1; i++) { int64_t chelid = aChild[i]; // element id of the child @@ -305,7 +305,7 @@ ParU_Ret paru_make_heap_empty_el(int64_t f, std::vector &pivotal_elemen } } PRLEVEL(1, - ("%%Heap free %p id=%ld\n", heapList[chelid], chelid)); + ("%%Heap free %p id=" LD "\n", heapList[chelid], chelid)); delete heapList[chelid]; heapList[chelid] = NULL; } @@ -318,7 +318,7 @@ ParU_Ret paru_make_heap_empty_el(int64_t f, std::vector &pivotal_elemen } else { - PRLEVEL(PR, ("Nothing in the heap. size of pivotal %ld \n", + PRLEVEL(PR, ("Nothing in the heap. size of pivotal " LD " \n", pivotal_elements.size())); std::vector *curHeap; try @@ -338,13 +338,13 @@ ParU_Ret paru_make_heap_empty_el(int64_t f, std::vector &pivotal_elemen #ifndef NDEBUG std::vector *curHeap = heapList[eli]; - PRLEVEL(PR, ("After everything eli %ld has %ld elements\n", eli, + PRLEVEL(PR, ("After everything eli " LD " has " LD " elements\n", eli, curHeap->size())); - PRLEVEL(PR, ("%%Heap after making it(size = %ld) \n", curHeap->size())); + PRLEVEL(PR, ("%%Heap after making it(size = " LD ") \n", curHeap->size())); for (int64_t i = 0; i < (int64_t)curHeap->size(); i++) { int64_t elid = (*curHeap)[i]; - PRLEVEL(PR, (" %ld(%ld) ", elid, lacList[elid])); + PRLEVEL(PR, (" " LD "(" LD ") ", elid, lacList[elid])); } PRLEVEL(PR, ("\n")); for (int64_t i = curHeap->size() - 1; i > 0; i--) @@ -352,7 +352,7 @@ ParU_Ret paru_make_heap_empty_el(int64_t f, std::vector &pivotal_elemen int64_t elid = (*curHeap)[i]; int64_t pelid = (*curHeap)[(i - 1) / 2]; // parent id if (lacList[pelid] > lacList[elid]) - PRLEVEL(PR, ("ATT %ld(%ld)\n\n ", elid, lacList[elid])); + PRLEVEL(PR, ("ATT " LD "(" LD ")\n\n ", elid, lacList[elid])); ASSERT(lacList[pelid] <= lacList[elid]); } #endif diff --git a/ParU/Source/paru_init_rel.cpp b/ParU/Source/paru_init_rel.cpp index a7e924e1f..c755437a3 100644 --- a/ParU/Source/paru_init_rel.cpp +++ b/ParU/Source/paru_init_rel.cpp @@ -26,16 +26,16 @@ void paru_init_rel(int64_t f, paru_work *Work) int64_t *Childp = Sym->Childp; int64_t max_time = 0; - PRLEVEL(1, ("%% begining=%ld end=%ld \n", Childp[f], Childp[f + 1])); - PRLEVEL(1, ("%% children of %ld are:\n", f)); + PRLEVEL(1, ("%% begining=" LD " end=" LD " \n", Childp[f], Childp[f + 1])); + PRLEVEL(1, ("%% children of " LD " are:\n", f)); for (int64_t p = Childp[f]; p <= Childp[f + 1] - 1; p++) { int64_t child_rel; ASSERT(Child[p] >= 0); child_rel = time_stamp[Child[p]]; - PRLEVEL(1, ("%% Child[%ld]= %ld ", p, Child[p])); + PRLEVEL(1, ("%% Child[" LD "]= " LD " ", p, Child[p])); max_time = max_time > child_rel ? max_time : child_rel; } time_stamp[f] = ++max_time; - PRLEVEL(1, ("%% max_time=%ld \n", max_time)); + PRLEVEL(1, ("%% max_time=" LD " \n", max_time)); } diff --git a/ParU/Source/paru_init_rowFronts.cpp b/ParU/Source/paru_init_rowFronts.cpp index accbc53e0..5e3da2b2f 100644 --- a/ParU/Source/paru_init_rowFronts.cpp +++ b/ParU/Source/paru_init_rowFronts.cpp @@ -181,10 +181,10 @@ ParU_Ret paru_init_rowFronts(paru_work *Work, { PRLEVEL(PR, ("%% $RowList =%p\n", RowList)); paru_memset(rowSize, -1, m * sizeof(int64_t), Control); - PRLEVEL(PR, ("%% rowSize pointer=%p size=%ld \n", rowSize, + PRLEVEL(PR, ("%% rowSize pointer=%p size=" LD " \n", rowSize, m * sizeof(int64_t))); - PRLEVEL(PR, ("%% rowMark pointer=%p size=%ld \n", rowMark, + PRLEVEL(PR, ("%% rowMark pointer=%p size=" LD " \n", rowMark, (m + nf) * sizeof(int64_t))); paru_memset(elRow, -1, (m + nf) * sizeof(int64_t), Control); @@ -219,27 +219,27 @@ ParU_Ret paru_init_rowFronts(paru_work *Work, PRLEVEL(PR, ("Init Sup and Slp in the middle\n")); if (cs1 > 0) { - PRLEVEL(PR, ("(%ld) Sup =", sunz)); + PRLEVEL(PR, ("(" LD ") Sup =", sunz)); for (int64_t k = 0; k <= cs1; k++) { - PRLEVEL(PR, ("%ld ", Sup[k])); - PRLEVEL(PR + 2, ("c%ld ", cSup[k])); + PRLEVEL(PR, ("" LD " ", Sup[k])); + PRLEVEL(PR + 2, ("c" LD " ", cSup[k])); if (Sup[k] != cSup[k]) - PRLEVEL(PR, ("Sup[%ld] =%ld, cSup=%ld", k, Sup[k], cSup[k])); + PRLEVEL(PR, ("Sup[" LD "] =" LD ", cSup=" LD "", k, Sup[k], cSup[k])); ASSERT(Sup[k] == cSup[k]); } PRLEVEL(PR, ("\n")); } if (rs1 > 0) { - PRLEVEL(PR, ("(%ld) Slp =", slnz)); + PRLEVEL(PR, ("(" LD ") Slp =", slnz)); for (int64_t k = 0; k <= rs1; k++) { - PRLEVEL(PR, ("%ld ", Slp[k])); - PRLEVEL(PR + 2, ("o%ld ", cSlp[k])); + PRLEVEL(PR, ("" LD " ", Slp[k])); + PRLEVEL(PR + 2, ("o" LD " ", cSlp[k])); if (Slp[k] != cSlp[k]) PRLEVEL(PR, - ("\nSup[%ld] =%ld, cSup=%ld\n", k, Slp[k], cSlp[k])); + ("\nSup[" LD "] =" LD ", cSup=" LD "\n", k, Slp[k], cSlp[k])); ASSERT(Slp[k] == cSlp[k]); } PRLEVEL(PR, ("\n")); @@ -253,7 +253,7 @@ ParU_Ret paru_init_rowFronts(paru_work *Work, #ifndef NDEBUG PR = 1; PRLEVEL(PR, ("Iniit Pinv =\n")); - for (int64_t i = 0; i < m; i++) PRLEVEL(PR, ("%ld ", Pinv[i])); + for (int64_t i = 0; i < m; i++) PRLEVEL(PR, ("" LD " ", Pinv[i])); PRLEVEL(PR, ("\n")); #endif @@ -278,7 +278,7 @@ ParU_Ret paru_init_rowFronts(paru_work *Work, PRLEVEL(PR, ("%lf ", Rs[k])); if (Rs[k] <= 0) { - PRLEVEL(1, ("ParU: Matrix is singular, row %ld is zero\n", k)); + PRLEVEL(1, ("ParU: Matrix is singular, row " LD " is zero\n", k)); Num->res = PARU_SINGULAR; return PARU_SINGULAR; } @@ -301,7 +301,7 @@ ParU_Ret paru_init_rowFronts(paru_work *Work, } else if (srow < 0 && scol >= 0) { // inside the U singletons - PRLEVEL(PR, ("Usingleton newcol = %ld newrow=%ld\n", newcol, + PRLEVEL(PR, ("Usingleton newcol = " LD " newrow=" LD "\n", newcol, newrow)); // let the diagonal entries be first Sux[++cSup[newrow]] = (Rs == NULL) ? Ax[p] : Ax[p] / Rs[oldrow]; @@ -362,15 +362,15 @@ ParU_Ret paru_init_rowFronts(paru_work *Work, // ------------------------------------------------------------------------- #ifndef NDEBUG int64_t n = Num->n = Sym->n - Sym->n1; - PRLEVEL(1, ("%% m=%ld, n=%ld\n", m, n)); + PRLEVEL(1, ("%% m=" LD ", n=" LD "\n", m, n)); PR = 1; PRLEVEL(PR, ("\n%% Inside init row fronts\n")); PRLEVEL(PR, ("%% Sp =\n%%")); - for (int64_t i = 0; i <= m; i++) PRLEVEL(PR, ("%ld ", Sp[i])); + for (int64_t i = 0; i <= m; i++) PRLEVEL(PR, ("" LD " ", Sp[i])); PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("Sj =\n")); - for (int64_t k = 0; k < snz; k++) PRLEVEL(PR, ("%ld ", Sj[k])); + for (int64_t k = 0; k < snz; k++) PRLEVEL(PR, ("" LD " ", Sj[k])); PRLEVEL(PR, ("\n")); #endif @@ -388,22 +388,22 @@ ParU_Ret paru_init_rowFronts(paru_work *Work, } #ifndef NDEBUG PR = 1; - PRLEVEL(PR, ("init_row Diag_map (%ld) =\n", Sym->n)); + PRLEVEL(PR, ("init_row Diag_map (" LD ") =\n", Sym->n)); for (int64_t i = 0; i < MIN(64, Sym->n); i++) - PRLEVEL(PR, ("%ld ", Diag_map[i])); + PRLEVEL(PR, ("" LD " ", Diag_map[i])); PRLEVEL(PR, ("\n")); PRLEVEL(PR, ("inv_Diag_map =\n")); for (int64_t i = 0; i < MIN(64, Sym->n); i++) - PRLEVEL(PR, ("%ld ", inv_Diag_map[i])); + PRLEVEL(PR, ("" LD " ", inv_Diag_map[i])); PRLEVEL(PR, ("\n")); for (int64_t i = 0; i < Sym->n; i++) { if (Diag_map[i] == -1) PRLEVEL(PR, - ("Diag_map[%ld] is not correctly initialized\n", i)); + ("Diag_map[" LD "] is not correctly initialized\n", i)); if (inv_Diag_map[i] == -1) - PRLEVEL(PR, ("inv_Diag_map[%ld] is not correctly initialized\n", + PRLEVEL(PR, ("inv_Diag_map[" LD "] is not correctly initialized\n", i)); ASSERT(Diag_map[i] != -1); diff --git a/ParU/Source/paru_intersection.cpp b/ParU/Source/paru_intersection.cpp index 8469be73b..18b48c760 100644 --- a/ParU/Source/paru_intersection.cpp +++ b/ParU/Source/paru_intersection.cpp @@ -24,7 +24,7 @@ int paru_intersection(int64_t e, paru_element **elementList, for (std::set::iterator it = stl_newColSet.begin(); it != stl_newColSet.end(); it++) { - PRLEVEL(PR, (" %ld", *it)); + PRLEVEL(PR, (" " LD "", *it)); } PRLEVEL(PR, ("\n")); @@ -41,8 +41,8 @@ int paru_intersection(int64_t e, paru_element **elementList, if (el_colIndex[el->lac] > *stl_newColSet.end()) return 0; - PRLEVEL(PR, ("%% newColSet.size = %ld\n", stl_newColSet.size())); - PRLEVEL(PR, ("%% nEl = %ld\n", nEl)); + PRLEVEL(PR, ("%% newColSet.size = " LD "\n", stl_newColSet.size())); + PRLEVEL(PR, ("%% nEl = " LD "\n", nEl)); std::set::iterator it; if ((int64_t)(Const * stl_newColSet.size()) < nEl - el->lac) // if size el >> stl_newColSet @@ -54,13 +54,13 @@ int paru_intersection(int64_t e, paru_element **elementList, { int64_t c = *it; int64_t col = paru_bin_srch_col(el_colIndex, el->lac, nEl - 1, c); - PRLEVEL(PR, ("%%intersection=%ld", intersection)); - PRLEVEL(PR, ("%%after bsearch for c=%ld col=%ld \n", c, col)); + PRLEVEL(PR, ("%%intersection=" LD "", intersection)); + PRLEVEL(PR, ("%%after bsearch for c=" LD " col=" LD " \n", c, col)); if (col != -1 && el_colIndex[col] == c) { intersection++; - PRLEVEL(PR, ("%%##1: c=%ld ", c)); - PRLEVEL(PR, ("%%intersection=%ld\n", intersection)); + PRLEVEL(PR, ("%%##1: c=" LD " ", c)); + PRLEVEL(PR, ("%%intersection=" LD "\n", intersection)); }; } } @@ -78,8 +78,8 @@ int paru_intersection(int64_t e, paru_element **elementList, if (stl_newColSet.find(col) != stl_newColSet.end()) { intersection++; - PRLEVEL(PR, ("%%2: col=%ld ", col)); - PRLEVEL(PR, ("%%intersection=%ld\n", intersection)); + PRLEVEL(PR, ("%%2: col=" LD " ", col)); + PRLEVEL(PR, ("%%intersection=" LD "\n", intersection)); }; if (ncolsseen == 0) return intersection; } @@ -106,15 +106,15 @@ int paru_intersection(int64_t e, paru_element **elementList, // *it == col { intersection++; - PRLEVEL(PR, ("%%3: c=%ld ", c)); - PRLEVEL(PR, ("%%col= %ld", el_colIndex[c])); - PRLEVEL(PR, ("%%intersection=%ld\n", intersection)); + PRLEVEL(PR, ("%%3: c=" LD " ", c)); + PRLEVEL(PR, ("%%col= " LD "", el_colIndex[c])); + PRLEVEL(PR, ("%%intersection=" LD "\n", intersection)); ++it; c++; ncolsseen--; }; } } - PRLEVEL(PR, (" e = %ld intersection= %ld\n", e, intersection)); + PRLEVEL(PR, (" e = " LD " intersection= " LD "\n", e, intersection)); return intersection; } diff --git a/ParU/Source/paru_mem.cpp b/ParU/Source/paru_mem.cpp index be4bead64..91267176e 100644 --- a/ParU/Source/paru_mem.cpp +++ b/ParU/Source/paru_mem.cpp @@ -45,8 +45,8 @@ void paru_set_nmalloc(int64_t nmalloc) { paru_nmalloc = nmalloc; } - //printf("inside set nmalloc=%ld",nmalloc); - PRLEVEL(1, ("inside set nmalloc=%ld",nmalloc)); + //printf("inside set nmalloc=" LD "",nmalloc); + PRLEVEL(1, ("inside set nmalloc=" LD "",nmalloc)); } int64_t paru_decr_nmalloc(void) @@ -59,8 +59,8 @@ int64_t paru_decr_nmalloc(void) nmalloc = paru_nmalloc--; } } - //printf("inside decr nmalloc=%ld",nmalloc); - PRLEVEL(1, ("inside decr nmalloc=%ld",nmalloc)); + //printf("inside decr nmalloc=" LD "",nmalloc); + PRLEVEL(1, ("inside decr nmalloc=" LD "",nmalloc)); return (nmalloc); } @@ -71,8 +71,8 @@ int64_t paru_get_nmalloc(void) { nmalloc = paru_nmalloc; } - //printf("inside get nmalloc=%ld",nmalloc); - PRLEVEL(1, ("inside get nmalloc=%ld",nmalloc)); + //printf("inside get nmalloc=" LD "",nmalloc); + PRLEVEL(1, ("inside get nmalloc=" LD "",nmalloc)); return (nmalloc); } @@ -128,7 +128,7 @@ void *paru_alloc(size_t n, size_t size) else { #ifndef NDEBUG - PRLEVEL(1, ("%% allocated %ld in %p total= %ld\n", n * size, p, + PRLEVEL(1, ("%% allocated " LD " in %p total= " LD "\n", n * size, p, alloc_count)); alloc_count += n * size; #endif @@ -185,7 +185,7 @@ void *paru_calloc(size_t n, size_t size) else { #ifndef NDEBUG - PRLEVEL(1, ("%% callocated %ld in %p total= %ld\n", n * size, p, + PRLEVEL(1, ("%% callocated " LD " in %p total= " LD "\n", n * size, p, calloc_count)); calloc_count += n * size; #endif @@ -220,7 +220,7 @@ void *paru_realloc( } else if (nnew == *n ) { - PRLEVEL(1, ("%% reallocating nothing %ld, %ld in %p \n", nnew, *n, + PRLEVEL(1, ("%% reallocating nothing " LD ", " LD " in %p \n", nnew, *n, p)); } else if (nnew >= (Size_max / size_Entry) || nnew >= INT_MAX) @@ -231,7 +231,7 @@ void *paru_realloc( else { // The object exists, and is changing to some other nonzero size. - PRLEVEL(1, ("realloc : %ld to %ld, %ld\n", *n, nnew, size_Entry)); + PRLEVEL(1, ("realloc : " LD " to " LD ", " LD "\n", *n, nnew, size_Entry)); int ok = TRUE; #ifdef PARU_ALLOC_TESTING @@ -262,7 +262,7 @@ void *paru_realloc( { #ifndef NDEBUG realloc_count += nnew * size_Entry - *n; - PRLEVEL(1, ("%% reallocated %ld in %p and freed %p total= %ld\n", + PRLEVEL(1, ("%% reallocated " LD " in %p and freed %p total= " LD "\n", nnew* size_Entry, pnew, p, realloc_count)); #endif p = pnew ; @@ -282,7 +282,7 @@ void paru_free(size_t n, size_t size, void *p) // free_count += n * size; // Valgrind is unhappy about some part here - // PRLEVEL (1, ("%% free %ld in %p total= %ld\n", + // PRLEVEL (1, ("%% free " LD " in %p total= " LD "\n", // n*size, p, free_count)); if (p != NULL) @@ -301,7 +301,7 @@ void *operator new(size_t size) #ifndef NDEBUG static int64_t cpp_count = 0; cpp_count += size; - PRLEVEL(1, ("global op new called, size = %zu tot=%ld\n", size, cpp_count)); + PRLEVEL(1, ("global op new called, size = %zu tot=" LD "\n", size, cpp_count)); #endif if (size == 0) @@ -334,8 +334,8 @@ ParU_Ret ParU_Freesym(ParU_Symbolic **Sym_handle, ParU_Control *Control) int64_t n1 = Sym->n1; int64_t nf = Sym->nf; int64_t snz = Sym->snz; - PRLEVEL(1, ("%% In free sym: m=%ld n=%ld\n nf=%ld " - "Sym->anz=%ld \n", + PRLEVEL(1, ("%% In free sym: m=" LD " n=" LD "\n nf=" LD " " + "Sym->anz=" LD " \n", m, n, nf, Sym->anz)); paru_free(nf + 1, sizeof(int64_t), Sym->Parent); @@ -412,9 +412,9 @@ void paru_free_el(int64_t e, paru_element **elementList) if (el == NULL) return; #ifndef NDEBUG int64_t nrows = el->nrows, ncols = el->ncols; - PRLEVEL(1, ("%%Free the element e =%ld\t", e)); - PRLEVEL(1, ("%% nrows =%ld ", nrows)); - PRLEVEL(1, ("%% ncols =%ld\n", ncols)); + PRLEVEL(1, ("%%Free the element e =" LD "\t", e)); + PRLEVEL(1, ("%% nrows =" LD " ", nrows)); + PRLEVEL(1, ("%% ncols =" LD "\n", ncols)); int64_t tot_size = sizeof(paru_element) + sizeof(int64_t) * (2 * (nrows + ncols)) + sizeof(double) * nrows * ncols; @@ -467,7 +467,7 @@ ParU_Ret paru_free_work(ParU_Symbolic *Sym, paru_work *Work) for (int64_t i = 0; i < m; i++) { // freeing all row elements int64_t e = Sym->row2atree[i]; // element number in augmented tree - PRLEVEL(1, ("%% e =%ld\t", e)); + PRLEVEL(1, ("%% e =" LD "\t", e)); paru_free_el(e, elementList); } @@ -493,7 +493,7 @@ ParU_Ret paru_free_work(ParU_Symbolic *Sym, paru_work *Work) if (heapList[eli] != NULL) { PRLEVEL(1, - ("%% %ld has not been freed %p\n", eli, heapList[eli])); + ("%% " LD " has not been freed %p\n", eli, heapList[eli])); delete heapList[eli]; heapList[eli] = NULL; } diff --git a/ParU/Source/paru_norms.cpp b/ParU/Source/paru_norms.cpp index 824e8943b..7b5a8b4d7 100644 --- a/ParU/Source/paru_norms.cpp +++ b/ParU/Source/paru_norms.cpp @@ -27,7 +27,7 @@ double paru_spm_1norm(cholmod_sparse *A) double s = 0; for (int64_t p = Ap[j]; p < Ap[j + 1]; p++) { - PRLEVEL(3, ("Ax[%ld] = %.2lf\n", p, Ax[p])); + PRLEVEL(3, ("Ax[" LD "] = %.2lf\n", p, Ax[p])); s += fabs(Ax[p]); } PRLEVEL(2, ("s = %le\n", s)); diff --git a/ParU/Source/paru_perm.cpp b/ParU/Source/paru_perm.cpp index 8548ee80b..9a8d63036 100644 --- a/ParU/Source/paru_perm.cpp +++ b/ParU/Source/paru_perm.cpp @@ -53,7 +53,7 @@ int64_t paru_apply_inv_perm(const int64_t *P, const double *s, const double *b, PRLEVEL(1, ("%% Inside apply inv permutaion P is:\n%%")); for (int64_t k = 0; k < m; k++) { - PRLEVEL(1, (" %ld, ", P[k])); + PRLEVEL(1, (" " LD ", ", P[k])); } PRLEVEL(1, (" \n")); @@ -102,7 +102,7 @@ int64_t paru_apply_inv_perm(const int64_t *P, const double *s, const double *B, PRLEVEL(PR, ("%% mRHS Inside apply inv permutaion P is:\n%%")); for (int64_t k = 0; k < m; k++) { - PRLEVEL(PR, (" %ld, ", P[k])); + PRLEVEL(PR, (" " LD ", ", P[k])); } PRLEVEL(PR, (" \n")); @@ -178,7 +178,7 @@ int64_t paru_apply_perm_scale(const int64_t *P, const double *s, const double *b PRLEVEL(1, ("%% Inside apply permutaion and scale P is:\n%%")); for (int64_t k = 0; k < m; k++) { - PRLEVEL(1, (" %ld, ", P[k])); + PRLEVEL(1, (" " LD ", ", P[k])); } PRLEVEL(1, (" \n")); @@ -205,7 +205,7 @@ int64_t paru_apply_perm_scale(const int64_t *P, const double *s, const double *b { int64_t j = P[k]; // k-new and j-old; P(new) = old #ifndef NDEBUG - PRLEVEL(1, ("b[%ld]= %lf ", j, b[j])); + PRLEVEL(1, ("b[" LD "]= %lf ", j, b[j])); #endif x[k] = b[j] ; } @@ -217,8 +217,8 @@ int64_t paru_apply_perm_scale(const int64_t *P, const double *s, const double *b { int64_t j = P[k]; // k-new and j-old; P(new) = old #ifndef NDEBUG - PRLEVEL(1, ("b[%ld]= %lf ", j, b[j])); - PRLEVEL(1, ("s[%ld]=%lf, ", j, s[j])); + PRLEVEL(1, ("b[" LD "]= %lf ", j, b[j])); + PRLEVEL(1, ("s[" LD "]=%lf, ", j, s[j])); #endif x[k] = b[j] / s[j] ; } @@ -246,7 +246,7 @@ int64_t paru_apply_perm_scale(const int64_t *P, const double *s, const double *B PRLEVEL(1, ("%% mRHS Inside apply Permutaion and scale P is:\n%%")); for (int64_t k = 0; k < m; k++) { - PRLEVEL(1, (" %ld, ", P[k])); + PRLEVEL(1, (" " LD ", ", P[k])); } PRLEVEL(1, (" \n")); diff --git a/ParU/Source/paru_pivotal.cpp b/ParU/Source/paru_pivotal.cpp index 5aefb2b4f..48a670c9d 100644 --- a/ParU/Source/paru_pivotal.cpp +++ b/ParU/Source/paru_pivotal.cpp @@ -37,7 +37,7 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, #ifndef NDEBUG int64_t m = Num->m; PRLEVEL(PR, ("%%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n")); - PRLEVEL(PR, ("%% Pivotal assembly of front %ld (eli %ld) cols %ld-%ld\n", f, + PRLEVEL(PR, ("%% Pivotal assembly of front " LD " (eli " LD ") cols " LD "-" LD "\n", f, eli, col1, col2)); #endif @@ -60,7 +60,7 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, int64_t f_rmark = rowMarkp[chelid]; rowMark = rowMark > f_rmark ? rowMark : f_rmark; - PRLEVEL(PR, ("%% chelid = %ld\n", chelid)); + PRLEVEL(PR, ("%% chelid = " LD "\n", chelid)); std::vector *curHeap = heapList[chelid]; if (curHeap == NULL) continue; @@ -70,10 +70,10 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, { int64_t frontEl = curHeap->front(); int64_t lacFel = lacList[frontEl]; - PRLEVEL(PR, ("%% element = %ld col1=%ld", frontEl, col1)); - PRLEVEL(PR, (" lac_el = %ld \n", lacFel)); + PRLEVEL(PR, ("%% element = " LD " col1=" LD "", frontEl, col1)); + PRLEVEL(PR, (" lac_el = " LD " \n", lacFel)); // ASSERT(lacFel >= col1); - PRLEVEL(PR, ("%% curHeap->size= %ld \n", curHeap->size())); + PRLEVEL(PR, ("%% curHeap->size= " LD " \n", curHeap->size())); if (lacFel >= col2) break; @@ -94,12 +94,12 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, { // IMPORTANT: type conversion is necessary int64_t cur_size = curHeap->size(); - PRLEVEL(PR, ("%% curHeap->size= *%ld \n", curHeap->size())); - PRLEVEL(PR, ("%% biggest_Child_size = %ld \n", biggest_Child_size)); + PRLEVEL(PR, ("%% curHeap->size= *" LD " \n", curHeap->size())); + PRLEVEL(PR, ("%% biggest_Child_size = " LD " \n", biggest_Child_size)); tot_size += curHeap->size(); if (cur_size > biggest_Child_size) { - PRLEVEL(PR, ("%% biggest_Child_id = %ld \n", biggest_Child_id)); + PRLEVEL(PR, ("%% biggest_Child_id = " LD " \n", biggest_Child_id)); biggest_Child_id = chelid; biggest_Child_size = cur_size; } @@ -110,9 +110,9 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, hi.biggest_Child_id = biggest_Child_id; hi.biggest_Child_size = biggest_Child_size; - PRLEVEL(PR, ("%%Inside pivot tot_size= %ld \n", hi.sum_size)); - PRLEVEL(PR, ("%% biggest_Child_id = %ld \n", hi.biggest_Child_id)); - PRLEVEL(PR, ("%% hi.biggest_Child_size = %ld \n", hi.biggest_Child_size)); + PRLEVEL(PR, ("%%Inside pivot tot_size= " LD " \n", hi.sum_size)); + PRLEVEL(PR, ("%% biggest_Child_id = " LD " \n", hi.biggest_Child_id)); + PRLEVEL(PR, ("%% hi.biggest_Child_size = " LD " \n", hi.biggest_Child_size)); rowMarkp[eli] = rowMark; @@ -131,13 +131,13 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, } #endif rowMarkp[eli] = rowMark; - PRLEVEL(1, ("%% rowMark=%ld;\n", rowMark)); + PRLEVEL(1, ("%% rowMark=" LD ";\n", rowMark)); #ifndef NDEBUG PR = 1; - PRLEVEL(PR, ("%% pivotal columns eli(%ld): ", eli)); + PRLEVEL(PR, ("%% pivotal columns eli(" LD "): ", eli)); for (int64_t i = 0; i < (int64_t)pivotal_elements.size(); i++) - PRLEVEL(PR, ("%ld ", pivotal_elements[i])); + PRLEVEL(PR, ("" LD " ", pivotal_elements[i])); PRLEVEL(PR, ("\n")); std::set stl_rowSet; std::set::iterator it; @@ -160,9 +160,9 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, #ifndef NDEBUG // int64_t *el_colIndex = colIndex_pointer (curEl); int64_t *el_colIndex = (int64_t *)(el + 1); - PRLEVEL(PR, ("current element(%ld) %ld-%ld\n", e, col1, col2)); - PRLEVEL(PR, ("lac = %ld ", el->lac)); - PRLEVEL(PR, ("lac_col = %ld\n ", lacList[e])); + PRLEVEL(PR, ("current element(" LD ") " LD "-" LD "\n", e, col1, col2)); + PRLEVEL(PR, ("lac = " LD " ", el->lac)); + PRLEVEL(PR, ("lac_col = " LD "\n ", lacList[e])); ASSERT(el_colIndex[el->lac] >= col1); if (PR <= 0) paru_print_element(e, Work, Num); #endif @@ -176,7 +176,7 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, // int64_t *rowRelIndex = relRowInd (el); int64_t *rowRelIndex = (int64_t *)(el + 1) + 2 * nEl + mEl; - PRLEVEL(1, ("%% rowMark=%ld;\n", rowMark)); + PRLEVEL(1, ("%% rowMark=" LD ";\n", rowMark)); el->nzr_pc = 0; // initializing ; number of zero rows int64_t nrows2bSeen = el->nrowsleft; @@ -184,14 +184,14 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, for (int64_t rEl = 0; rEl < mEl; rEl++) { int64_t curRow = el_rowIndex[rEl]; - PRLEVEL(1, ("%% curRow =%ld rEl=%ld\n", curRow, rEl)); + PRLEVEL(1, ("%% curRow =" LD " rEl=" LD "\n", curRow, rEl)); if (nrows2bSeen == 0) break; if (curRow < 0) continue; // that row has already deleted nrows2bSeen--; #ifndef NDEBUG // stl_rowSet.insert(curRow); - PRLEVEL(1, ("%% %p ---> isRowInFront [%ld]=%ld\n", + PRLEVEL(1, ("%% %p ---> isRowInFront [" LD "]=" LD "\n", isRowInFront + curRow, curRow, isRowInFront[curRow])); #endif @@ -224,7 +224,7 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, { el->nzr_pc++; PRLEVEL(1, ("%% Found a row with all zeroes!! " - "curRow =%ld el=%ld\n", + "curRow =" LD " el=" LD "\n", curRow, e)); zero_piv_rows++; @@ -239,20 +239,20 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, #ifndef NDEBUG stl_rowSet.insert(curRow); #endif - PRLEVEL(1, ("%%curRow =%ld rowCount=%ld\n", curRow, rowCount)); + PRLEVEL(1, ("%%curRow =" LD " rowCount=" LD "\n", curRow, rowCount)); frowList[rowCount] = curRow; rowRelIndex[rEl] = rowCount; - PRLEVEL(1, ("%%1st: rowRelIndex[%ld] = %ld\n", rEl, rowCount)); + PRLEVEL(1, ("%%1st: rowRelIndex[" LD "] = " LD "\n", rEl, rowCount)); isRowInFront[curRow] = rowMark + rowCount++; } else { // already seen curRow - PRLEVEL(1, ("%%curRow =%ld rowCount=%ld\n", curRow, rowCount)); - PRLEVEL(1, ("%%before updating rowRelIndex[%ld] = %ld\n", rEl, + PRLEVEL(1, ("%%curRow =" LD " rowCount=" LD "\n", curRow, rowCount)); + PRLEVEL(1, ("%%before updating rowRelIndex[" LD "] = " LD "\n", rEl, rowRelIndex[rEl])); - PRLEVEL(1, ("%% rowMark =%ld\n", rowMark)); + PRLEVEL(1, ("%% rowMark =" LD "\n", rowMark)); rowRelIndex[rEl] = isRowInFront[curRow] - rowMark; - PRLEVEL(1, ("%%N1st: rowRelIndex[%ld] = %ld\n", rEl, + PRLEVEL(1, ("%%N1st: rowRelIndex[" LD "] = " LD "\n", rEl, rowRelIndex[rEl])); } @@ -260,19 +260,19 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, #ifndef NDEBUG if (rowCount != (int64_t)stl_rowSet.size()) { - PRLEVEL(1, ("%%curRow =%ld rowCount=%ld\n", curRow, rowCount)); - PRLEVEL(1, ("%%stl_rowSet.size()=%ld \n", stl_rowSet.size())); + PRLEVEL(1, ("%%curRow =" LD " rowCount=" LD "\n", curRow, rowCount)); + PRLEVEL(1, ("%%stl_rowSet.size()=" LD " \n", stl_rowSet.size())); } #endif ASSERT(rowCount == (int64_t)stl_rowSet.size()); } panel_row[(lacList[e] - col1) / panel_width] = rowCount; #ifndef NDEBUG - PRLEVEL(PR, ("%%rowCount=%ld", rowCount)); - PRLEVEL(PR, (" lac=%ld", lacList[e])); + PRLEVEL(PR, ("%%rowCount=" LD "", rowCount)); + PRLEVEL(PR, (" lac=" LD "", lacList[e])); ASSERT((lacList[e] - col1) / panel_width < num_panels); ASSERT((lacList[e] - col1) / panel_width >= 0); - PRLEVEL(PR, (" ind.=%ld\n", (lacList[e] - col1) / panel_width)); + PRLEVEL(PR, (" ind.=" LD "\n", (lacList[e] - col1) / panel_width)); #endif } @@ -281,12 +281,12 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, #ifndef NDEBUG // there is a structural problem PRLEVEL(PR, - ("%%STRUCTURAL PROBLEM! rowCount=%ld, fp =%ld", rowCount, fp)); + ("%%STRUCTURAL PROBLEM! rowCount=" LD ", fp =" LD "", rowCount, fp)); #endif if (rowCount + zero_piv_rows > fp) { PRLEVEL(PR, - (" it can be solved by adding %ld zeros", zero_piv_rows)); + (" it can be solved by adding " LD " zeros", zero_piv_rows)); } else { @@ -298,10 +298,10 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, } // make sure that all panel_row is correctly initialized - PRLEVEL(PR, ("%% num_panels: %ld \n ", num_panels)); + PRLEVEL(PR, ("%% num_panels: " LD " \n ", num_panels)); PRLEVEL(PR, ("%% panel_row: \n %%")); int64_t pprow = panel_row[0]; - PRLEVEL(PR, ("%% %ld ", pprow)); + PRLEVEL(PR, ("%% " LD " ", pprow)); ASSERT(pprow != 0); for (int64_t i = 1; i < num_panels; i++) { @@ -313,7 +313,7 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, { pprow = panel_row[i]; } - PRLEVEL(1, ("%ld ", panel_row[i])); + PRLEVEL(1, ("" LD " ", panel_row[i])); ASSERT(panel_row[i] > 0); ASSERT(panel_row[i] <= m); } @@ -327,21 +327,21 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, #ifndef NDEBUG /* Checking if pivotal rows are correct */ PRLEVEL(PR, ("%% panel_row: \n %%")); - for (int64_t i = 0; i < num_panels; i++) PRLEVEL(PR, ("%ld ", panel_row[i])); + for (int64_t i = 0; i < num_panels; i++) PRLEVEL(PR, ("" LD " ", panel_row[i])); PRLEVEL(PR, ("\n")); - PRLEVEL(PR, ("%%There are %ld rows x %ld columns %ld - %ld " - "in front %ld with %ld zero rows: \n%%", + PRLEVEL(PR, ("%%There are " LD " rows x " LD " columns " LD " - " LD " " + "in front " LD " with " LD " zero rows: \n%%", rowCount, fp, col1, col2, f, zero_piv_rows)); - for (int64_t i = 0; i < rowCount; i++) PRLEVEL(PR, (" %ld", frowList[i])); + for (int64_t i = 0; i < rowCount; i++) PRLEVEL(PR, (" " LD "", frowList[i])); PRLEVEL(PR, ("\n")); int64_t stl_rowSize = stl_rowSet.size(); if (rowCount != stl_rowSize) { - PRLEVEL(PR, ("%% STL %ld:\n", stl_rowSize)); + PRLEVEL(PR, ("%% STL " LD ":\n", stl_rowSize)); for (it = stl_rowSet.begin(); it != stl_rowSet.end(); it++) - PRLEVEL(PR, ("%% %ld", *it)); - PRLEVEL(PR, ("\n%%My Set %ld:\n", rowCount)); - for (int64_t i = 0; i < rowCount; i++) PRLEVEL(PR, ("%% %ld", frowList[i])); + PRLEVEL(PR, ("%% " LD "", *it)); + PRLEVEL(PR, ("\n%%My Set " LD ":\n", rowCount)); + for (int64_t i = 0; i < rowCount; i++) PRLEVEL(PR, ("%% " LD "", frowList[i])); PRLEVEL(PR, ("\n")); } ASSERT(rowCount == stl_rowSize); @@ -360,7 +360,7 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, if (sz != (size_t) rowCount) { PRLEVEL(1, ("ParU: 0ut of memory when tried to reallocate for frowList" - "part %ld\n", f)); + "part " LD "\n", f)); return PARU_OUT_OF_MEMORY; } @@ -370,21 +370,21 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, if (pivotalFront == NULL) { PRLEVEL(1, ("ParU: 0ut of memory when tried to allocate for pivotal " - "part %ld\n", f)); + "part " LD "\n", f)); return PARU_OUT_OF_MEMORY; } #ifndef NDEBUG Work->actual_alloc_LUs += rowCount * fp; Work->actual_alloc_row_int += rowCount; - if (fm != rowCount) PRLEVEL(PR, ("%% fm=%ld rowCount=%ld ", fm, rowCount)); - PRLEVEL(PR, ("%% LUs=%ld ", Work->actual_alloc_LUs)); - PRLEVEL(PR, ("%% pivotalFront = %p size=%ld", pivotalFront, rowCount * fp)); + if (fm != rowCount) PRLEVEL(PR, ("%% fm=" LD " rowCount=" LD " ", fm, rowCount)); + PRLEVEL(PR, ("%% LUs=" LD " ", Work->actual_alloc_LUs)); + PRLEVEL(PR, ("%% pivotalFront = %p size=" LD "", pivotalFront, rowCount * fp)); int64_t act = Work->actual_alloc_LUs + Work->actual_alloc_Us + Work->actual_alloc_row_int; int64_t upp = Sym->Us_bound_size + Sym->LUs_bound_size + Sym->row_Int_bound + Sym->col_Int_bound; - PRLEVEL(PR, ("%% MEM=%ld percent=%lf%%", act, 100.0 * act / upp)); - PRLEVEL(PR, ("%% MEM=%ld percent=%lf%%\n", act, 100.0 * act / upp)); + PRLEVEL(PR, ("%% MEM=" LD " percent=%lf%%", act, 100.0 * act / upp)); + PRLEVEL(PR, ("%% MEM=" LD " percent=%lf%%\n", act, 100.0 * act / upp)); #endif ParU_Factors *LUs = Num->partial_LUs; Num->frowCount[f] = rowCount; @@ -429,8 +429,8 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, if (ii < (int64_t)pivotal_elements.size()) { - PRLEVEL(PR, ("%% pivotal size was %ld ", pivotal_elements.size())); - PRLEVEL(PR, ("%% and now is %ld\n ", ii)); + PRLEVEL(PR, ("%% pivotal size was " LD " ", pivotal_elements.size())); + PRLEVEL(PR, ("%% and now is " LD "\n ", ii)); pivotal_elements.resize(ii); } @@ -476,7 +476,7 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, #ifndef NDEBUG if (el->nzr_pc == 0) { // all the zero rows fit in the front - PRLEVEL(1, ("%%element %ld totally fit in current front %ld\n", + PRLEVEL(1, ("%%element " LD " totally fit in current front " LD "\n", e, f)); num_children_with0_which_fit++; } @@ -492,37 +492,37 @@ ParU_Ret paru_pivotal(std::vector &pivotal_elements, #ifndef NDEBUG PR = 2; - PRLEVEL(PR, ("%% pivotal columns eli(%ld) after resizing: ", eli)); + PRLEVEL(PR, ("%% pivotal columns eli(" LD ") after resizing: ", eli)); for (int64_t i = 0; i < (int64_t)pivotal_elements.size(); i++) - PRLEVEL(PR, ("%ld ", pivotal_elements[i])); + PRLEVEL(PR, ("" LD " ", pivotal_elements[i])); PRLEVEL(PR, ("\n")); PR = 2; - PRLEVEL(PR, ("%% After all the assemble %ld, z=%ld\n", f, zero_piv_rows)); + PRLEVEL(PR, ("%% After all the assemble " LD ", z=" LD "\n", f, zero_piv_rows)); PRLEVEL(PR, ("%% x = \t")); - for (int64_t c = col1; c < col2; c++) PRLEVEL(PR, ("%ld\t\t", c)); + for (int64_t c = col1; c < col2; c++) PRLEVEL(PR, ("" LD "\t\t", c)); PRLEVEL(PR, (" ;\n")); for (int64_t r = 0; r < rowCount; r++) { - PRLEVEL(PR, ("%% %ld\t", frowList[r])); + PRLEVEL(PR, ("%% " LD "\t", frowList[r])); for (int64_t c = col1; c < col2; c++) PRLEVEL(PR, (" %2.5lf\t", pivotalFront[(c - col1) * rowCount + r])); PRLEVEL(PR, ("\n")); } - PRLEVEL(PR, (" %% %ld*%ld\n", rowCount, fp)); + PRLEVEL(PR, (" %% " LD "*" LD "\n", rowCount, fp)); PR = 2; - PRLEVEL(PR, ("x%ld = [ \t", f)); + PRLEVEL(PR, ("x" LD " = [ \t", f)); for (int64_t r = 0; r < rowCount; r++) { for (int64_t c = col1; c < col2; c++) PRLEVEL(PR, (" %2.5lf\t", pivotalFront[(c - col1) * rowCount + r])); PRLEVEL(PR, ("\n")); } - PRLEVEL(PR, (" ]; %% %ld*%ld\n", rowCount, fp)); + PRLEVEL(PR, (" ]; %% " LD "*" LD "\n", rowCount, fp)); PR = 1; #endif rowMarkp[eli] += rowCount; - PRLEVEL(1, ("%% rowMarkp[%ld] =%ld\n", eli, rowMarkp[eli])); + PRLEVEL(1, ("%% rowMarkp[" LD "] =" LD "\n", eli, rowMarkp[eli])); return PARU_SUCCESS; } diff --git a/ParU/Source/paru_prior_assemble.cpp b/ParU/Source/paru_prior_assemble.cpp index 3ffbfd4f5..5564621e2 100644 --- a/ParU/Source/paru_prior_assemble.cpp +++ b/ParU/Source/paru_prior_assemble.cpp @@ -32,8 +32,8 @@ ParU_Ret paru_prior_assemble(int64_t f, int64_t start_fac, #ifndef NDEBUG int64_t *elRow = Work->elRow; int64_t el_ind = snM[f]; - PRLEVEL(PR, ("%%Inside prior eli=%ld f=%ld\n", el_ind, f)); - PRLEVEL(PR, ("%% pivotal size is %ld ", pivotal_elements.size())); + PRLEVEL(PR, ("%%Inside prior eli=" LD " f=" LD "\n", el_ind, f)); + PRLEVEL(PR, ("%% pivotal size is " LD " ", pivotal_elements.size())); #endif int64_t ii = 0; @@ -42,15 +42,15 @@ ParU_Ret paru_prior_assemble(int64_t f, int64_t start_fac, { int64_t e = pivotal_elements[i]; paru_element *el = elementList[e]; - PRLEVEL(PR, ("%% element= %ld \n", e)); + PRLEVEL(PR, ("%% element= " LD " \n", e)); if (el == NULL) { - PRLEVEL(PR, ("%% element= %ld is NULL ii=%ld \n", e, ii)); + PRLEVEL(PR, ("%% element= " LD " is NULL ii=" LD " \n", e, ii)); continue; } #ifndef NDEBUG - PRLEVEL(PR, ("%%elRow[%ld]=%ld \n", e, elRow[e])); - // if (elRow[e] != 0) PRLEVEL(-1, ("%%elRow[%ld]=%ld \n", e, elRow[e])); + PRLEVEL(PR, ("%%elRow[" LD "]=" LD " \n", e, elRow[e])); + // if (elRow[e] != 0) PRLEVEL(-1, ("%%elRow[" LD "]=" LD " \n", e, elRow[e])); // ASSERT (elRow[e] == 0); #endif @@ -61,22 +61,22 @@ ParU_Ret paru_prior_assemble(int64_t f, int64_t start_fac, // both a pivotal column and pivotal row { #ifndef NDEBUG - PRLEVEL(PR, ("%%assembling %ld in %ld\n", e, el_ind)); - PRLEVEL(PR, ("%% size %ld x %ld\n", el->nrows, el->ncols)); + PRLEVEL(PR, ("%%assembling " LD " in " LD "\n", e, el_ind)); + PRLEVEL(PR, ("%% size " LD " x " LD "\n", el->nrows, el->ncols)); #endif paru_assemble_all(e, f, colHash, Work, Num); #ifndef NDEBUG - PRLEVEL(PR, ("%%assembling %ld in %ld done\n", e, el_ind)); + PRLEVEL(PR, ("%%assembling " LD " in " LD " done\n", e, el_ind)); #endif continue; } #ifndef NDEBUG - PRLEVEL(PR, ("%%assembling %ld in %ld\n", e, el_ind)); + PRLEVEL(PR, ("%%assembling " LD " in " LD "\n", e, el_ind)); #endif paru_assemble_cols(e, f, colHash, Work, Num); #ifndef NDEBUG - PRLEVEL(PR, ("%%partial col assembly%ld in %ld done\n", e, el_ind)); + PRLEVEL(PR, ("%%partial col assembly" LD " in " LD " done\n", e, el_ind)); #endif if (elementList[e] == NULL) continue; } @@ -103,7 +103,7 @@ ParU_Ret paru_prior_assemble(int64_t f, int64_t start_fac, paru_assemble_el_with0rows(e, f, colHash, Work, Num); if (elementList[e] == NULL) continue; #ifndef NDEBUG - PRLEVEL(PR, ("%%assembling %ld in %ld done\n", e, el_ind)); + PRLEVEL(PR, ("%%assembling " LD " in " LD " done\n", e, el_ind)); #endif } // keeping current element @@ -114,8 +114,8 @@ ParU_Ret paru_prior_assemble(int64_t f, int64_t start_fac, if (ii < (int64_t)pivotal_elements.size()) { - PRLEVEL(PR, ("%% Prior: size was %ld ", pivotal_elements.size())); - PRLEVEL(PR, (" and now is %ld\n ", ii)); + PRLEVEL(PR, ("%% Prior: size was " LD " ", pivotal_elements.size())); + PRLEVEL(PR, (" and now is " LD "\n ", ii)); pivotal_elements.resize(ii); } @@ -145,14 +145,14 @@ ParU_Ret paru_prior_assemble(int64_t f, int64_t start_fac, { int64_t ee = (*curHeap)[k]; paru_element *ell = elementList[ee]; - PRLEVEL(PR, ("%ld-%ld", k, ee)); + PRLEVEL(PR, ("" LD "-" LD "", k, ee)); if (ell != NULL) { - PRLEVEL(PR, ("(%ld) ", lacList[ee])); + PRLEVEL(PR, ("(" LD ") ", lacList[ee])); } else { - PRLEVEL(PR, ("(*%ld) ", lacList[ee])); + PRLEVEL(PR, ("(*" LD ") ", lacList[ee])); } } PRLEVEL(PR, ("\n")); @@ -166,8 +166,8 @@ ParU_Ret paru_prior_assemble(int64_t f, int64_t start_fac, int64_t pelid = (*curHeap)[(i - 1) / 2]; // parent id if (lacList[pelid] > lacList[elid]) { - PRLEVEL(PR, ("%ld-%ld(%ld) <", (i - 1) / 2, pelid, lacList[pelid])); - PRLEVEL(PR, ("%ld-%ld(%ld) \n", i, elid, lacList[elid])); + PRLEVEL(PR, ("" LD "-" LD "(" LD ") <", (i - 1) / 2, pelid, lacList[pelid])); + PRLEVEL(PR, ("" LD "-" LD "(" LD ") \n", i, elid, lacList[elid])); } ASSERT(lacList[pelid] <= lacList[elid]); } diff --git a/ParU/Source/paru_tuples.cpp b/ParU/Source/paru_tuples.cpp index ce103228b..431d219d6 100644 --- a/ParU/Source/paru_tuples.cpp +++ b/ParU/Source/paru_tuples.cpp @@ -20,7 +20,7 @@ ParU_Ret paru_add_rowTuple(paru_tupleList *RowList, int64_t row, paru_tuple T) { DEBUGLEVEL(0); - PRLEVEL(1, ("row =%ld, (%ld,%ld)\n", row, T.e, T.f)); + PRLEVEL(1, ("row =" LD ", (" LD "," LD ")\n", row, T.e, T.f)); paru_tupleList *cur = &RowList[row]; diff --git a/ParU/Source/paru_update_rel_ind.cpp b/ParU/Source/paru_update_rel_ind.cpp index 5291d4ab0..7a24aad37 100644 --- a/ParU/Source/paru_update_rel_ind.cpp +++ b/ParU/Source/paru_update_rel_ind.cpp @@ -20,7 +20,7 @@ void paru_update_rel_ind_col(int64_t e, int64_t f, // it might be for curent element or for the Upart therefore we might even // dont have the curEl DEBUGLEVEL(0); - PRLEVEL(1, ("%%update relative in %ld\n", f)); + PRLEVEL(1, ("%%update relative in " LD "\n", f)); paru_element **elementList = Work->elementList; paru_element *el = elementList[e]; @@ -44,13 +44,13 @@ void paru_update_rel_ind_col(int64_t e, int64_t f, colRelIndex[i] = -1; continue; } - PRLEVEL(1, ("%% searching for: cb_index[%ld]=%ld\n", i, colInd)); + PRLEVEL(1, ("%% searching for: cb_index[" LD "]=" LD "\n", i, colInd)); int64_t found = paru_find_hash(colInd, colHash, fcolList); colRelIndex[i] = found; ASSERT(found != -1); } - PRLEVEL(1, ("%%update relative in %ld finished\n", f)); + PRLEVEL(1, ("%%update relative in " LD " finished\n", f)); // update the cVal of el el->cValid = Work->time_stamp[f]; diff --git a/ParU/Source/paru_update_rowDeg.cpp b/ParU/Source/paru_update_rowDeg.cpp index a07c16c63..b06e53026 100644 --- a/ParU/Source/paru_update_rowDeg.cpp +++ b/ParU/Source/paru_update_rowDeg.cpp @@ -23,7 +23,7 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, int64_t n = Num->n; static int64_t r1 = 0, r2 = 0, r3 = 0; #endif - PRLEVEL(1, ("%%-------ROW degree update of panel %ld of front %ld \n", + PRLEVEL(1, ("%%-------ROW degree update of panel " LD " of front " LD " \n", panel_num, f)); ParU_Control *Control = Num->Control; int64_t panel_width = Control->panel_width; @@ -93,14 +93,14 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, int64_t curFsRow = frowList[i]; #ifndef NDEBUG int64_t curFsRowIndex = i; // current fully summed row index - PRLEVEL(1, ("%% 4: curFsRowIndex = %ld\n", curFsRowIndex)); - PRLEVEL(1, ("%% curFsRow =%ld\n", curFsRow)); + PRLEVEL(1, ("%% 4: curFsRowIndex = " LD "\n", curFsRowIndex)); + PRLEVEL(1, ("%% curFsRow =" LD "\n", curFsRow)); #endif paru_tupleList *curRowTupleList = &RowList[curFsRow]; int64_t numTuple = curRowTupleList->numTuple; ASSERT(numTuple >= 0); paru_tuple *listRowTuples = curRowTupleList->list; - PRLEVEL(1, ("%% 4: numTuple = %ld\n", numTuple)); + PRLEVEL(1, ("%% 4: numTuple = " LD "\n", numTuple)); int64_t pdst = 0, psrc; for (psrc = 0; psrc < numTuple; psrc++) @@ -136,35 +136,35 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, { // an element never seen before PRLEVEL( - 1, ("%%P: first time seen elRow[%ld]=%ld \n", e, elRow[e])); - PRLEVEL(1, ("%%pMark=%ld npMark= %ld\n", pMark, npMark)); + 1, ("%%P: first time seen elRow[" LD "]=" LD " \n", e, elRow[e])); + PRLEVEL(1, ("%%pMark=" LD " npMark= " LD "\n", pMark, npMark)); // if (el->rValid < pMark) if (npMark == pMark + 1) elRow[e] = el->nrowsleft - 1; // initiaze el->rValid = pMark; - PRLEVEL(1, ("%%changed to elRow[%ld]=%ld \n", e, elRow[e])); + PRLEVEL(1, ("%%changed to elRow[" LD "]=" LD " \n", e, elRow[e])); #ifndef NDEBUG if (el->rValid > pMark) - PRLEVEL(1, ("%%pMark=%ld rVal= %ld\n", pMark, el->rValid)); + PRLEVEL(1, ("%%pMark=" LD " rVal= " LD "\n", pMark, el->rValid)); #endif } else // el->rValid == pMark { // already added to pivotal rows if (npMark == pMark + 1) elRow[e]--; - PRLEVEL(1, ("%%already seen elRow[%ld]=%ld \n", e, elRow[e])); + PRLEVEL(1, ("%%already seen elRow[" LD "]=" LD " \n", e, elRow[e])); continue; } // int64_t *el_colIndex = colIndex_pointer (el); int64_t *el_colIndex = (int64_t *)(el + 1); - PRLEVEL(1, ("%% element= %ld nEl =%ld \n", e, nEl)); + PRLEVEL(1, ("%% element= " LD " nEl =" LD " \n", e, nEl)); for (int64_t cEl = 0; cEl < nEl; cEl++) { int64_t curCol = el_colIndex[cEl]; - PRLEVEL(1, ("%% curCol =%ld\n", curCol)); + PRLEVEL(1, ("%% curCol =" LD "\n", curCol)); ASSERT(curCol < n); if (curCol < 0) // already deleted @@ -188,7 +188,7 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, PR = 1; // stl_colSet.insert (curCol); for (std::set::iterator it = stl_colSet.begin(); it != stl_colSet.end(); it++) - PRLEVEL(PR, ("%%@ %ld", *it)); + PRLEVEL(PR, ("%%@ " LD "", *it)); #endif @@ -209,17 +209,17 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, #ifndef NDEBUG /* Checking if columns are correct */ PR = 1; - PRLEVEL(PR, ("%% There are %ld columns in this contribution block: \n", + PRLEVEL(PR, ("%% There are " LD " columns in this contribution block: \n", colCount)); PRLEVEL(PR, ("\n")); int64_t stl_colSize = stl_colSet.size(); if (colCount != stl_colSize) { - PRLEVEL(PR, ("%% STL %ld:\n", stl_colSize)); + PRLEVEL(PR, ("%% STL " LD ":\n", stl_colSize)); for (std::set::iterator it = stl_colSet.begin(); it != stl_colSet.end(); it++) - PRLEVEL(PR, ("%% %ld", *it)); - PRLEVEL(PR, ("\n%% My Set %ld:\n", colCount)); + PRLEVEL(PR, ("%% " LD "", *it)); + PRLEVEL(PR, ("\n%% My Set " LD ":\n", colCount)); PRLEVEL(PR, ("\n")); } ASSERT(colCount == stl_colSize); @@ -281,7 +281,7 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, //It seems that I keep pivotal_elements really clean before this //if (el == NULL) //{ // removing the element from the list - // PRLEVEL(1, ("%% eli = %ld, element= %ld \n", eli, e)); + // PRLEVEL(1, ("%% eli = " LD ", element= " LD " \n", eli, e)); // continue; //} //This next lines are also extra; I didn't have resize after them @@ -292,7 +292,7 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, ASSERT(el != NULL); #ifndef NDEBUG - PRLEVEL(PR, ("%% pivotal element= %ld lac=%ld colsleft=%ld \n", e, + PRLEVEL(PR, ("%% pivotal element= " LD " lac=" LD " colsleft=" LD " \n", e, el->lac, el->ncolsleft)); if (PR <= 0) paru_print_element(e, Work, Num); #endif @@ -358,7 +358,7 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, paru_tuple *listRowTuples = curRowTupleList->list; #ifndef NDEBUG int64_t PR = 1; - PRLEVEL(PR, ("\n %%----r =%ld numTuple = %ld\n", r, numTuple)); + PRLEVEL(PR, ("\n %%----r =" LD " numTuple = " LD "\n", r, numTuple)); if (PR <= 0) paru_print_paru_tupleList(RowList, r); #endif int64_t pdst = 0, psrc; @@ -387,20 +387,20 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, if (el->rValid == pMark) { // already a pivot and wont change the row degree elRow[e]--; - PRLEVEL(1, ("%% Pivotal elRow[%ld]=%ld \n", e, elRow[e])); + PRLEVEL(1, ("%% Pivotal elRow[" LD "]=" LD " \n", e, elRow[e])); } else if (el->rValid != npMark) { el->rValid = npMark; elRow[e] = el->nrowsleft - 1; // initiaze - PRLEVEL(1, ("%%rValid=%ld \n", el->rValid)); - PRLEVEL(1, ("%%NP: first time seen elRow[%ld]=%ld \n", e, + PRLEVEL(1, ("%%rValid=" LD " \n", el->rValid)); + PRLEVEL(1, ("%%NP: first time seen elRow[" LD "]=" LD " \n", e, elRow[e])); } else { // el->rValid == npMark //it has been seen in this stage elRow[e]--; - PRLEVEL(1, ("%%seen before: elRow[e]=%ld \n", elRow[e])); + PRLEVEL(1, ("%%seen before: elRow[e]=" LD " \n", elRow[e])); } } @@ -459,7 +459,7 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, #ifndef NDEBUG int64_t PR = 1; PRLEVEL(PR, - ("\n %%--------> 2nd r =%ld numTuple = %ld\n", r, numTuple)); + ("\n %%--------> 2nd r =" LD " numTuple = " LD "\n", r, numTuple)); if (PR <= 0) paru_print_paru_tupleList(RowList, r); #endif @@ -487,7 +487,7 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, if (el->rValid == pMark) { // already a pivot and wont change the row degree - PRLEVEL(1, ("%% Pivotal elRow[%ld]=%ld \n", e, elRow[e])); + PRLEVEL(1, ("%% Pivotal elRow[" LD "]=" LD " \n", e, elRow[e])); continue; } @@ -517,7 +517,7 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, } new_row_degree_bound_for_r += elCol[e]; - PRLEVEL(1, ("%% pMark=%ld npMark=%ld \n", pMark, npMark)); + PRLEVEL(1, ("%% pMark=" LD " npMark=" LD " \n", pMark, npMark)); } curRowTupleList->numTuple = pdst; @@ -525,10 +525,10 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, #ifndef NDEBUG PR = 1; - PRLEVEL(PR, ("%%old_bound_updated =%ld \n", old_bound_updated)); - PRLEVEL(PR, ("%%new_row_degree_bound_for_r=%ld \n", + PRLEVEL(PR, ("%%old_bound_updated =" LD " \n", old_bound_updated)); + PRLEVEL(PR, ("%%new_row_degree_bound_for_r=" LD " \n", new_row_degree_bound_for_r)); - PRLEVEL(PR, ("%%row_degroo_bound[%ld]=%ld \n", r, row_degree_bound[r])); + PRLEVEL(PR, ("%%row_degroo_bound[" LD "]=" LD " \n", r, row_degree_bound[r])); #endif row_degree_bound[r] = // min @@ -539,7 +539,7 @@ void paru_update_rowDeg(int64_t panel_num, int64_t row_end, int64_t f, Work->time_stamp[f] += 2; // making all the markings invalid again #ifndef NDEBUG - PRLEVEL(1, ("%% Finalized counters r1=%ld r2=%ld r3=%ld sum=%ld\n", r1, r2, + PRLEVEL(1, ("%% Finalized counters r1=" LD " r2=" LD " r3=" LD " sum=" LD "\n", r1, r2, r3, r1 + r2 + r3)); #endif } diff --git a/ParU/Source/paru_usolve.cpp b/ParU/Source/paru_usolve.cpp index 61cf1e300..02fddb6ca 100644 --- a/ParU/Source/paru_usolve.cpp +++ b/ParU/Source/paru_usolve.cpp @@ -112,7 +112,7 @@ ParU_Ret ParU_Usolve(ParU_Symbolic *Sym, ParU_Numeric *Num, // i_prod += A2[fp * j + i] * x[fcolList[j] + n1]; // } // int64_t r = Ps[frowList[i]] + n1; - // PRLEVEL(2, ("i_prod[%ld]=%lf r=%ld\n", i, i_prod, r)); + // PRLEVEL(2, ("i_prod[" LD "]=%lf r=" LD "\n", i, i_prod, r)); // x[r] -= i_prod; //} } @@ -141,23 +141,23 @@ ParU_Ret ParU_Usolve(ParU_Symbolic *Sym, ParU_Numeric *Num, { for (int64_t i = cs1 - 1; i >= 0; i--) { - PRLEVEL(PR, ("i = %ld\n", i)); + PRLEVEL(PR, ("i = " LD "\n", i)); int64_t *Sup = Sym->ustons.Sup; int64_t *Suj = Sym->ustons.Suj; double *Sux = Num->Sux; ASSERT(Suj != NULL && Sux != NULL && Sup != NULL); - PRLEVEL(PR, (" Before computation x[%ld]=%.2lf \n", i, x[i])) + PRLEVEL(PR, (" Before computation x[" LD "]=%.2lf \n", i, x[i])) for (int64_t p = Sup[i] + 1; p < Sup[i + 1]; p++) { int64_t r = Suj[p]; - PRLEVEL(PR, (" r=%ld\n", r)); + PRLEVEL(PR, (" r=" LD "\n", r)); x[i] -= Sux[p] * x[r]; - PRLEVEL(PR, ("Suj[%ld]=%ld\n", p, Suj[p])); - PRLEVEL(PR, (" x[%ld]=%.2lf x[%ld]=%.2lf\n", r, x[r], i, x[i])); + PRLEVEL(PR, ("Suj[" LD "]=" LD "\n", p, Suj[p])); + PRLEVEL(PR, (" x[" LD "]=%.2lf x[" LD "]=%.2lf\n", r, x[r], i, x[i])); } int64_t diag = Sup[i]; x[i] /= Sux[diag]; - PRLEVEL(PR, (" After computation x[%ld]=%.2lf \n", i, x[i])) + PRLEVEL(PR, (" After computation x[" LD "]=%.2lf \n", i, x[i])) PRLEVEL(PR, ("\n")); } } @@ -237,7 +237,7 @@ ParU_Ret ParU_Usolve(ParU_Symbolic *Sym, ParU_Numeric *Num, double *A2 = Us[f].p; if (A2 != NULL) { - PRLEVEL(2, ("%% mRHS usolve: Working on DGEMM f=%ld\n%%", f)); + PRLEVEL(2, ("%% mRHS usolve: Working on DGEMM f=" LD "\n%%", f)); double *Xg = &work[0] + fp * nrhs; // size Xg is colCount x nrhs for (int64_t j = 0; j < colCount; j++) // gathering X in Xg { @@ -276,7 +276,7 @@ ParU_Ret ParU_Usolve(ParU_Symbolic *Sym, ParU_Numeric *Num, // int64_t r = Ps[frowList[i]] + n1; // for (int64_t l = 0; l < nrhs; l++) // { - // PRLEVEL(2, ("i_prod[%ld]=%lf r=%ld\nrhs", i, i_prod[i], r)); + // PRLEVEL(2, ("i_prod[" LD "]=%lf r=" LD "\nrhs", i, i_prod[i], r)); // X[l*m+r] -= i_prod[l]; // } //} @@ -298,7 +298,7 @@ ParU_Ret ParU_Usolve(ParU_Symbolic *Sym, ParU_Numeric *Num, { for (int64_t i = cs1 - 1; i >= 0; i--) { - PRLEVEL(PR, ("i = %ld\n", i)); + PRLEVEL(PR, ("i = " LD "\n", i)); int64_t *Sup = Sym->ustons.Sup; int64_t *Suj = Sym->ustons.Suj; double *Sux = Num->Sux; @@ -306,7 +306,7 @@ ParU_Ret ParU_Usolve(ParU_Symbolic *Sym, ParU_Numeric *Num, for (int64_t p = Sup[i] + 1; p < Sup[i + 1]; p++) { int64_t r = Suj[p]; - PRLEVEL(PR, (" r=%ld\n", r)); + PRLEVEL(PR, (" r=" LD "\n", r)); #pragma omp simd for (int64_t l = 0; l < nrhs; l++) {