1462c564dSBarry Smith static char help[] = "Tests MPIU_Allreduce() for overflow.\n";
2462c564dSBarry Smith #include <petscsys.h>
3462c564dSBarry Smith
main(int argc,char ** args)4462c564dSBarry Smith int main(int argc, char **args)
5462c564dSBarry Smith {
6462c564dSBarry Smith PetscInt same = PETSC_INT_MAX;
7462c564dSBarry Smith
8462c564dSBarry Smith PetscFunctionBeginUser;
9c8025a54SPierre Jolivet PetscCall(PetscInitialize(&argc, &args, NULL, help));
10462c564dSBarry Smith PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, &same, 1, MPIU_INT, MPI_SUM, PETSC_COMM_WORLD));
11462c564dSBarry Smith PetscCall(PetscFinalize());
12462c564dSBarry Smith return 0;
13462c564dSBarry Smith }
14462c564dSBarry Smith
15462c564dSBarry Smith /*TEST
16462c564dSBarry Smith
17462c564dSBarry Smith test:
18462c564dSBarry Smith TODO: Cannot run CI test in parallel to produce clean output
19462c564dSBarry Smith requires: !defined(PETSC_USE_64_BIT_INDICES)
20462c564dSBarry Smith nsize: 2
21462c564dSBarry Smith args: -petsc_ci_portable_error_output -error_output_stdout
22*444bb3e7SJed Brown filter: grep -E "(PETSC ERROR)" | grep -E "(Error Created|CreateError\(\)|main\(\))"
23462c564dSBarry Smith
24462c564dSBarry Smith TEST*/
25