add test of new interface to the hypre error system
This commit is contained in:
parent
edd7995a32
commit
1226a223a7
@ -19,6 +19,7 @@ c-----------------------------------------------------------------------
|
||||
implicit none
|
||||
|
||||
include 'mpif.h'
|
||||
include '../babel/bHYPREClient-F/bHYPRE_ErrorCode.inc'
|
||||
|
||||
integer MAXZONS, MAXBLKS, MAXDIM, MAXLEVELS
|
||||
integer HYPRE_PARCSR, NNX, NNY, NNZ, VECLEN
|
||||
@ -108,6 +109,7 @@ c Babel-interface variables
|
||||
integer*8 mpi_comm
|
||||
integer*8 except
|
||||
c ... except is for Babel exceptions, which we shall ignore
|
||||
character msg*128
|
||||
|
||||
|
||||
c-----------------------------------------------------------------------
|
||||
@ -451,6 +453,13 @@ c-----------------------------------------------------------------------
|
||||
print *, 'Error Flag = ', ierr
|
||||
endif
|
||||
|
||||
c test error handler interface */
|
||||
call bHYPRE_ErrorHandler_Describe_f( ierr, msg, except );
|
||||
print *, msg
|
||||
call bHYPRE_ErrorHandler_Check_f( ierr, HYPRE_ERROR_GENERIC,
|
||||
1 i, except )
|
||||
print *, 'check whether ierr is HYPRE_ERROR_GENERIC =', i
|
||||
|
||||
c-----------------------------------------------------------------------
|
||||
c Finalize things
|
||||
c-----------------------------------------------------------------------
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "utilities.h"
|
||||
#include "HYPRE.h"
|
||||
@ -162,6 +161,7 @@ main( int argc,
|
||||
|
||||
int time_index;
|
||||
MPI_Comm mpi_comm = MPI_COMM_WORLD;
|
||||
char * msg;
|
||||
int M, N;
|
||||
int first_local_row, last_local_row, local_num_rows;
|
||||
int first_local_col, last_local_col, local_num_cols;
|
||||
@ -184,6 +184,7 @@ main( int argc,
|
||||
/*
|
||||
hypre_InitMemoryDebug(myid);
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Set defaults and read user-provided parameters
|
||||
*-----------------------------------------------------------*/
|
||||
@ -1519,6 +1520,12 @@ main( int argc,
|
||||
bHYPRE_IJParCSRVector_Print( bH_b, "driver.out.b", &_ex );
|
||||
bHYPRE_IJParCSRVector_Print( bH_x, "driver.out.x", &_ex );
|
||||
|
||||
/* test error handler interface */
|
||||
bHYPRE_ErrorHandler_Describe(ierr,&msg,&_ex);
|
||||
fprintf(stderr,"%s\n",msg);
|
||||
i = bHYPRE_ErrorHandler_Check(ierr,HYPRE_ERROR_GENERIC, &_ex );
|
||||
fprintf(stderr,"ierr check on HYPRE_ERROR_GENERIC is %i\n", i );
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Finalize things
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user