SuperLU Distributed 9.0.0
gpu3d
distCheckArray.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mpi.h>
#include "superlu_ddefs.h"
Include dependency graph for distCheckArray.c:

Functions

int compareInt_t (void *a, void *b)
 Compares two integers for equality. More...
 
int compareInt (void *a, void *b)
 Compares two integers for equality. More...
 
int compareDouble (void *a, void *b)
 Compares two doubles for equality. More...
 
int dist_checkArrayEq (void *arr, int length, MPI_Datatype datatype, int src_rank, int dest_rank, MPI_Comm communicator, int(*compare)(void *, void *))
 Checks whether arrays at two MPI ranks are identical. More...
 

Function Documentation

◆ compareDouble()

int compareDouble ( void *  a,
void *  b 
)

Compares two doubles for equality.

Parameters
aVoid pointer to the first double
bVoid pointer to the second double
Returns
int Returns 0 if the doubles are equal, 1 otherwise
Here is the caller graph for this function:

◆ compareInt()

int compareInt ( void *  a,
void *  b 
)

Compares two integers for equality.

Parameters
aVoid pointer to the first integer
bVoid pointer to the second integer
Returns
int Returns 0 if the integers are equal, 1 otherwise

◆ compareInt_t()

int compareInt_t ( void *  a,
void *  b 
)

Compares two integers for equality.

Parameters
aVoid pointer to the first integer
bVoid pointer to the second integer
Returns
int Returns 0 if the integers are equal, 1 otherwise
Here is the caller graph for this function:

◆ dist_checkArrayEq()

int dist_checkArrayEq ( void *  arr,
int  length,
MPI_Datatype  datatype,
int  src_rank,
int  dest_rank,
MPI_Comm  communicator,
int(*)(void *, void *)  compare 
)

Checks whether arrays at two MPI ranks are identical.

This function is used to check if a copy of an array at two different MPI ranks are the same. It uses MPI_Send and MPI_Recv to transfer data between ranks, then compares the arrays.

Parameters
arrVoid pointer to the array to be compared
lengthThe length of the array
datatypeMPI_Datatype of the array elements
src_rankThe source rank that has the original array
dest_rankThe destination rank that has the copied array
communicatorThe MPI_Comm communicator that includes both ranks
compareA function pointer to the function used to compare elements. Should take two void pointers and return 0 if they are equal and a non-zero value otherwise.
Returns
int Returns 0 if arrays are identical, 1 otherwise.
Here is the caller graph for this function: