Skip to content

Commit

Permalink
Use spmScalMat and spmScal
Browse files Browse the repository at this point in the history
Always set runtime path for Pastix
  • Loading branch information
octave-user committed Aug 18, 2024
1 parent 3f6be23 commit 00f321b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ LAPACK_LIBS="${LAPACK_LIBS:-`${PKG_CONFIG} --libs lapack`}"
LAPACK_LIBS="${LAPACK_LIBS:--llapack}"
STRUMPACK_LIBS="${STRUMPACK_LIBS:--lstrumpack -lscotch -lmetis -lscotcherr -lscotcherrexit -lopenblas -lgomp -lz}"
PASTIX_INC="${PASTIX_INC:-`${PKG_CONFIG} --cflags pastix`}"
PASTIX_LIBS="${PASTIX_LIBS:-`${PKG_CONFIG} --libs pastix`}"
PASTIX_LIBS="${PASTIX_LIBS:-`${PKG_CONFIG} --libs pastix` `${PKG_CONFIG} --libs-only-L pastix | sed 's/-L\//-Wl,-rpath=\//g'`}"
PASTIX_LIBS="${PASTIX_LIBS:--lpastix -lpastix_kernels -lspm -lhwloc}"
PARDISO_INC="${PARDISO_INC:-`${PKG_CONFIG} --cflags mkl-dynamic-lp64-gomp`}"
PARDISO_LIBS="${PARDISO_LIBS:-`${PKG_CONFIG} --libs mkl-dynamic-lp64-gomp`}"
Expand Down
4 changes: 2 additions & 2 deletions src/pastix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ PastixObject<T>::PastixObject(const SparseMatrixType& A, const Options& options)

normA = spmNorm(SpmFrobeniusNorm, &spm);

spmScalMatrix(1. / normA, &spm);
spmScal(1. / normA, &spm);

rc = pastix_task_numfact(pastix_data, &spm);

Expand Down Expand Up @@ -429,7 +429,7 @@ bool PastixObject<T>::solve(DenseMatrixType& b, DenseMatrixType& x, pastix_trans
return false;
}

spmScalVector(spm.flttype, 1. / normA, b.numel(), b.fortran_vec(), 1);
spmScalMat(1. / normA, &spm, b.columns(), b.fortran_vec(), b.rows());

x = b;

Expand Down

0 comments on commit 00f321b

Please sign in to comment.