HP MLIB User's Guide Vol. 2 7th Ed.

Chapter 11 Introduction to Distributed SuperLU 749
MPI issue when calling SuperLU_DIST8 routines
MPI issue when calling SuperLU_DIST8 routines
In SuperLU_DIST8 routines, integers are represented using 64-bit addressing,
which is "long long" in C. However, MPI C interfaces only accept 32-bit
addressing integers, which is "int" in C. Thus, when using 64-bit addressing
integers and calling SuperLU_DIST8 routines, for the MPI C routines you want
to call, you need to take care of the integer type conversions in your
applications.
Sample programs
1. Sample program for using the driver routine pdgssvx_ABglobal.
#include <math.h>
#include <stdlib.h>
#include “/opt/mlib/include/superlu_ddefs.h”
#define int_t int
main(int_t argc, char *argv[])
/*
* Purpose
* =======
*
* This example illustrates how to use pdgssvx_ABglobal to solve
* the following linear system. The solution is
* x1=x2=x3=x4=x5=1.
*
* -- -- - - - -
* | 1.1 0 1.3 1.4 0 | | x1 | | 3.8 |
* | | | | | |
* | 0 0 2.3 2.4 0 | | x2 | | 4.7 |
* | | | | | |
* | 3.1 3.2 3.3 3.4 0 | | x3 | = | 13.0 |
* | | | | | |
* | 0 4.2 0 4.4 0 | | x4 | | 8.6 |
* | | | | | |
* | 5.1 5.2 0 0 5.5 | | x5 | | 15.8 |
* -- -- - - - -
*
* Five basic steps are required:
* 1. Initialize MPI environment and SuperLU_DIST process grid.
* 2. Set up the input matrix and the right-hand side.
* 3. Initialize the input arguments.
* 4. Call pdgssvx_ABglobal to solve the linear system.
* 5. Release the process grid and terminate the MPI environment.