SuperLU Distributed 9.0.0
gpu3d
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mpi.h>
#include "superlu_ddefs.h"
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... | |
int compareDouble | ( | void * | a, |
void * | b | ||
) |
Compares two doubles for equality.
a | Void pointer to the first double |
b | Void pointer to the second double |
int compareInt | ( | void * | a, |
void * | b | ||
) |
Compares two integers for equality.
a | Void pointer to the first integer |
b | Void pointer to the second integer |
int compareInt_t | ( | void * | a, |
void * | b | ||
) |
Compares two integers for equality.
a | Void pointer to the first integer |
b | Void pointer to the second integer |
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.
arr | Void pointer to the array to be compared |
length | The length of the array |
datatype | MPI_Datatype of the array elements |
src_rank | The source rank that has the original array |
dest_rank | The destination rank that has the copied array |
communicator | The MPI_Comm communicator that includes both ranks |
compare | A 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. |