Fix some typos in .jobs and memory issues (#406)
This PR addresses #404. Includes the typo fixes, and changes to .saved due to inclusion of -ns 2. Also, fixed the memory issues after fixing the .jobs Co-authored-by: Ruipeng Li <li50@llnl.gov> Co-authored-by: li50@llnl.gov <liruipengblue@gmail.com>
This commit is contained in:
parent
cb0c70b163
commit
4346579e03
@ -2360,30 +2360,35 @@ hypre_BoomerAMGSetup( void *amg_vdata,
|
|||||||
{
|
{
|
||||||
if (mult_addlvl > -1 && level >= mult_addlvl && level <= add_end)
|
if (mult_addlvl > -1 && level >= mult_addlvl && level <= add_end)
|
||||||
{
|
{
|
||||||
hypre_Vector *d_diag = hypre_SeqVectorCreate(hypre_ParCSRMatrixNumRows(A_array[level]));
|
hypre_Vector *d_diag = NULL;
|
||||||
|
|
||||||
if (add_rlx == 0)
|
if (ns == 1)
|
||||||
{
|
{
|
||||||
hypre_CSRMatrix *lvl_Adiag = hypre_ParCSRMatrixDiag(A_array[level]);
|
d_diag = hypre_SeqVectorCreate(hypre_ParCSRMatrixNumRows(A_array[level]));
|
||||||
HYPRE_Int lvl_nrows = hypre_CSRMatrixNumRows(lvl_Adiag);
|
|
||||||
HYPRE_Int *lvl_i = hypre_CSRMatrixI(lvl_Adiag);
|
if (add_rlx == 0)
|
||||||
HYPRE_Real *lvl_data = hypre_CSRMatrixData(lvl_Adiag);
|
|
||||||
HYPRE_Real w_inv = 1.0 / add_rlx_wt;
|
|
||||||
/*HYPRE_Real w_inv = 1.0/hypre_ParAMGDataRelaxWeight(amg_data)[level];*/
|
|
||||||
hypre_SeqVectorInitialize_v2(d_diag, HYPRE_MEMORY_HOST);
|
|
||||||
for (i=0; i < lvl_nrows; i++)
|
|
||||||
{
|
{
|
||||||
hypre_VectorData(d_diag)[i] = lvl_data[lvl_i[i]] * w_inv;
|
hypre_CSRMatrix *lvl_Adiag = hypre_ParCSRMatrixDiag(A_array[level]);
|
||||||
|
HYPRE_Int lvl_nrows = hypre_CSRMatrixNumRows(lvl_Adiag);
|
||||||
|
HYPRE_Int *lvl_i = hypre_CSRMatrixI(lvl_Adiag);
|
||||||
|
HYPRE_Real *lvl_data = hypre_CSRMatrixData(lvl_Adiag);
|
||||||
|
HYPRE_Real w_inv = 1.0 / add_rlx_wt;
|
||||||
|
/*HYPRE_Real w_inv = 1.0/hypre_ParAMGDataRelaxWeight(amg_data)[level];*/
|
||||||
|
hypre_SeqVectorInitialize_v2(d_diag, HYPRE_MEMORY_HOST);
|
||||||
|
for (i=0; i < lvl_nrows; i++)
|
||||||
|
{
|
||||||
|
hypre_VectorData(d_diag)[i] = lvl_data[lvl_i[i]] * w_inv;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
HYPRE_Real *d_diag_data = NULL;
|
||||||
HYPRE_Real *d_diag_data = NULL;
|
|
||||||
|
|
||||||
hypre_ParCSRComputeL1Norms(A_array[level], 1, NULL, &d_diag_data);
|
hypre_ParCSRComputeL1Norms(A_array[level], 1, NULL, &d_diag_data);
|
||||||
|
|
||||||
hypre_VectorData(d_diag) = d_diag_data;
|
hypre_VectorData(d_diag) = d_diag_data;
|
||||||
hypre_SeqVectorInitialize_v2(d_diag, hypre_ParCSRMatrixMemoryLocation(A_array[level]));
|
hypre_SeqVectorInitialize_v2(d_diag, hypre_ParCSRMatrixMemoryLocation(A_array[level]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HYPRE_ANNOTATE_REGION_BEGIN("%s", "RAP");
|
HYPRE_ANNOTATE_REGION_BEGIN("%s", "RAP");
|
||||||
@ -2413,7 +2418,7 @@ hypre_BoomerAMGSetup( void *amg_vdata,
|
|||||||
if (nongal_tol_array) nongalerk_tol_l = nongal_tol_array[level];
|
if (nongal_tol_array) nongalerk_tol_l = nongal_tol_array[level];
|
||||||
if (nongalerk_tol_l > 0.0)
|
if (nongalerk_tol_l > 0.0)
|
||||||
{
|
{
|
||||||
/* Build Non-Galerkin Coarse Grid */
|
/* Build Non-Galerkin Coarse Grid */
|
||||||
hypre_ParCSRMatrix *Q = NULL;
|
hypre_ParCSRMatrix *Q = NULL;
|
||||||
hypre_BoomerAMGBuildNonGalerkinCoarseOperator(&A_H, Q,
|
hypre_BoomerAMGBuildNonGalerkinCoarseOperator(&A_H, Q,
|
||||||
0.333*strong_threshold, max_row_sum, num_functions,
|
0.333*strong_threshold, max_row_sum, num_functions,
|
||||||
@ -2444,15 +2449,18 @@ hypre_BoomerAMGSetup( void *amg_vdata,
|
|||||||
hypre_ParCSRMatrix *Q = NULL;
|
hypre_ParCSRMatrix *Q = NULL;
|
||||||
if (hypre_ParAMGDataModularizedMatMat(amg_data))
|
if (hypre_ParAMGDataModularizedMatMat(amg_data))
|
||||||
{
|
{
|
||||||
Q = hypre_ParCSRMatMat(A_array[level],P_array[level]);
|
Q = hypre_ParCSRMatMat(A_array[level], P);
|
||||||
A_H = hypre_ParCSRTMatMatKT(P_array[level],Q,keepTranspose);
|
A_H = hypre_ParCSRTMatMatKT(P, Q, keepTranspose);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Q = hypre_ParMatmul(A_array[level],P_array[level]);
|
Q = hypre_ParMatmul(A_array[level], P);
|
||||||
A_H = hypre_ParTMatmul(P_array[level],Q);
|
A_H = hypre_ParTMatmul(P, Q);
|
||||||
|
}
|
||||||
|
if (num_procs > 1)
|
||||||
|
{
|
||||||
|
hypre_MatvecCommPkgCreate(A_H);
|
||||||
}
|
}
|
||||||
if (num_procs > 1) hypre_MatvecCommPkgCreate(A_H);
|
|
||||||
|
|
||||||
/* Build Non-Galerkin Coarse Grid */
|
/* Build Non-Galerkin Coarse Grid */
|
||||||
hypre_BoomerAMGBuildNonGalerkinCoarseOperator(&A_H, Q,
|
hypre_BoomerAMGBuildNonGalerkinCoarseOperator(&A_H, Q,
|
||||||
@ -2462,7 +2470,9 @@ hypre_BoomerAMGSetup( void *amg_vdata,
|
|||||||
nongalerk_tol_l, 1, 0.5, 1.0 );
|
nongalerk_tol_l, 1, 0.5, 1.0 );
|
||||||
|
|
||||||
if (!hypre_ParCSRMatrixCommPkg(A_H))
|
if (!hypre_ParCSRMatrixCommPkg(A_H))
|
||||||
|
{
|
||||||
hypre_MatvecCommPkgCreate(A_H);
|
hypre_MatvecCommPkgCreate(A_H);
|
||||||
|
}
|
||||||
|
|
||||||
/* Delete AP */
|
/* Delete AP */
|
||||||
hypre_ParCSRMatrixDestroy(Q);
|
hypre_ParCSRMatrixDestroy(Q);
|
||||||
@ -2473,15 +2483,19 @@ hypre_BoomerAMGSetup( void *amg_vdata,
|
|||||||
hypre_ParCSRMatrix *Q = NULL;
|
hypre_ParCSRMatrix *Q = NULL;
|
||||||
if (hypre_ParAMGDataModularizedMatMat(amg_data))
|
if (hypre_ParAMGDataModularizedMatMat(amg_data))
|
||||||
{
|
{
|
||||||
Q = hypre_ParCSRMatMat(A_array[level],P_array[level]);
|
Q = hypre_ParCSRMatMat(A_array[level], P);
|
||||||
A_H = hypre_ParCSRTMatMatKT(P_array[level],Q,keepTranspose);
|
A_H = hypre_ParCSRTMatMatKT(P, Q, keepTranspose);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Q = hypre_ParMatmul(A_array[level],P_array[level]);
|
Q = hypre_ParMatmul(A_array[level], P);
|
||||||
A_H = hypre_ParTMatmul(P_array[level],Q);
|
A_H = hypre_ParTMatmul(P, Q);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (num_procs > 1)
|
||||||
|
{
|
||||||
|
hypre_MatvecCommPkgCreate(A_H);
|
||||||
}
|
}
|
||||||
if (num_procs > 1) hypre_MatvecCommPkgCreate(A_H);
|
|
||||||
/* Delete AP */
|
/* Delete AP */
|
||||||
hypre_ParCSRMatrixDestroy(Q);
|
hypre_ParCSRMatrixDestroy(Q);
|
||||||
}
|
}
|
||||||
@ -2530,7 +2544,7 @@ hypre_BoomerAMGSetup( void *amg_vdata,
|
|||||||
Pnew = Ptmp;
|
Pnew = Ptmp;
|
||||||
P_array[level] = Pnew;
|
P_array[level] = Pnew;
|
||||||
hypre_ParCSRMatrixDestroy(C);
|
hypre_ParCSRMatrixDestroy(C);
|
||||||
}
|
} /* if (ns == 1) */
|
||||||
HYPRE_ANNOTATE_REGION_END("%s", "RAP");
|
HYPRE_ANNOTATE_REGION_END("%s", "RAP");
|
||||||
|
|
||||||
if (add_P_max_elmts || add_trunc_factor)
|
if (add_P_max_elmts || add_trunc_factor)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ mpirun -np 2 ./ij -rhsrand > matrix.out.0
|
|||||||
|
|
||||||
mpirun -np 2 ./ij -rhsrand -exact_size > matrix.out.1
|
mpirun -np 2 ./ij -rhsrand -exact_size > matrix.out.1
|
||||||
|
|
||||||
mpirun -np 2 ./ij -rhsrand -low_storage > matrix.out.2
|
mpirun -np 2 ./ij -rhsrand -storage_low > matrix.out.2
|
||||||
|
|
||||||
mpirun -np 4 ./ij -fromfile A_tstoffd -rhsfromfile b_tstoffd > matrix.out.3
|
mpirun -np 4 ./ij -fromfile A_tstoffd -rhsfromfile b_tstoffd > matrix.out.3
|
||||||
|
|
||||||
|
|||||||
@ -84,8 +84,8 @@ mpirun -np 4 ./ij -rhsrand -solver 1 -rlx 16 -cheby_variant 1 -n 20 20 20 \
|
|||||||
mpirun -np 4 ./ij -solver 3 -rlx 16 -cheby_eig_est 0 -n 40 40 20 \
|
mpirun -np 4 ./ij -solver 3 -rlx 16 -cheby_eig_est 0 -n 40 40 20 \
|
||||||
-P 2 2 1 -difconv -a 10 10 10 > smoother.out.18
|
-P 2 2 1 -difconv -a 10 10 10 > smoother.out.18
|
||||||
|
|
||||||
mpirun -np 4 ./ij -rhsrand -solver 1 -rlx 16 -rotate -alpha 60 -eps 0.1 -cheby_fraction 0.2 -n 200 200 \
|
mpirun -np 4 ./ij -rhsrand -solver 1 -rlx 16 -rotate -alpha 60 -eps 0.1 -cheby_fraction 0.2 -n 200 200 1 \
|
||||||
-P 2 2 > smoother.out.19
|
-P 2 2 1 > smoother.out.19
|
||||||
|
|
||||||
mpirun -np 4 ./ij -solver 1 -rlx 16 -cheby_eig_est 5 -n 40 40 20 \
|
mpirun -np 4 ./ij -solver 1 -rlx 16 -cheby_eig_est 5 -n 40 40 20 \
|
||||||
-P 2 2 1 -vardifconv -eps 0.1 > smoother.out.20
|
-P 2 2 1 -vardifconv -eps 0.1 > smoother.out.20
|
||||||
|
|||||||
@ -76,7 +76,9 @@ mpirun -np 4 ./ij -n 20 20 20 -P 2 2 1 -agg_nl 1 -solver 1 -simple 0 > solvers.o
|
|||||||
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -additive 1 > solvers.out.112
|
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -additive 1 > solvers.out.112
|
||||||
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -mult_add 0 -add_Pmx 5 > solvers.out.113
|
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -mult_add 0 -add_Pmx 5 > solvers.out.113
|
||||||
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -mult_add 0 -add_Pmx 5 -add_end 2 > solvers.out.118
|
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -mult_add 0 -add_Pmx 5 -add_end 2 > solvers.out.118
|
||||||
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -mult_add 0 ns 2 > solvers.out.119
|
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -mult_add 0 -ns 2 > solvers.out.119
|
||||||
|
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -mult_add 0 -ns 1 > solvers.out.121
|
||||||
|
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -mult_add 0 -ns 2 -rap 1 > solvers.out.122
|
||||||
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -rlx 18 -ns 2 -rlx_coarse 18 -ns_coarse 2 > solvers.out.120
|
mpirun -np 8 ./ij -n 20 20 20 -P 2 2 2 -agg_nl 1 -solver 3 -rlx 18 -ns 2 -rlx_coarse 18 -ns_coarse 2 > solvers.out.120
|
||||||
|
|
||||||
#nonGalerkin version
|
#nonGalerkin version
|
||||||
|
|||||||
@ -182,9 +182,17 @@ GMRES Iterations = 25
|
|||||||
Final GMRES Relative Residual Norm = 9.464475e-09
|
Final GMRES Relative Residual Norm = 9.464475e-09
|
||||||
|
|
||||||
# Output file: solvers.out.119
|
# Output file: solvers.out.119
|
||||||
|
GMRES Iterations = 17
|
||||||
|
Final GMRES Relative Residual Norm = 3.995718e-09
|
||||||
|
|
||||||
|
# Output file: solvers.out.121
|
||||||
GMRES Iterations = 23
|
GMRES Iterations = 23
|
||||||
Final GMRES Relative Residual Norm = 9.269997e-09
|
Final GMRES Relative Residual Norm = 9.269997e-09
|
||||||
|
|
||||||
|
# Output file: solvers.out.122
|
||||||
|
GMRES Iterations = 17
|
||||||
|
Final GMRES Relative Residual Norm = 3.995718e-09
|
||||||
|
|
||||||
# Output file: solvers.out.120
|
# Output file: solvers.out.120
|
||||||
GMRES Iterations = 17
|
GMRES Iterations = 17
|
||||||
Final GMRES Relative Residual Norm = 3.995718e-09
|
Final GMRES Relative Residual Norm = 3.995718e-09
|
||||||
@ -348,3 +356,4 @@ Final Relative Residual Norm = 8.380440e-09
|
|||||||
# Output file: solvers.out.325
|
# Output file: solvers.out.325
|
||||||
BoomerAMG Iterations = 7
|
BoomerAMG Iterations = 7
|
||||||
Final Relative Residual Norm = 7.074639e-09
|
Final Relative Residual Norm = 7.074639e-09
|
||||||
|
|
||||||
|
|||||||
@ -182,9 +182,17 @@ GMRES Iterations = 26
|
|||||||
Final GMRES Relative Residual Norm = 7.016568e-09
|
Final GMRES Relative Residual Norm = 7.016568e-09
|
||||||
|
|
||||||
# Output file: solvers.out.119
|
# Output file: solvers.out.119
|
||||||
|
GMRES Iterations = 19
|
||||||
|
Final GMRES Relative Residual Norm = 7.360379e-09
|
||||||
|
|
||||||
|
# Output file: solvers.out.121
|
||||||
GMRES Iterations = 25
|
GMRES Iterations = 25
|
||||||
Final GMRES Relative Residual Norm = 7.626488e-09
|
Final GMRES Relative Residual Norm = 7.626488e-09
|
||||||
|
|
||||||
|
# Output file: solvers.out.122
|
||||||
|
GMRES Iterations = 19
|
||||||
|
Final GMRES Relative Residual Norm = 7.360379e-09
|
||||||
|
|
||||||
# Output file: solvers.out.120
|
# Output file: solvers.out.120
|
||||||
GMRES Iterations = 19
|
GMRES Iterations = 19
|
||||||
Final GMRES Relative Residual Norm = 8.927610e-09
|
Final GMRES Relative Residual Norm = 8.927610e-09
|
||||||
|
|||||||
@ -143,6 +143,8 @@ FILES="\
|
|||||||
${TNAME}.out.117\
|
${TNAME}.out.117\
|
||||||
${TNAME}.out.118\
|
${TNAME}.out.118\
|
||||||
${TNAME}.out.119\
|
${TNAME}.out.119\
|
||||||
|
${TNAME}.out.121\
|
||||||
|
${TNAME}.out.122\
|
||||||
${TNAME}.out.120\
|
${TNAME}.out.120\
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user