1*462c564dSBarry Smith static char help[] = "Tests MPIU_Allreduce() for overflow.\n"; 2*462c564dSBarry Smith #include <petscsys.h> 3*462c564dSBarry Smith 4*462c564dSBarry Smith int main(int argc, char **args) 5*462c564dSBarry Smith { 6*462c564dSBarry Smith PetscInt same = PETSC_INT_MAX; 7*462c564dSBarry Smith 8*462c564dSBarry Smith PetscFunctionBeginUser; 9*462c564dSBarry Smith PetscCall(PetscInitialize(&argc, &args, (char *)0, help)); 10*462c564dSBarry Smith PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, &same, 1, MPIU_INT, MPI_SUM, PETSC_COMM_WORLD)); 11*462c564dSBarry Smith PetscCall(PetscFinalize()); 12*462c564dSBarry Smith return 0; 13*462c564dSBarry Smith } 14*462c564dSBarry Smith 15*462c564dSBarry Smith /*TEST 16*462c564dSBarry Smith 17*462c564dSBarry Smith test: 18*462c564dSBarry Smith TODO: Cannot run CI test in parallel to produce clean output 19*462c564dSBarry Smith requires: !defined(PETSC_USE_64_BIT_INDICES) 20*462c564dSBarry Smith nsize: 2 21*462c564dSBarry Smith args: -petsc_ci_portable_error_output -error_output_stdout 22*462c564dSBarry Smith filter: grep -E "(PETSC ERROR)" | egrep "(Error Created|CreateError\(\)|main\(\))" 23*462c564dSBarry Smith 24*462c564dSBarry Smith TEST*/ 25