static char help[] = "Tests timing PetscSortInt().\n\n"; #include int main(int argc,char **argv) { PetscInt i,n = 1000,*values; #if defined(PETSC_USE_LOG) PetscLogEvent event; #endif PetscRandom rand; PetscReal value; PetscErrorCode ierr; PetscBool values_view=PETSC_FALSE; PetscMPIInt rank; ierr = PetscInitialize(&argc,&argv,(char*)0,help);if (ierr) return ierr; CHKERRMPI(MPI_Comm_rank(PETSC_COMM_WORLD,&rank)); CHKERRQ(PetscOptionsGetInt(NULL,NULL,"-n",&n,NULL)); CHKERRQ(PetscOptionsGetBool(NULL,0,"-values_view",&values_view,NULL)); CHKERRQ(PetscRandomCreate(PETSC_COMM_SELF,&rand)); CHKERRQ(PetscRandomSetFromOptions(rand)); CHKERRQ(PetscMalloc1(n,&values)); for (i=0; i