Mentions légales du service

Skip to content
Snippets Groups Projects
Commit de69e8b7 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Fix issue with Fortran interface

parent 5907077f
Branches
Tags
No related merge requests found
Showing with 227 additions and 383 deletions
......@@ -4,7 +4,7 @@ stages:
- build
- test
- sonar
# - doc
# - deploy
build_spm:
stage: build
......@@ -16,7 +16,7 @@ build_spm:
- git submodule update --init --recursive
- mkdir build
- cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}/../install -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_C_FLAGS="-O0 -g -fPIC --coverage -Wall -fdiagnostics-show-option -fno-inline" -DCMAKE_EXE_LINKER_FLAGS="--coverage" -DPASTIX_INT64=OFF
- cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}/../install -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_C_FLAGS="-O0 -g -fPIC --coverage -Wall -fdiagnostics-show-option -fno-inline" -DCMAKE_EXE_LINKER_FLAGS="--coverage" -DSPM_INT64=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- make -j 4 | tee ../pastix-build.log
- make install | tee -a ../pastix-build.log
only:
......@@ -34,6 +34,7 @@ test_spm:
- spm.lcov
- spm-gcov.log
script:
- git submodule update --init --recursive
- source install/bin/spm_env.sh
- (cd build &&
eval "ctest
......@@ -68,9 +69,12 @@ sonar_spm:
- master@solverstack/spm
# pages:
# stage: doc
# stage: deploy
# dependencies:
# - build_spm
# artifacts:
# paths:
# - public
# script:
# - git submodule update --init --recursive
# - mkdir -p build
......@@ -78,9 +82,6 @@ sonar_spm:
# - cmake .. -DBUILD_DOCUMENTATION=ON -DSPM_INT64=OFF
# - make docs
# - mv docs/out/html ../public/
# artifacts:
# paths:
# - public
# only:
# - master@solverstack/spm
......@@ -249,9 +249,17 @@ install(FILES
DESTINATION include )
### Build pkg-config and environment file
include(GenSPMPkgConfig)
spm_generate_pkgconfig_file()
spm_generate_env_file()
include(GenPkgConfig)
list(APPEND SPM_PKGCONFIG_LIBS_PRIVATE
${LAPACKE_LIBRARIES_DEP}
${CBLAS_LIBRARIES_DEP}
)
generate_pkgconfig_files(
"${CMAKE_CURRENT_SOURCE_DIR}/tools/spm.pc.in"
"${CMAKE_CURRENT_SOURCE_DIR}/tools/spmf.pc.in"
PROJECTNAME SPM )
generate_env_file( PROJECTNAME SPM )
### Add documented files to the global property
add_documented_files(
......
###
#
# @copyright (c) 2009-2014 The University of Tennessee and The University
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2017 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
#
# @file GenPkgConfig.cmake
#
# @project MORSE
# MORSE is a software package provided by:
# Inria Bordeaux - Sud-Ouest,
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
#
# @version 0.9.1
# @author Cedric Castagnede
# @author Emmanuel Agullo
# @author Mathieu Faverge
# @author Florent Pruvost
# @date 10-11-2014
#
###
###
#
# CONVERT_LIBSTYLE_TO_PKGCONFIG: convert a libraries list to follow the pkg-config style
# used in CLEAN_LIB_LIST
#
###
# macro(CONVERT_LIBSTYLE_TO_PKGCONFIG _liblist)
# set(${_liblist}_CPY "${${_liblist}}")
# set(${_liblist} "")
# foreach(_dep ${${_liblist}_CPY})
# if (${_dep} MATCHES "^/")
# get_filename_component(dep_libname ${_dep} NAME)
# get_filename_component(dep_libdir ${_dep} DIRECTORY)
# string(REPLACE "lib" "" dep_libname "${dep_libname}")
# string(REPLACE ".so" "" dep_libname "${dep_libname}")
# string(REPLACE ".a" "" dep_libname "${dep_libname}")
# string(REPLACE ".dylib" "" dep_libname "${dep_libname}")
# string(REPLACE ".dll" "" dep_libname "${dep_libname}")
# list(APPEND ${_liblist} -L${dep_libdir} -l${dep_libname})
# elseif(NOT ${_dep} MATCHES "^-")
# list(APPEND ${_liblist} "-l${_dep}")
# else()
# list(APPEND ${_liblist} ${_dep})
# endif()
# endforeach()
# endmacro(CONVERT_LIBSTYLE_TO_PKGCONFIG)
###
#
# CLEAN_LIB_LIST: clean libraries lists to follow the pkg-config style
# used in GENERATE_PKGCONFIG_FILE
#
###
#macro(CLEAN_LIB_LIST _package)
# list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_LIBS)
# list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_LIBS_PRIVATE)
# list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_REQUIRED)
# list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_REQUIRED_PRIVATE)
# convert_libstyle_to_pkgconfig(${_package}_PKGCONFIG_LIBS)
# convert_libstyle_to_pkgconfig(${_package}_PKGCONFIG_LIBS_PRIVATE)
# string(REPLACE ";" " " ${_package}_PKGCONFIG_LIBS "${${_package}_PKGCONFIG_LIBS}")
# string(REPLACE ";" " " ${_package}_PKGCONFIG_LIBS_PRIVATE "${${_package}_PKGCONFIG_LIBS_PRIVATE}")
# string(REPLACE ";" " " ${_package}_PKGCONFIG_REQUIRED "${${_package}_PKGCONFIG_REQUIRED}")
# string(REPLACE ";" " " ${_package}_PKGCONFIG_REQUIRED_PRIVATE "${${_package}_PKGCONFIG_REQUIRED_PRIVATE}")
#endmacro(CLEAN_LIB_LIST)
###
#
# GENERATE_PKGCONFIG_FILE: generate files spm.pc
#
###
macro(spm_generate_pkgconfig_file)
set(SPM_PKGCONFIG_LIBS "-lspm")
set(SPM_PKGCONFIG_LIBS_PRIVATE "-lm")
set(SPM_PKGCONFIG_REQUIRED "")
set(SPM_PKGCONFIG_REQUIRED_PRIVATE "")
#clean_lib_list(SPM)
set(_output_spm_file "${CMAKE_BINARY_DIR}/spm.pc")
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/tools/spm.pc.in"
"${_output_spm_file}"
@ONLY
)
install(
FILES ${_output_spm_file}
DESTINATION lib/pkgconfig
)
endmacro(spm_generate_pkgconfig_file)
###
#
# generate_env_file: generate files pastix.pc
#
###
macro(spm_generate_env_file)
# Create .sh file
# ---------------
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/tools/spm_env.sh.in"
"${CMAKE_BINARY_DIR}/bin/spm_env.sh" @ONLY)
# installation
# ------------
install(FILES "${CMAKE_BINARY_DIR}/bin/spm_env.sh"
DESTINATION bin)
endmacro(spm_generate_env_file)
##
## @end file GenPkgConfig.cmake
##
Subproject commit 47b8241b579347ecc7213ccb7eba0b387f036c98
Subproject commit d44efd0e4af75cf4be6b9483198c595b03ec083a
......@@ -16,11 +16,11 @@ extern "C" { /* Assume C declarations for C++ */
#define CBLAS_INDEX int
#endif
typedef enum {CblasRowMajor=101, CblasColMajor=102} CBLAS_LAYOUT;
typedef enum {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113} CBLAS_TRANSPOSE;
typedef enum {CblasUpper=121, CblasLower=122} CBLAS_UPLO;
typedef enum {CblasNonUnit=131, CblasUnit=132} CBLAS_DIAG;
typedef enum {CblasLeft=141, CblasRight=142} CBLAS_SIDE;
typedef enum CBLAS_LAYOUT {CblasRowMajor=101, CblasColMajor=102} CBLAS_LAYOUT;
typedef enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113} CBLAS_TRANSPOSE;
typedef enum CBLAS_UPLO {CblasUpper=121, CblasLower=122} CBLAS_UPLO;
typedef enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132} CBLAS_DIAG;
typedef enum CBLAS_SIDE {CblasLeft=141, CblasRight=142} CBLAS_SIDE;
typedef CBLAS_LAYOUT CBLAS_ORDER; /* this for backward compatibility with CBLAS_ORDER */
......
......@@ -81,8 +81,9 @@ typedef struct spmatrix_s {
* @name SPM basic subroutines
* @{
*/
void spmInit( spmatrix_t *spm );
void spmExit( spmatrix_t *spm );
void spmInit ( spmatrix_t *spm );
void spmAlloc( spmatrix_t *spm );
void spmExit ( spmatrix_t *spm );
spmatrix_t *spmCopy( const spmatrix_t *spm );
void spmBase( spmatrix_t *spm, int baseval );
......@@ -110,10 +111,10 @@ void spmScalVector( spm_coeftype_t flt, double alpha, spm_int_t n, void *x, sp
* @name SPM subroutines to check format
* @{
*/
int spmSort( spmatrix_t *spm );
spm_int_t spmMergeDuplicate( spmatrix_t *spm );
spm_int_t spmSymmetrize( spmatrix_t *spm );
spmatrix_t *spmCheckAndCorrect( spmatrix_t *spm );
int spmSort( spmatrix_t *spm );
spm_int_t spmMergeDuplicate( spmatrix_t *spm );
spm_int_t spmSymmetrize( spmatrix_t *spm );
int spmCheckAndCorrect( const spmatrix_t *spm_in, spmatrix_t *spm_out );
/**
* @}
......
This diff is collapsed.
......@@ -190,6 +190,58 @@ spmUpdateComputedFields( spmatrix_t *spm )
spm->gnnzexp = spm->nnzexp;
}
/**
*******************************************************************************
*
* @brief Allocate the arrays of an spm structure with PaStiX internal
* allocations.
*
* This function must be called after initialization of the non-computed fields,
* and the call to spmUpdateComputedFields(). It allocates the colptr, rowptr,
* dof, and values arrays with PaStiX C malloc function. This is highly
* recommended to use this function when using PaStiX from Fortran.
*
*******************************************************************************
*
* @param[inout] spm
* The sparse matrix fr which the internal arrays needs to be allocated.
*
*******************************************************************************/
void
spmAlloc( spmatrix_t *spm )
{
spm_int_t colsize, rowsize, valsize, dofsize;
switch(spm->fmttype){
case SpmCSC:
colsize = spm->n + 1;
rowsize = spm->nnz;
valsize = spm->nnzexp;
dofsize = spm->n + 1;
break;
case SpmCSR:
colsize = spm->nnz;
rowsize = spm->n + 1;
valsize = spm->nnzexp;
dofsize = spm->n + 1;
break;
case SpmIJV:
default:
colsize = spm->nnz;
rowsize = spm->nnz;
valsize = spm->nnzexp;
dofsize = spm->n + 1;
}
spm->colptr = (spm_int_t*)malloc( colsize * sizeof(spm_int_t) );
spm->rowptr = (spm_int_t*)malloc( rowsize * sizeof(spm_int_t) );
if ( spm->dof < 1 ) {
spm->dofs = (spm_int_t*)malloc( dofsize * sizeof(spm_int_t) );
}
valsize = valsize * spm_size_of( spm->flttype );
spm->values = malloc(valsize);
}
/**
*******************************************************************************
*
......@@ -676,24 +728,28 @@ spmSymmetrize( spmatrix_t *spm )
*
*******************************************************************************
*
* @param[inout] spm
* @param[in] in
* The pointer to the sparse matrix structure to check, and correct.
*
* @param[inout] out
* On entry, an allocated structure to hold the corrected spm.
* On exit, holds the pointer to spm corrected.
*
*******************************************************************************
*
* @return if no changes have been made, the initial sparse matrix is returned,
* otherwise a copy of the sparse matrix, fixed to meet the PaStiX requirements,
* is returned.
* @return 0 if no changes have been made to the spm matrix.
* @return 1 if corrections have been applied to the in sparse matrix.
*
*******************************************************************************/
spmatrix_t *
spmCheckAndCorrect( spmatrix_t *spm )
int
spmCheckAndCorrect( const spmatrix_t *spm_in,
spmatrix_t *spm_out )
{
spmatrix_t *newspm = NULL;
spm_int_t count;
/* Let's work on a copy */
newspm = spmCopy( spm );
newspm = spmCopy( spm_in );
/* PaStiX works on CSC matrices */
spmConvert( SpmCSC, newspm );
......@@ -733,15 +789,18 @@ spmCheckAndCorrect( spmatrix_t *spm )
* Check if we return the new one, or the original one because no changes
* have been made
*/
if (( spm->fmttype != newspm->fmttype ) ||
( spm->nnzexp != newspm->nnzexp ) )
if (( spm_in->fmttype != newspm->fmttype ) ||
( spm_in->nnzexp != newspm->nnzexp ) )
{
return newspm;
memcpy( spm_out, newspm, sizeof(spmatrix_t) );
free( newspm );
return 1;
}
else {
memcpy( spm_out, spm_in, sizeof(spmatrix_t) );
spmExit( newspm );
free(newspm);
return (spmatrix_t*)spm;
free( newspm );
return 0;
}
}
......@@ -815,6 +874,7 @@ spmCopy( const spmatrix_t *spm )
newspm->values = malloc(valsize);
memcpy( newspm->values, spm->values, valsize );
}
return newspm;
}
......
......@@ -508,14 +508,14 @@ spmLoad( spmatrix_t *spm,
return SPM_ERR_BADPARAMETER;
}
spm->mtxtype = mtxtype;
spm->flttype = flttype;
spm->fmttype = fmttype;
spm->mtxtype = (spm_mtxtype_t)mtxtype;
spm->flttype = (spm_coeftype_t)flttype;
spm->fmttype = (spm_fmttype_t)fmttype;
spm->gN = gN;
spm->n = n;
spm->nnz = nnz;
spm->dof = dof;
spm->layout = layout;
spm->layout = (spm_layout_t)layout;
spmUpdateComputedFields( spm );
......
......@@ -139,8 +139,11 @@ z_spmMergeDuplicate( spmatrix_t *spm )
spm_int_t n = spm->n;
spm_int_t baseval = spm->colptr[0];
spm_int_t dof2 = spm->dof * spm->dof;
spm_int_t idx, i, j, d, size;
spm_int_t idx, i, j, size;
spm_int_t merge = 0;
#if !defined(PRECISION_p)
spm_int_t d;
#endif
if ( spm->fmttype == SpmCSC ) {
idx = 0;
......@@ -196,7 +199,6 @@ z_spmMergeDuplicate( spmatrix_t *spm )
}
}
(void)d;
return merge;
}
......
......@@ -46,7 +46,10 @@ z_spmCSCExpand(const spmatrix_t *spm)
spm_int_t i, j, k, ii, jj, dofi, dofj, col, row, baseval, lda;
spm_int_t diag, height;
spm_int_t *newcol, *newrow, *oldcol, *oldrow, *dofs;
spm_complex64_t *newval, *oldval, *oldval2;
#if !defined(PRECISION_p)
spm_complex64_t *newval = NULL;
#endif
spm_complex64_t *oldval2, *oldval = NULL;
assert( spm->fmttype == SpmCSC );
assert( spm->flttype == SpmComplex64 );
......@@ -200,7 +203,6 @@ z_spmCSCExpand(const spmatrix_t *spm)
assert(spm->loc2glob == NULL);
(void)newval;
(void)lda;
return newspm;
}
......@@ -234,7 +236,8 @@ z_spmCSRExpand(const spmatrix_t *spm)
spm_int_t i, j, k, ii, jj, dofi, dofj, col, row, baseval, lda;
spm_int_t diag, height;
spm_int_t *newcol, *newrow, *oldcol, *oldrow, *dofs;
spm_complex64_t *newval, *oldval, *oldval2;
spm_complex64_t *newval = NULL;
spm_complex64_t *oldval2, *oldval = NULL;
assert( spm->fmttype == SpmCSR );
assert( spm->flttype == SpmComplex64 );
......@@ -419,8 +422,10 @@ z_spmIJVExpand(const spmatrix_t *spm)
spmatrix_t *newspm;
spm_int_t i, j, k, ii, jj, dofi, dofj, col, row, baseval;
spm_int_t *newcol, *newrow, *oldcol, *oldrow, *dofs;
spm_complex64_t *newval, *oldval=NULL;
#if !defined(PRECISION_p)
spm_complex64_t *newval = NULL;
#endif
spm_complex64_t *oldval = NULL;
assert( spm->fmttype == SpmIJV );
assert( spm->flttype == SpmComplex64 );
......@@ -566,7 +571,6 @@ z_spmIJVExpand(const spmatrix_t *spm)
assert(spm->loc2glob == NULL);
(void)newval;
return newspm;
}
......
......@@ -451,7 +451,7 @@ z_spmCheckAxb( spm_fixdbl_t eps, int nrhs,
*/
if ( x0 != NULL ) {
double normX0;
double forw, nr, nx;
double forw, nr, nx, nx0;
int fail;
forward = 0.;
......@@ -461,14 +461,15 @@ z_spmCheckAxb( spm_fixdbl_t eps, int nrhs,
for( i=0; i<nrhs; i++, zx += ldx, zx0 += ldx0 ) {
nx = LAPACKE_zlange( LAPACK_COL_MAJOR, 'I', spm->n, 1, zx0, ldx0 );
nx0 = LAPACKE_zlange( LAPACK_COL_MAJOR, 'I', spm->n, 1, zx0, ldx0 );
nx = LAPACKE_zlange( LAPACK_COL_MAJOR, 'I', spm->n, 1, zx, ldx );
cblas_zaxpy( spm->n, CBLAS_SADDR(mzone),
zx, 1, zx0, 1);
nr = LAPACKE_zlange( LAPACK_COL_MAJOR, 'I', spm->n, 1, zx0, ldx0 );
forw = (nr / nx) / eps;
forw = (nr / nx0) / eps;
normX0 = ( nx > normX0 ) ? nx : normX0;
normR = ( nr > normR ) ? nr : normR;
......@@ -477,9 +478,11 @@ z_spmCheckAxb( spm_fixdbl_t eps, int nrhs,
fail = isnan(nx) || isinf(nx) || isnan(forw) || isinf(forw) || (forw > 1.e2);
if ( fail ) {
fprintf( stdout,
" || x0_%d ||_oo %e\n"
" || x_%d ||_oo %e\n"
" || x0_%d - x_%d ||_oo %e\n"
" || x0_%d - x_%d ||_oo / (||x0_%d||_oo * eps) %e (%s)\n",
i, nr,
i, nx,
i, i, nr,
i, i, i, forw,
fail ? "FAILED" : "SUCCESS" );
}
......@@ -488,7 +491,7 @@ z_spmCheckAxb( spm_fixdbl_t eps, int nrhs,
}
fprintf( stdout,
" max(|| x0_i ||_oo) %e\n"
" max(|| x_i ||_oo) %e\n"
" max(|| x0_i - x_i ||_oo) %e\n"
" max(|| x0_i - x_i ||_oo / || x0_i ||_oo) %e (%s)\n",
normX0, normR, forward,
......
......@@ -310,10 +310,10 @@ z_spmLaplacian_27points( spmatrix_t *spm,
/* Diagonal value */
*rowptr = l;
#if !defined(PRECISION_p)
degree = 1;
d = 1;
#if !defined(PRECISION_p)
if (k > 1) {
d++;
}
......
......@@ -105,7 +105,7 @@ spmGetOptions( int argc, char **argv,
exit(0);
}
*driver = -1;
*driver = (spm_driver_t)-1;
do
{
#if defined(HAVE_GETOPT_LONG)
......
......@@ -45,7 +45,7 @@ int spmComp( const spmatrix_t *spm1,
{
spm_int_t *colptr1, *colptr2;
spm_int_t *rowptr1, *rowptr2;
int *valptr1, *valptr2;
int *valptr1, *valptr2;
spm_int_t i;
if ( spm1->fmttype != SpmCSC ) {
......@@ -108,7 +108,8 @@ int main (int argc, char **argv)
char *filename;
spmatrix_t spm, *spm2;
spm_driver_t driver;
int mtxtype, baseval;
spm_mtxtype_t mtxtype;
int baseval;
int ret = SPM_SUCCESS;
int err = 0;
FILE *f;
......
......@@ -54,8 +54,10 @@ int main (int argc, char **argv)
spmatrix_t original, *spm;
spm_driver_t driver;
char *filename;
int spmtype, mtxtype, fmttype, baseval;
int i, rc, dofmax = 3;
spm_mtxtype_t spmtype;
spm_mtxtype_t mtxtype;
spm_fmttype_t fmttype;
int baseval, i, rc, dofmax = 3;
/**
* Get options from command line
......@@ -95,7 +97,7 @@ int main (int argc, char **argv)
{
spmBase( &original, baseval );
for( fmttype=0; fmttype<3; fmttype++ )
for( fmttype=SpmCSC; fmttype<=SpmIJV; fmttype++ )
{
spmConvert( fmttype, &original );
spm = spmDofExtend( &original, i, dofmax );
......
......@@ -23,11 +23,6 @@
#include <time.h>
#include "spm_tests.h"
int z_spm_matvec_check( int trans, const spmatrix_t *spm );
int c_spm_matvec_check( int trans, const spmatrix_t *spm );
int d_spm_matvec_check( int trans, const spmatrix_t *spm );
int s_spm_matvec_check( int trans, const spmatrix_t *spm );
#define PRINT_RES(_ret_) \
if(_ret_) { \
printf("FAILED(%d)\n", _ret_); \
......@@ -46,7 +41,9 @@ int main (int argc, char **argv)
spmatrix_t original, *spm;
spm_driver_t driver;
char *filename;
int spmtype, mtxtype, fmttype, baseval;
spm_mtxtype_t spmtype, mtxtype;
spm_fmttype_t fmttype;
int baseval;
int ret = SPM_SUCCESS;
int err = 0;
int rc, i, dofmax = 3;
......
......@@ -43,9 +43,11 @@ char* mtxnames[] = { "General", "Symmetric", "Hermitian" };
int main (int argc, char **argv)
{
spmatrix_t original, *spm;
spm_driver_t driver;
char *filename;
int spmtype, mtxtype, fmttype, baseval;
spm_driver_t driver;
char *filename;
spm_mtxtype_t spmtype, mtxtype;
spm_fmttype_t fmttype;
int baseval;
int rc = SPM_SUCCESS;
int err = 0;
int i, dofmax = 4;
......@@ -92,7 +94,7 @@ int main (int argc, char **argv)
{
spmBase( &original, baseval );
for( fmttype=0; fmttype<3; fmttype++ )
for( fmttype=SpmCSC; fmttype<=SpmIJV; fmttype++ )
{
spmConvert( fmttype, &original );
spm = spmDofExtend( &original, i, dofmax );
......
......@@ -22,11 +22,6 @@
#include <time.h>
#include "spm_tests.h"
int z_spm_matvec_check( int trans, const spmatrix_t *spm );
int c_spm_matvec_check( int trans, const spmatrix_t *spm );
int d_spm_matvec_check( int trans, const spmatrix_t *spm );
int s_spm_matvec_check( int trans, const spmatrix_t *spm );
#define PRINT_RES(_ret_) \
if(_ret_) { \
printf("FAILED(%d)\n", _ret_); \
......@@ -46,7 +41,11 @@ int main (int argc, char **argv)
spmatrix_t spm;
spm_driver_t driver;
char *filename;
int t,spmtype, mtxtype, fmttype, baseval;
spm_trans_t t;
spm_mtxtype_t spmtype;
spm_mtxtype_t mtxtype;
spm_fmttype_t fmttype;
int baseval;
int rc = SPM_SUCCESS;
int err = 0;
......
......@@ -45,7 +45,9 @@ int main (int argc, char **argv)
spmatrix_t spm;
spm_driver_t driver;
char *filename;
int spmtype, mtxtype, fmttype, baseval;
spm_mtxtype_t spmtype, mtxtype;
spm_fmttype_t fmttype;
int baseval;
int rc = SPM_SUCCESS;
int err = 0;
......@@ -70,7 +72,7 @@ int main (int argc, char **argv)
spmtype = spm.mtxtype;
printf(" -- SPM Norms Test --\n");
for( fmttype=0; fmttype<3; fmttype++ ) {
for( fmttype=SpmCSC; fmttype<=SpmIJV; fmttype++ ) {
spmConvert( fmttype, &spm );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment