Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate 8 build warnings (Visual Studio) #572

Merged
merged 1 commit into from
Feb 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions src/VendorChecks/test/tstSuperludist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void test_superludist(rtt_c4::ParallelUnitTest &ut) {
}

//---------------------------------------------------------------------------//
// Load the matirx from file and setup the RHS.
// Load the matrix from file and setup the RHS.
//---------------------------------------------------------------------------//

dcreate_matrix(&A, nrhs, &b, &ldb, &xtrue, &ldx, fp, &grid);
Expand Down Expand Up @@ -322,9 +322,9 @@ int dcreate_matrix(SuperMatrix *A, int nrhs, double **rhs, int *ldb, double **x,
/* Compute the number of rows to be distributed to local process */
m_loc = m / (grid->nprow * grid->npcol);
m_loc_fst = m_loc;
/* When m / procs is not an integer */
/* When m / procsessors is not an integer */
if ((m_loc * grid->nprow * grid->npcol) != m) {
if (iam == (grid->nprow * grid->npcol - 1)) /* last proc. gets all*/
if (iam == (grid->nprow * grid->npcol - 1)) /* last processor gets all*/
m_loc = m - m_loc * (grid->nprow * grid->npcol - 1);
}

Expand All @@ -333,9 +333,11 @@ int dcreate_matrix(SuperMatrix *A, int nrhs, double **rhs, int *ldb, double **x,
SLU_D, SLU_GE);

/* Generate the exact solution and compute the right-hand side. */
if (!(b_global = doubleMalloc_dist(m * nrhs)))
b_global = doubleMalloc_dist(m * nrhs);
if (!b_global)
ABORT("Malloc fails for b[]");
if (!(xtrue_global = doubleMalloc_dist(n * nrhs)))
xtrue_global = doubleMalloc_dist(n * nrhs);
if (!xtrue_global)
ABORT("Malloc fails for xtrue[]");
*trans = 'N';

Expand Down Expand Up @@ -394,7 +396,8 @@ int dcreate_matrix(SuperMatrix *A, int nrhs, double **rhs, int *ldb, double **x,
colind, rowptr, SLU_NR_loc, SLU_D, SLU_GE);

/* Get the local B */
if (!((*rhs) = doubleMalloc_dist(m_loc * nrhs)))
(*rhs) = doubleMalloc_dist(m_loc * nrhs);
if (!rhs)
ABORT("Malloc fails for rhs[]");
for (j = 0; j < nrhs; ++j) {
for (i = 0; i < m_loc; ++i) {
Expand All @@ -406,7 +409,8 @@ int dcreate_matrix(SuperMatrix *A, int nrhs, double **rhs, int *ldb, double **x,

/* Set the true X */
*ldx = m_loc;
if (!((*x) = doubleMalloc_dist(*ldx * nrhs)))
(*x) = doubleMalloc_dist(*ldx * nrhs);
if (!(x))
ABORT("Malloc fails for x_loc[]");

/* Get the local part of xtrue_global */
Expand Down