static char help[] = "Test PetscThreadComm Interface.\n\n"; /*T Concepts: PetscThreadComm^basic example T*/ /* Include "petscthreadcomm.h" so that we can use the PetscThreadComm interface. */ #include #undef __FUNCT__ #define __FUNCT__ "main" int main(int argc,char **argv) { PetscErrorCode ierr; PetscInt nthreads,i; PetscInt *ranks; PetscScalar *values; PetscInitialize(&argc,&argv,(char*)0,help); ierr = PetscThreadCommView(PETSC_COMM_WORLD,0);CHKERRQ(ierr); ierr = PetscThreadCommGetNThreads(PETSC_COMM_WORLD,&nthreads);CHKERRQ(ierr); PetscFinalize(); return 0; }