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

Amesos - fix CSparse class. #12234

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
6 changes: 3 additions & 3 deletions packages/amesos/src/Amesos_CSparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
// ***********************************************************************
// @HEADER

#ifdef HAVE_AMESOS_CSPARSE
#include "Amesos_CSparse.h"
#ifdef HAVE_AMESOS_CSPARSE
#include "Epetra_Map.h"
#include "Epetra_Import.h"
#include "Epetra_CrsMatrix.h"
Expand Down Expand Up @@ -134,8 +134,8 @@ int Amesos_CSparse::ConvertToCSparse()

if (Comm().MyPID() == 0)
{
csMatrix.p = (ptrdiff_t *) malloc((SerialMatrix().NumMyRows()+1)*sizeof(ptrdiff_t));
csMatrix.i = (ptrdiff_t *) malloc(SerialMatrix().NumMyNonzeros()*sizeof(ptrdiff_t));
csMatrix.p = (int*)(ptrdiff_t *) malloc((SerialMatrix().NumMyRows()+1)*sizeof(ptrdiff_t));
csMatrix.i = (int*)(ptrdiff_t *) malloc(SerialMatrix().NumMyNonzeros()*sizeof(ptrdiff_t));
csMatrix.x = (double *) malloc(SerialMatrix().NumMyNonzeros()*sizeof(double));
csMatrix.nzmax = SerialMatrix().NumMyNonzeros();
csMatrix.m = SerialMatrix().NumMyRows();
Expand Down
2 changes: 1 addition & 1 deletion packages/amesos/src/Amesos_CSparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

#ifndef AMESOS_CSPARSE_H
#define AMESOS_CSPARSE_H
#ifdef HAVE_AMESOS_CSPARSE

#include "Amesos_ConfigDefs.h"
#ifdef HAVE_AMESOS_CSPARSE
#include "Amesos_BaseSolver.h"
#include "Amesos_NoCopiable.h"
#include "Amesos_Utils.h"
Expand Down